예제 #1
0
    def DISABLED_vessel_track(self):
        driver = server.driver
        try:
            driver.set_window_size(1280, 776)
            driver.get("http://*****:*****@class='animations']/div/div/div[2]"), point['x'], point['y'])
            actions.click()
            actions.perform()

            server.wait_for(lambda: self.animationHasLoaded("VesselTrackAnimation"))

            self.assertEqual(self.getHover(point, "ClusterAnimation"), 27200, "Seriesgroup not present at x,y")

        except:
            name = os.path.realpath("ui_tests.test.test_home.png")
            driver.get_screenshot_as_file(name)
            raise
예제 #2
0
    def DISABLED_timeslider(self):
        driver = server.driver
        try:
            driver.set_window_size(1280, 776)
            driver.get("http://*****:*****@class="Timeline timeline main-timeline"]//div[@class="window"]'), offset, 0)
                actions.perform()

            server.wait_for(lambda: self.animationHasLoaded("ClusterAnimation"))
            point = self.latLng2Point({'lat':22.5, 'lng':0.0})
            self.assertEqual(self.getHover(point, "ClusterAnimation"), 27200, "Seriesgroup not present at x,y")
            moveTimeslider(-272)
            time.sleep(5)
            server.wait_for(lambda: self.animationHasLoaded("ClusterAnimation"))
            self.assertNotEqual(self.getHover(point, "ClusterAnimation"), 27200, "Seriesgroup present at x,y when timeslider has moved")

        except:
            name = os.path.realpath("ui_tests.test.test_timeslider.png")
            driver.get_screenshot_as_file(name)
            raise
예제 #3
0
    def test_zoom(self):
        driver = server.driver
        try:
            driver.set_window_size(1280, 776)
            driver.get("http://*****:*****@class="zoomIn"]'))
            actions.perform()

            time.sleep(1)
            server.wait_for(lambda: self.animationHasLoaded("ClusterAnimation"))

            self.assertEqual(get_tiles(), [u'-11.25,-11.25,0,-5.625', u'-11.25,-16.875,0,-11.25', u'-11.25,-5.625,0,0', u'-11.25,0,0,5.625', u'-11.25,11.25,0,16.875', u'-11.25,5.625,0,11.25', u'-22.5,-11.25,-11.25,-5.625', u'-22.5,-16.875,-11.25,-11.25', u'-22.5,-5.625,-11.25,0', u'-22.5,0,-11.25,5.625', u'-22.5,11.25,-11.25,16.875', u'-22.5,5.625,-11.25,11.25', u'-33.75,-11.25,-22.5,-5.625', u'-33.75,-16.875,-22.5,-11.25', u'-33.75,-5.625,-22.5,0', u'-33.75,0,-22.5,5.625', u'-33.75,11.25,-22.5,16.875', u'-33.75,5.625,-22.5,11.25', u'0,-11.25,11.25,-5.625', u'0,-16.875,11.25,-11.25', u'0,-5.625,11.25,0', u'0,0,11.25,5.625', u'0,11.25,11.25,16.875', u'0,5.625,11.25,11.25', u'11.25,-11.25,22.5,-5.625', u'11.25,-16.875,22.5,-11.25', u'11.25,-5.625,22.5,0', u'11.25,0,22.5,5.625', u'11.25,11.25,22.5,16.875', u'11.25,5.625,22.5,11.25', u'22.5,-11.25,33.75,-5.625', u'22.5,-16.875,33.75,-11.25', u'22.5,-5.625,33.75,0', u'22.5,0,33.75,5.625', u'22.5,11.25,33.75,16.875', u'22.5,5.625,33.75,11.25'])

        except:
            name = os.path.realpath("ui_tests.test.test_zoom.png")
            driver.get_screenshot_as_file(name)
            raise
예제 #4
0
    def test_vessel_info(self):
        driver = server.driver
        try:
            driver.set_window_size(1280, 776)
            driver.get(
                "http://*****:*****@class='animations']/div/div/div[2]"), point['x'],
                point['y'])
            actions.click()
            actions.perform()

            server.wait_for(lambda: not server.is_element_present(
                '//div[@id="vessel_identifiers"]//table//td[@class="vesselname" and text()="---"]'
            ))
            self.failUnless(
                server.is_element_present(
                    '//div[@id="vessel_identifiers"]//table//*[text()="27200"]'
                ))
        except:
            name = os.path.realpath("ui_tests.test.test_home.png")
            driver.get_screenshot_as_file(name)
            raise
예제 #5
0
    def test_home(self):
        driver = server.driver
        try:
            driver.set_window_size(1280, 776)
            driver.get("http://*****:*****@class='animations']/div/div/div[2]"), point['x'], point['y'])
            actions.click()
            actions.perform()

            server.wait_for(lambda: not server.is_element_present('//div[@id="vessel_identifiers"]//table//td[@class="imo"]'))
            self.failUnless(server.is_element_present('//div[@id="vessel_identifiers"]//table//td[text()="27200"]'))
        except:
            name = os.path.realpath("ui_tests.test.test_home.png")
            driver.get_screenshot_as_file(name)
            raise
