Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into UGENE-8064 (#1606)
Browse files Browse the repository at this point in the history
* UGENE-8064. GUI test

* Fix

* Fix GUI tests
  • Loading branch information
yalgaer committed Apr 11, 2024
1 parent 764fa09 commit ad45959
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/corelibs/U2Lang/src/support/WorkflowDebugStatus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void WorkflowDebugStatus::addBreakpointToActor(const ActorId& actor) {

void WorkflowDebugStatus::removeBreakpointFromActor(const ActorId& actor) {
WorkflowBreakpoint* breakpoint = getBreakpointForActor(actor);
Q_ASSERT(breakpoint != nullptr);
CHECK(breakpoint != nullptr, );
removeBreakpoint(breakpoint);
}

Expand Down
1 change: 1 addition & 0 deletions src/plugins/GUITestBase/src/GUITestBasePlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1872,6 +1872,7 @@ void GUITestBasePlugin::registerTests(UGUITestBase* guiTestBase) {
REGISTER_TEST(GUITest_regression_scenarios::test_8040);
REGISTER_TEST(GUITest_regression_scenarios::test_8049);
REGISTER_TEST(GUITest_regression_scenarios::test_8052);
REGISTER_TEST(GUITest_regression_scenarios::test_8064);

//////////////////////////////////////////////////////////////////////////
// Common scenarios/project/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#include "GTUtilsProjectTreeView.h"
#include "GTUtilsSequenceView.h"
#include "GTUtilsTaskTreeView.h"
#include "GTUtilsWorkflowDesigner.h"
#include "runnables/ugene/corelibs/U2Gui/AppSettingsDialogFiller.h"
#include "runnables/ugene/corelibs/U2Gui/CreateAnnotationWidgetFiller.h"
#include "runnables/ugene/corelibs/U2Gui/CreateDocumentFromTextDialogFiller.h"
Expand Down Expand Up @@ -401,6 +402,26 @@ GUI_TEST_CLASS_DEFINITION(test_8052) {
GTMenu::showContextMenu(GTUtilsSequenceView::getPanOrDetView());
}

GUI_TEST_CLASS_DEFINITION(test_8064) {
GTUtilsWorkflowDesigner::openWorkflowDesigner();
GTUtilsWorkflowDesigner::toggleDebugMode();

GTUtilsWorkflowDesigner::addSample("Align sequences with MUSCLE");
GTKeyboardDriver::keyClick(Qt::Key_Escape); // Close wizard.

GTUtilsWorkflowDesigner::click("Read alignment");
GTUtilsWorkflowDesigner::addInputFile("Read alignment", dataDir + "samples/CLUSTALW/COI.aln");

GTUtilsWorkflowDesigner::setBreakpoint("Write alignment");
GTUtilsWorkflowDesigner::removeItem("Write alignment");

GTUtilsWorkflowDesigner::addElement("Write Alignment");
GTUtilsWorkflowDesigner::connect(GTUtilsWorkflowDesigner::getWorker("Align with MUSCLE"), GTUtilsWorkflowDesigner::getWorker("Write Alignment"));


GTUtilsWorkflowDesigner::runWorkflow();
}

} // namespace GUITest_regression_scenarios

} // namespace U2
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ GUI_TEST_CLASS_DECLARATION(test_8037)
GUI_TEST_CLASS_DECLARATION(test_8040)
GUI_TEST_CLASS_DECLARATION(test_8049)
GUI_TEST_CLASS_DECLARATION(test_8052)
GUI_TEST_CLASS_DECLARATION(test_8064)

#undef GUI_TEST_SUITE

Expand Down
33 changes: 18 additions & 15 deletions src/plugins/workflow_designer/src/WorkflowViewController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,21 +296,21 @@ WorkflowView::WorkflowView(WorkflowGObject* go)

WorkflowView::~WorkflowView() {
// Remove all breakpoints and resume workflow execution.
// QList<ActorId> actorsWithBreakpoint = debugInfo->getActorsWithBreakpoints();
// for (const auto& actorId : qAsConst(actorsWithBreakpoint)) {
// debugInfo->removeBreakpointFromActor(actorId);
// }
// auto context = debugInfo->getContext();
// auto monitor = context == nullptr ? nullptr : context->getMonitor();
// if (debugInfo->isPaused()) {
// if (monitor != nullptr) {
// monitor->resume();
// }
// }
// if (monitor != nullptr) {
// // Give up the parentship.
// debugInfo->setParent(monitor);
// }
// QList<ActorId> actorsWithBreakpoint = debugInfo->getActorsWithBreakpoints();
// for (const auto& actorId : qAsConst(actorsWithBreakpoint)) {
// debugInfo->removeBreakpointFromActor(actorId);
// }
// auto context = debugInfo->getContext();
// auto monitor = context == nullptr ? nullptr : context->getMonitor();
// if (debugInfo->isPaused()) {
// if (monitor != nullptr) {
// monitor->resume();
// }
// }
// if (monitor != nullptr) {
// // Give up the parentship.
// debugInfo->setParent(monitor);
// }

// Deallocate resources.
if (!loadWorkflowSceneTask.isNull()) {
Expand Down Expand Up @@ -979,7 +979,10 @@ void WorkflowView::addProcess(Actor* proc, const QPointF& pos) {

void WorkflowView::removeProcessItem(WorkflowProcessItem* item) {
CHECK(item != nullptr, );

Actor* actor = item->getProcess();
debugInfo->removeBreakpointFromActor(actor->getId());

scene->removeItem(item);
delete item;

Expand Down

0 comments on commit ad45959

Please sign in to comment.