Esempio n. 1
0
 def __init__(self, testInfo, projectBrowser, newVersion=True):
     self.testInfo = testInfo
     self.projectBrowser = projectBrowser
     self.launchCheck = LaunchCheck(self)
     self.launchFlix(30)
     if newVersion:
         self.__startCleanVersion()
Esempio n. 2
0
class Launch:
    def __init__(self, testInfo, projectBrowser, newVersion=True):
        self.testInfo = testInfo
        self.projectBrowser = projectBrowser
        self.launchCheck = LaunchCheck(self)
        self.launchFlix(30)
        if newVersion:
            self.__startCleanVersion()

    def __startCleanVersion(self):
        # Launch Flix, load the show, create a new sequence, load it and create a new version; this can be edited
        self.projectBrowser.loadShow()
        self.projectBrowser.createSequence()
        self.projectBrowser.loadSequence()
        self.projectBrowser.createCleanVersion()

    def launchFlix(self, timeout):
        """Launches Flix's main UI via its bat or sh file

        path -- Path to the Flix launcher
        timeout -- Time in seconds before the Project Browser will open
        """
        log('##### launchFlix')

        # Flix is being launched from the Test Suite before Sikuli
        if self.launchCheck.launchFlixCheck(timeout) == 'login':
            self.logIn(timeout)

    def logIn(self, timeout):
        log('##### logIn')

        click('logInScreen.png'); wait(.5)

        type(sikuli.Key.TAB); wait(.5)
        type(self.testInfo.user); wait(1)
        type(sikuli.Key.TAB); wait(.5)
        type('latte'); wait(1)
        type(sikuli.Key.ENTER)

        self.launchCheck.launchFlixCheck(timeout)

    def openFlixGUI(self, timeout):
        """Opens Flix's main GUI"""
        log('##### openFlixGUI')

        sikuliUtils.newChromeTab('http://127.0.0.1:35980/html/index.html#')

        self.launchCheck.openFlixGUICheck(timeout)

    def openEditorialGUI(self, timeout, closeFlix=False):
        """Opens Flix's Editorial GUI"""
        log('##### openEditorialGUI')

        pyUtils.resetEditorialGuiState()

        if closeFlix:
            sikuliUtils.closeChromeTab()  # Close the main Flix tab

        sikuliUtils.newChromeTab('http://127.0.0.1:35980/html/editorial.html')

        self.launchCheck.openEditorialGUICheck(timeout)