diff --git a/conftest.py b/conftest.py index a3a90df..d8e607d 100644 --- a/conftest.py +++ b/conftest.py @@ -23,13 +23,13 @@ def driver(): def pytest_addoption(parser): """Command line parser.""" parser.addoption(f'--{Config.BASE_URL}', - default='https://s57map.ivazh.ru/', + default='https://s57test.ivazh.ru/', dest=Config.BASE_URL, action='store', metavar='str', help='Environment for run tests.') parser.addoption(f'--{Config.STAGING}', - default='s57map.ivazh.ru', + default='s57test.ivazh.ru', dest=Config.STAGING, action='store', metavar='str', diff --git a/logs/.gitkeep b/logs/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/screenshot_tests/tests/simple_test.py b/screenshot_tests/tests/simple_test.py index f18f81e..70f8c4c 100644 --- a/screenshot_tests/tests/simple_test.py +++ b/screenshot_tests/tests/simple_test.py @@ -7,39 +7,39 @@ import time class TestExample(TestCase): - def test_main_page(self): - self.driver.get("https://s57map.ivazh.ru/") + # def test_main_page(self): + # self.driver.get("https://s57map.ivazh.ru/") + # + # def action(): + # time.sleep(2) + # + # self.check_by_screenshot(None, full_page=True, action=action) - def action(): - time.sleep(2) - - self.check_by_screenshot(None, full_page=True, action=action) - - def test_mouse_move(self): - self.driver.get("https://s57map.ivazh.ru/") - - def action(): - time.sleep(2) - a = ActionChains(self.driver) - a.move_by_offset(100, 200) - a.perform() - - self.check_by_screenshot(None, full_page=True, action=action) + # def test_mouse_move(self): + # self.driver.get("https://s57map.ivazh.ru/") + # + # def action(): + # time.sleep(2) + # a = ActionChains(self.driver) + # a.move_by_offset(100, 200) + # a.perform() + # + # self.check_by_screenshot(None, full_page=True, action=action) def test_search_block(self): - self.driver.get("https://s57.ivazh.ru/styles/r14/#12.13/71.2832/72.13405") + self.driver.get("https://s57test.ivazh.ru/") def action(): time.sleep(2) - self.check_by_screenshot_file(None, screenshot_path=f'{os.path.dirname(__file__)}/test_search_block.png', + self.check_by_screenshot_file(None, screenshot_path=f'{os.path.dirname(__file__)}/test_s57_style.png', full_page=True, action=action) - def save_screenshot(self): - self.driver.get("https://s57.ivazh.ru/styles/r14/#12.13/71.2832/72.13405") + def test_save_screenshot(self): + self.driver.get("https://s57test.ivazh.ru/") def action(): time.sleep(2) - self.save_screenshot(f'{os.path.dirname(__file__)}/test_search_block.png', full_page=True, action=action) + self.save_screenshot(f'{os.path.dirname(__file__)}/test_s57_style.png', full_page=True, action=action) diff --git a/screenshot_tests/tests/test_s57_style.png b/screenshot_tests/tests/test_s57_style.png new file mode 100644 index 0000000..b68ffe2 Binary files /dev/null and b/screenshot_tests/tests/test_s57_style.png differ diff --git a/screenshot_tests/tests/test_search_block.png b/screenshot_tests/tests/test_search_block.png index aa9295e..69c591b 100644 Binary files a/screenshot_tests/tests/test_search_block.png and b/screenshot_tests/tests/test_search_block.png differ