예제 #6
0
    def test_vessel_track(self):
        driver = server.driver
        try:
            driver.set_window_size(1280, 776)
            driver.get("http://*****:*****@class='animations']/div/div/div[2]"), point['x'], point['y'])
            actions.click()
            actions.perform()

            server.wait_for(lambda: self.animationHasLoaded("VesselTrackAnimation"))

            self.assertEqual(self.getHover(point, "ClusterAnimation"), 27200, "Seriesgroup not present at x,y")

        except:
            name = os.path.realpath("ui_tests.test.test_home.png")
            driver.get_screenshot_as_file(name)
            raise
예제 #7
0
    def test_zoom(self):
        driver = server.driver
        try:
            driver.set_window_size(1280, 776)
            driver.get("http://*****:*****@title="Zoom in"]'))
            actions.perform()

            time.sleep(1)
            server.wait_for(lambda: self.animationHasLoaded("ClusterAnimation"))

            self.assertEqual(get_tiles(), [u'-11.25,-11.25,0,-5.625', u'-11.25,-16.875,0,-11.25', u'-11.25,-5.625,0,0', u'-11.25,0,0,5.625', u'-11.25,11.25,0,16.875', u'-11.25,5.625,0,11.25', u'-22.5,-11.25,-11.25,-5.625', u'-22.5,-16.875,-11.25,-11.25', u'-22.5,-5.625,-11.25,0', u'-22.5,0,-11.25,5.625', u'-22.5,11.25,-11.25,16.875', u'-22.5,5.625,-11.25,11.25', u'-33.75,-11.25,-22.5,-5.625', u'-33.75,-16.875,-22.5,-11.25', u'-33.75,-5.625,-22.5,0', u'-33.75,0,-22.5,5.625', u'-33.75,11.25,-22.5,16.875', u'-33.75,5.625,-22.5,11.25', u'0,-11.25,11.25,-5.625', u'0,-16.875,11.25,-11.25', u'0,-5.625,11.25,0', u'0,0,11.25,5.625', u'0,11.25,11.25,16.875', u'0,5.625,11.25,11.25', u'11.25,-11.25,22.5,-5.625', u'11.25,-16.875,22.5,-11.25', u'11.25,-5.625,22.5,0', u'11.25,0,22.5,5.625', u'11.25,11.25,22.5,16.875', u'11.25,5.625,22.5,11.25', u'22.5,-11.25,33.75,-5.625', u'22.5,-16.875,33.75,-11.25', u'22.5,-5.625,33.75,0', u'22.5,0,33.75,5.625', u'22.5,11.25,33.75,16.875', u'22.5,5.625,33.75,11.25'])

        except:
            name = os.path.realpath("ui_tests.test.test_zoom.png")
            driver.get_screenshot_as_file(name)
            raise
예제 #8
0
    def test_timeslider(self):
        driver = server.driver
        try:
            driver.set_window_size(1280, 776)
            driver.get("http://*****:*****@class="Timeline timeline main-timeline"]//div[@class="window"]'), offset, 0)
                actions.perform()

            server.wait_for(lambda: self.animationHasLoaded("ClusterAnimation"))
            point = self.latLng2Point({'lat':22.5, 'lng':0.0})
            self.assertEqual(self.getHover(point, "ClusterAnimation"), 27200, "Seriesgroup not present at x,y")
            moveTimeslider(-272)
            time.sleep(5)
            server.wait_for(lambda: self.animationHasLoaded("ClusterAnimation"))
            self.assertNotEqual(self.getHover(point, "ClusterAnimation"), 27200, "Seriesgroup present at x,y when timeslider has moved")

        except:
            name = os.path.realpath("ui_tests.test.test_timeslider.png")
            driver.get_screenshot_as_file(name)
            raise
예제 #9
0
    def test_home(self):
        driver = server.driver
        try:
            driver.set_window_size(1280, 776)
            driver.get("http://*****:*****@class='animations']/div/div/div[2]"), point['x'], point['y'])
            actions.click()
            actions.perform()

            server.wait_for(lambda: not server.is_element_present('//div[@id="vessel_identifiers"]//table//td[@class="imo"]'))
            self.failUnless(server.is_element_present('//div[@id="vessel_identifiers"]//table//td[text()="27200"]'))
        except:
            name = os.path.realpath("ui_tests.test.test_home.png")
            driver.get_screenshot_as_file(name)
            raise
예제 #10
0
    def test_vessel_info(self):
        driver = server.driver
        try:
            driver.set_window_size(1280, 776)
            driver.get("http://*****:*****@class='animations']/div/div/div[2]"), point['x'], point['y'])
            actions.click()
            actions.perform()

            server.wait_for(lambda: not server.is_element_present('//div[@id="vessel_identifiers"]//table//td[@class="vesselname" and text()="---"]'))
            self.failUnless(server.is_element_present('//div[@id="vessel_identifiers"]//table//*[text()="27200"]'))
        except:
            name = os.path.realpath("ui_tests.test.test_home.png")
            driver.get_screenshot_as_file(name)
            raise