def testBasicFunction(self): defaultdisplaymode = utils.getDdeDockDisplayMode() self.assertTrue(utils.dock.displaymode_fashion == defaultdisplaymode) defaultposition = utils.getDdeDockPosition() self.assertTrue(utils.dock.position_bottom == defaultposition) defaulthidestate = utils.getDdeDockHideState() self.assertTrue(utils.dock.hidestate_show == defaulthidestate) main_window = self.ddedockobject.child(self.dock_mainwindow) (width, height) = main_window.size self.assertTrue(width > 0) self.assertTrue(height > 0)
def testBasicFunction(self): defaultdisplaymode = utils.getDdeDockDisplayMode() self.assertTrue(utils.dock.displaymode_fashion == defaultdisplaymode) defaultposition = utils.getDdeDockPosition() self.assertTrue(utils.dock.position_bottom == defaultposition) defaulthidestate = utils.getDdeDockHideState() self.assertTrue(utils.dock.hidestate_show == defaulthidestate) main_window = self.ddedockobject.child(self.dock_mainwindow) (width, height) = main_window.size self.assertTrue(width > 0) self.assertTrue(height > 0)
def testOpenFileManager(self): google = self.ddedockobject.child(self.filemanager) google.click() rawinput.click(int(utils.resolution.width/2), int(utils.resolution.height/2)) if utils.dock.hidemode_keephidden != self.defaulthidemode: utils.setDdeDockHideMode(utils.dock.hidemode_keephidden) hidemode = utils.getDdeDockHideMode() hidestate = utils.getDdeDockHideState() self.assertTrue(hidemode == utils.dock.hidemode_keephidden) self.assertTrue(hidestate == utils.dock.hidestate_hide) win = utils.findWindow(self.filemanager_windowname) self.assertTrue(win != None)
def testChangeDisplayModeToFashion(self): utils.m.click(int(utils.resolution.width/2), utils.resolution.height, 2) utils.dockmenu.findMainWindow() utils.keySingle(utils.k.down_key) utils.keySingle(utils.k.enter_key) displaymode = utils.getDdeDockDisplayMode() self.assertTrue(utils.dock.displaymode_fashion == displaymode) position = utils.getDdeDockPosition() self.assertTrue(utils.dock.position_bottom == position) hidestate = utils.getDdeDockHideState() self.assertTrue(utils.dock.hidestate_show == hidestate) main_window = self.ddedockobject.child(self.dock_mainwindow) (width, height) = main_window.size self.assertTrue(width > 0) self.assertTrue(height > 0)
def testChangeDisplayModeToFashion(self): utils.m.click(int(utils.resolution.width/2), utils.resolution.height, 2) utils.dockmenu.findMainWindow() utils.keySingle(utils.k.down_key) utils.keySingle(utils.k.enter_key) displaymode = utils.getDdeDockDisplayMode() self.assertTrue(utils.dock.displaymode_fashion == displaymode) position = utils.getDdeDockPosition() self.assertTrue(utils.dock.position_bottom == position) hidestate = utils.getDdeDockHideState() self.assertTrue(utils.dock.hidestate_show == hidestate) main_window = self.ddedockobject.child(self.dock_mainwindow) (width, height) = main_window.size self.assertTrue(width > 0) self.assertTrue(height > 0)
def testOpenFileManager(self): launcher = self.ddedockobject.child("Launcher") launcher.point() managerobj = self.ddedockobject.child(self.filemanager) managerobj.click() rawinput.absoluteMotion(int(utils.resolution.width / 2), int(utils.resolution.height / 2)) if utils.dock.hidemode_smarthide != self.defaulthidemode: utils.setDdeDockHideMode(utils.dock.hidemode_smarthide) hidemode = utils.getDdeDockHideMode() hidestate = utils.getDdeDockHideState() self.assertTrue(hidemode == utils.dock.hidemode_smarthide) win = utils.findWindow(self.filemanager_windowname) self.assertTrue(win != None)
def testChangePositionToLeft(self): utils.m.click(int(utils.resolution.width/2), utils.resolution.height, 2) utils.dockmenu.findMainWindow() utils.keySingle(utils.k.down_key) utils.keySingle(utils.k.left_key) utils.keySingle(utils.k.down_key) utils.keySingle(utils.k.down_key) utils.keySingle(utils.k.down_key) utils.keySingle(utils.k.enter_key) defaultdisplaymode = utils.getDdeDockDisplayMode() self.assertTrue(utils.dock.displaymode_fashion == defaultdisplaymode) defaultposition = utils.getDdeDockPosition() self.assertTrue(utils.dock.position_left == defaultposition) defaulthidestate = utils.getDdeDockHideState() self.assertTrue(utils.dock.hidestate_show == defaulthidestate) main_window = self.ddedockobject.child(self.dock_mainwindow) (width, height) = main_window.size self.assertTrue(width > 0) self.assertTrue(height > 0) (x, y) = main_window.position self.assertTrue(0 == x)
def testChangePositionToLeft(self): utils.m.click(int(utils.resolution.width / 2), utils.resolution.height, 2) utils.dockmenu.findMainWindow() utils.keySingle(utils.k.down_key) utils.keySingle(utils.k.left_key) utils.keySingle(utils.k.down_key) utils.keySingle(utils.k.down_key) utils.keySingle(utils.k.down_key) utils.keySingle(utils.k.enter_key) defaultdisplaymode = utils.getDdeDockDisplayMode() self.assertTrue(utils.dock.displaymode_fashion == defaultdisplaymode) defaultposition = utils.getDdeDockPosition() self.assertTrue(utils.dock.position_left == defaultposition) defaulthidestate = utils.getDdeDockHideState() self.assertTrue(utils.dock.hidestate_show == defaulthidestate) main_window = self.ddedockobject.child(self.dock_mainwindow) (width, height) = main_window.size self.assertTrue(width > 0) self.assertTrue(height > 0) (x, y) = main_window.position self.assertTrue(0 == x)
def testOpenFileManager(self): launcher = self.ddedockobject.child("Launcher") launcher.point() managerobj = self.ddedockobject.child(self.filemanager) managerobj.click() ddedock = self.ddedockobject.child(self.dock_mainwindow) (width, height) = ddedock.size if utils.dock.hidemode_smarthide != self.defaulthidemode: utils.setDdeDockHideMode(utils.dock.hidemode_smarthide) rawinput.absoluteMotion(int(utils.resolution.width / 2), int(utils.resolution.height / 2)) time.sleep(3) hidemode = utils.getDdeDockHideMode() hidestate = utils.getDdeDockHideState() self.assertTrue(hidemode == utils.dock.hidemode_smarthide) time.sleep(2) win = utils.findWindow(self.filemanager_windowname) utils.resizeWindow(win, height + 1, height + 1, utils.resolution.width - 2 * height - 20, utils.resolution.height - 2 * height - 20) self.assertTrue(win != None)