diff --git a/test/asammdf/gui/widgets/test_FileWidget_Shortcuts.py b/test/asammdf/gui/widgets/test_FileWidget_Shortcuts.py index 8b237c20a..efe41b916 100644 --- a/test/asammdf/gui/widgets/test_FileWidget_Shortcuts.py +++ b/test/asammdf/gui/widgets/test_FileWidget_Shortcuts.py @@ -374,13 +374,18 @@ def test_FileWidget_Shortcut_Key_Period(self): Evaluate: - Evaluate number of background colors must be greater when signal is without dots """ + # Setup self.create_window("Plot") self.add_channels([35]) plot = self.widget.mdi_area.subWindowList()[0].widget() + # Remove bookmarks if plot is with bookmarks if not plot.bookmark_btn.isFlat(): QTest.mouseClick(plot.bookmark_btn, Qt.MouseButton.LeftButton) if not plot.plot.with_dots: plot.plot.set_dots(True) + # Remove grid if plot is with grid + if not plot.focused_mode_btn.isFlat(): + QTest.mouseClick(plot.focused_mode_btn, Qt.MouseButton.LeftButton) self.processEvents(0.1) # Find first dot @@ -395,7 +400,7 @@ def test_FileWidget_Shortcut_Key_Period(self): with_dots_black_coverage = 0 for cov in pm_with_dots.values(): with_dots_black_coverage += cov.count(Pixmap.COLOR_BACKGROUND) - debug_wd_pm = Pixmap.color_map(plot.plot.grab()) + debug_wd_pm = Pixmap.color_map(self.widget.grab()) # Event QTest.keySequence(self.widget, QKeySequence(self.shortcuts["set_line_style"])) self.processEvents(0.1) @@ -405,7 +410,7 @@ def test_FileWidget_Shortcut_Key_Period(self): without_dots_black_coverage = 0 for cov in pm_without_dots.values(): without_dots_black_coverage += cov.count(Pixmap.COLOR_BACKGROUND) - debug_wod_pm = Pixmap.color_map(plot.plot.grab()) + debug_wod_pm = Pixmap.color_map(self.widget.grab()) debug = f"pixmap : {debug_wd_pm} : pixmap || pixmap : {debug_wod_pm} : pixmap" # Evaluate self.assertGreater(without_dots_black_coverage, with_dots_black_coverage, debug)