ui/test: Manual testing fixes (#949)
* Fixed tooltip list items not activated on click * Fixed crash when clearing focused graph edges after displaying graph with no edges * Updated and fixed manual graph view tests * Fixed previous location refocused when activating local symbol * Fixed crash in graph view after showing empty graph
This commit is contained in:
@@ -89,6 +89,7 @@ void CodeController::handleMessage(MessageActivateLocalSymbols* message)
|
||||
m_codeParams.activeLocalSymbolIds = message->symbolIds;
|
||||
m_codeParams.activeLocalSymbolType = LOCATION_LOCAL_SYMBOL;
|
||||
m_codeParams.currentActiveLocalLocationIds.clear();
|
||||
m_codeParams.locationIdToFocus = 0;
|
||||
showFiles(m_codeParams, CodeScrollParams(), !message->isReplayed());
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "ColorScheme.h"
|
||||
#include "MessageActivateLocalSymbols.h"
|
||||
#include "MessageActivateSourceLocations.h"
|
||||
#include "MessageActivateTokenIds.h"
|
||||
#include "MessageTabOpenWith.h"
|
||||
#include "MessageTooltipShow.h"
|
||||
#include "QtContextMenu.h"
|
||||
@@ -561,6 +562,10 @@ void QtCodeField::activateAnnotations(
|
||||
{
|
||||
MessageActivateSourceLocations(locationIds, containsUnsolved).dispatch();
|
||||
}
|
||||
else if (tokenIds.size())
|
||||
{
|
||||
MessageActivateTokenIds(utility::toVector(tokenIds)).dispatch();
|
||||
}
|
||||
else if (localSymbolIds.size())
|
||||
{
|
||||
MessageActivateLocalSymbols(utility::toVector(localSymbolIds)).dispatch();
|
||||
|
||||
@@ -32,9 +32,16 @@ void QtGraphEdge::unfocusBezierEdge()
|
||||
if (s_focusedBezierEdge)
|
||||
{
|
||||
s_focusedBezierEdge->coFocusOut();
|
||||
s_focusedBezierEdge = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void QtGraphEdge::clearFocusedEdges()
|
||||
{
|
||||
s_focusedEdge = nullptr;
|
||||
s_focusedBezierEdge = nullptr;
|
||||
}
|
||||
|
||||
QtGraphEdge::QtGraphEdge(
|
||||
GraphFocusHandler* focusHandler,
|
||||
QtGraphNode* owner,
|
||||
@@ -63,9 +70,6 @@ QtGraphEdge::QtGraphEdge(
|
||||
m_owner = m_target;
|
||||
m_target = temp;
|
||||
}
|
||||
|
||||
s_focusedEdge = nullptr;
|
||||
s_focusedBezierEdge = nullptr;
|
||||
}
|
||||
|
||||
QtGraphEdge::~QtGraphEdge() {}
|
||||
|
||||
@@ -23,6 +23,7 @@ class QtGraphEdge
|
||||
|
||||
public:
|
||||
static void unfocusBezierEdge();
|
||||
static void clearFocusedEdges();
|
||||
|
||||
QtGraphEdge(
|
||||
GraphFocusHandler* focusHandler,
|
||||
|
||||
@@ -323,7 +323,7 @@ void QtGraphView::rebuildGraph(
|
||||
const GraphParams params)
|
||||
{
|
||||
m_onQtThread([=]() {
|
||||
if (m_transition && m_transition->currentTime() < m_transition->totalDuration())
|
||||
if (isTransitioning())
|
||||
{
|
||||
m_transition->stop();
|
||||
m_transition.reset();
|
||||
@@ -383,6 +383,7 @@ void QtGraphView::rebuildGraph(
|
||||
}
|
||||
|
||||
m_edges.clear();
|
||||
QtGraphEdge::clearFocusedEdges();
|
||||
|
||||
// create edges
|
||||
Graph::TrailMode trailMode = m_graph ? m_graph->getTrailMode() : Graph::TRAIL_NONE;
|
||||
@@ -558,7 +559,7 @@ void QtGraphView::scrollToValues(int xValue, int yValue)
|
||||
void QtGraphView::activateEdge(Id edgeId)
|
||||
{
|
||||
m_onQtThread([=]() {
|
||||
if (m_transition && m_transition->currentTime() < m_transition->totalDuration())
|
||||
if (isTransitioning())
|
||||
{
|
||||
m_transition->stop();
|
||||
m_transition.reset();
|
||||
@@ -629,11 +630,21 @@ void QtGraphView::focusView(bool focusIn)
|
||||
|
||||
const std::list<QtGraphNode*>& QtGraphView::getGraphNodes() const
|
||||
{
|
||||
if (isTransitioning())
|
||||
{
|
||||
return m_nodes;
|
||||
}
|
||||
|
||||
return m_oldNodes;
|
||||
}
|
||||
|
||||
const std::list<QtGraphEdge*>& QtGraphView::getGraphEdges() const
|
||||
{
|
||||
if (isTransitioning())
|
||||
{
|
||||
return m_edges;
|
||||
}
|
||||
|
||||
return m_oldEdges;
|
||||
}
|
||||
|
||||
@@ -745,7 +756,7 @@ void QtGraphView::scrolled(int)
|
||||
|
||||
void QtGraphView::resized()
|
||||
{
|
||||
if (m_transition && m_transition->currentTime() < m_transition->totalDuration())
|
||||
if (isTransitioning())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1469,3 +1480,8 @@ void QtGraphView::createTransition()
|
||||
m_transition.get(), &QPropertyAnimation::finished, this, &QtGraphView::finishedTransition);
|
||||
m_transition->start();
|
||||
}
|
||||
|
||||
bool QtGraphView::isTransitioning() const
|
||||
{
|
||||
return m_transition && m_transition->currentTime() < m_transition->totalDuration();
|
||||
}
|
||||
|
||||
@@ -144,6 +144,7 @@ private:
|
||||
std::vector<std::pair<QtGraphNode*, QtGraphNode*>>* remainingNodes);
|
||||
|
||||
void createTransition();
|
||||
bool isTransitioning() const;
|
||||
|
||||
GraphFocusHandler m_focusHandler;
|
||||
bool m_hasFocus = false;
|
||||
|
||||
@@ -51,10 +51,10 @@ namespace image_export
|
||||
|
||||
|
||||
|
||||
// TEST: move - WASD
|
||||
// TEST: move - Ctrl + Arrows
|
||||
// START ----------------------------------------------------------------------
|
||||
|
||||
// ACTION: Use WASD to scroll up, down, left, right
|
||||
// ACTION: Use Ctrl + Arrows to scroll up, down, left, right
|
||||
// RESULT: graph is moved
|
||||
|
||||
// END ------------------------------------------------------------------------
|
||||
@@ -81,10 +81,10 @@ namespace image_export
|
||||
|
||||
|
||||
|
||||
// TEST: zoom - Shift + WS
|
||||
// TEST: zoom - Shift + Ctrl + Up/Down
|
||||
// START ----------------------------------------------------------------------
|
||||
|
||||
// ACTION: Hold Shift and press W/S
|
||||
// ACTION: Hold Shift + Ctrl and press Up/Down
|
||||
// RESULT: Zoom Level changes, percentage in lower left corner
|
||||
|
||||
// END ------------------------------------------------------------------------
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
// ACTION 2: Close with click on Cancel
|
||||
// RESULT 2: dialog closes
|
||||
|
||||
// ACTION 3: Use custom trail shortcut Ctrl + L
|
||||
// ACTION 3: Use custom trail shortcut Ctrl + U
|
||||
// RESULT 3: dialog opens on top of window
|
||||
|
||||
// ACTION 4: click on main window
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
// RESULTS 6:
|
||||
// - Graph shows multiple paths
|
||||
// - Graph contains: CustomD -> CustomB, CustomC -> CustomA -> func -> int
|
||||
// - Graph contains: CustomD -> CustomB, CustomC -> CustomA, func2 -> func -> int
|
||||
|
||||
// Action 7: Repeat search with:
|
||||
// - select vertical layout
|
||||
@@ -46,7 +46,7 @@
|
||||
// RESULTS 7:
|
||||
// - Graph one call chain to func
|
||||
// - Graph goes top to bottom
|
||||
// - Graph contains: CustomD -> CustomB -> CustomA, func2 -> func -> int
|
||||
// - Graph contains: CustomD -> CustomB -> CustomA -> func -> int
|
||||
|
||||
// END ------------------------------------------------------------------------
|
||||
|
||||
@@ -80,6 +80,6 @@
|
||||
|
||||
// RESULTS 6:
|
||||
// - Graph shows multiple paths
|
||||
// - Graph contains: CustomB, CustomC -> CustomA, func2 -> func
|
||||
// - Graph contains: CustomD -> CustomB, CustomC -> CustomA, func2 -> func
|
||||
|
||||
// END ------------------------------------------------------------------------
|
||||
|
||||
@@ -31,7 +31,7 @@ void level_1_func_1() // <- ACTION 1: activate
|
||||
|
||||
// ACTION 3: hover and click edges
|
||||
// RESULTS 3:
|
||||
// - hover highlight in grey
|
||||
// - hover highlight in focus color
|
||||
// - click shows source location in code
|
||||
|
||||
// ACTION 4: Reduce graph depth to 2
|
||||
|
||||
@@ -43,44 +43,5 @@
|
||||
// END ------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// TEST: overview letter index
|
||||
// START ----------------------------------------------------------------------
|
||||
|
||||
// ACTION 1: activate overview
|
||||
// ACTION 2: Click on Union bundle
|
||||
// ACTION 3: Press letter keys on keyboard
|
||||
// RESULT 3: the graph is scrolled to the respective letter pressed
|
||||
|
||||
// END ------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
union A_Union_Type_Name_Making_A_Long_List {};
|
||||
union B_Union_Type_Name_Making_A_Long_List {};
|
||||
union C_Union_Type_Name_Making_A_Long_List {};
|
||||
union D_Union_Type_Name_Making_A_Long_List {};
|
||||
union E_Union_Type_Name_Making_A_Long_List {};
|
||||
union F_Union_Type_Name_Making_A_Long_List {};
|
||||
union G_Union_Type_Name_Making_A_Long_List {};
|
||||
union H_Union_Type_Name_Making_A_Long_List {};
|
||||
union I_Union_Type_Name_Making_A_Long_List {};
|
||||
union J_Union_Type_Name_Making_A_Long_List {};
|
||||
union K_Union_Type_Name_Making_A_Long_List {};
|
||||
union L_Union_Type_Name_Making_A_Long_List {};
|
||||
union M_Union_Type_Name_Making_A_Long_List {};
|
||||
union N_Union_Type_Name_Making_A_Long_List {};
|
||||
union O_Union_Type_Name_Making_A_Long_List {};
|
||||
union P_Union_Type_Name_Making_A_Long_List {};
|
||||
union Q_Union_Type_Name_Making_A_Long_List {};
|
||||
union R_Union_Type_Name_Making_A_Long_List {};
|
||||
union S_Union_Type_Name_Making_A_Long_List {};
|
||||
union T_Union_Type_Name_Making_A_Long_List {};
|
||||
union U_Union_Type_Name_Making_A_Long_List {};
|
||||
union V_Union_Type_Name_Making_A_Long_List {};
|
||||
union W_Union_Type_Name_Making_A_Long_List {};
|
||||
union X_Union_Type_Name_Making_A_Long_List {};
|
||||
union Y_Union_Type_Name_Making_A_Long_List {};
|
||||
union Z_Union_Type_Name_Making_A_Long_List {};
|
||||
|
||||
union A_Union_Type {};
|
||||
int global_variable;
|
||||
|
||||
@@ -29,5 +29,5 @@
|
||||
<type>C++ Source Group</type>
|
||||
</source_group_475571d1-b082-4fff-81c5-d099c19f957d>
|
||||
</source_groups>
|
||||
<version>7</version>
|
||||
<version>8</version>
|
||||
</config>
|
||||
|
||||
Reference in New Issue
Block a user