Ignore:
Timestamp:
Dec 13, 2017 6:14:23 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
e90988c
Parents:
9387fe3
Message:

Assure the main window opens maximized and the welcome widget doesnt mess up the layout. SASVIEW-831

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/UnitTesting/MainWindowTest.py

    r53c771e r8353d90  
    1515from sas.qtgui.MainWindow.MainWindow import SplashScreen 
    1616from sas.qtgui.MainWindow.GuiManager import GuiManager 
     17from sas.qtgui.Perspectives.Fitting import FittingPerspective 
    1718 
    1819if not QtWidgets.QApplication.instance(): 
     
    4041        self.assertIsInstance(splash, QtWidgets.QSplashScreen) 
    4142 
     43    def testWidgets(self): 
     44        """ Test enablement/disablement of widgets """ 
     45        # Open the main window 
     46        tmp_main = MainSasViewWindow(None) 
     47        tmp_main.showMaximized() 
     48        # See that only one subwindow is up 
     49        self.assertEqual(len(tmp_main.workspace.subWindowList()), 1) 
     50        # and that the subwindow is the fitting perspective 
     51        self.assertIsInstance(tmp_main.workspace.subWindowList()[0].widget(), 
     52                              FittingPerspective.FittingWindow) 
     53        # Show the message widget 
     54        tmp_main.guiManager.showWelcomeMessage() 
     55        # Assure it is visible and a part of the MdiArea 
     56        self.assertTrue(tmp_main.guiManager.welcomePanel.isVisible()) 
     57        self.assertEqual(len(tmp_main.workspace.subWindowList()), 2) 
     58 
     59        tmp_main.close() 
     60 
    4261    def testExit(self): 
    4362        """ 
Note: See TracChangeset for help on using the changeset viewer.