From 69368fccdb8786fca63341a780f9c48a91c84f5e Mon Sep 17 00:00:00 2001 From: Serhii Tsymbaliuk Date: Thu, 12 Nov 2020 11:48:34 +0100 Subject: [PATCH] WebUI tests: Add simple test to check topology graph page is available Ticket: https://pagure.io/freeipa/issue/8523 Signed-off-by: Serhii Tsymbaliuk Reviewed-By: Petr Vobornik --- ipatests/prci_definitions/nightly_latest.yaml | 1 + .../prci_definitions/nightly_latest_selinux.yaml | 1 + .../prci_definitions/nightly_latest_testing.yaml | 1 + .../nightly_latest_testing_selinux.yaml | 1 + ipatests/prci_definitions/nightly_previous.yaml | 1 + ipatests/prci_definitions/nightly_rawhide.yaml | 1 + ipatests/test_webui/test_topology.py | 14 ++++++++++++++ ipatests/test_webui/ui_driver.py | 4 ++++ 8 files changed, 24 insertions(+) create mode 100644 ipatests/test_webui/test_topology.py diff --git a/ipatests/prci_definitions/nightly_latest.yaml b/ipatests/prci_definitions/nightly_latest.yaml index bb0afcfa0..37cefe098 100644 --- a/ipatests/prci_definitions/nightly_latest.yaml +++ b/ipatests/prci_definitions/nightly_latest.yaml @@ -1238,6 +1238,7 @@ jobs: test_webui/test_config.py test_webui/test_range.py test_webui/test_realmdomains.py + test_webui/test_topology.py test_webui/test_trust.py template: *ci-master-latest timeout: 7200 diff --git a/ipatests/prci_definitions/nightly_latest_selinux.yaml b/ipatests/prci_definitions/nightly_latest_selinux.yaml index c3150c7c4..844adc0d2 100644 --- a/ipatests/prci_definitions/nightly_latest_selinux.yaml +++ b/ipatests/prci_definitions/nightly_latest_selinux.yaml @@ -1335,6 +1335,7 @@ jobs: test_webui/test_config.py test_webui/test_range.py test_webui/test_realmdomains.py + test_webui/test_topology.py test_webui/test_trust.py template: *ci-master-latest timeout: 7200 diff --git a/ipatests/prci_definitions/nightly_latest_testing.yaml b/ipatests/prci_definitions/nightly_latest_testing.yaml index c3cde122d..f96e87fa7 100644 --- a/ipatests/prci_definitions/nightly_latest_testing.yaml +++ b/ipatests/prci_definitions/nightly_latest_testing.yaml @@ -1335,6 +1335,7 @@ jobs: test_webui/test_config.py test_webui/test_range.py test_webui/test_realmdomains.py + test_webui/test_topology.py test_webui/test_trust.py template: *testing-master-latest timeout: 7200 diff --git a/ipatests/prci_definitions/nightly_latest_testing_selinux.yaml b/ipatests/prci_definitions/nightly_latest_testing_selinux.yaml index de4385d6f..b138aa26d 100644 --- a/ipatests/prci_definitions/nightly_latest_testing_selinux.yaml +++ b/ipatests/prci_definitions/nightly_latest_testing_selinux.yaml @@ -1432,6 +1432,7 @@ jobs: test_webui/test_config.py test_webui/test_range.py test_webui/test_realmdomains.py + test_webui/test_topology.py test_webui/test_trust.py template: *testing-master-latest timeout: 7200 diff --git a/ipatests/prci_definitions/nightly_previous.yaml b/ipatests/prci_definitions/nightly_previous.yaml index 6e20d17d5..d13c9bab4 100644 --- a/ipatests/prci_definitions/nightly_previous.yaml +++ b/ipatests/prci_definitions/nightly_previous.yaml @@ -1238,6 +1238,7 @@ jobs: test_webui/test_config.py test_webui/test_range.py test_webui/test_realmdomains.py + test_webui/test_topology.py test_webui/test_trust.py template: *ci-master-previous timeout: 7200 diff --git a/ipatests/prci_definitions/nightly_rawhide.yaml b/ipatests/prci_definitions/nightly_rawhide.yaml index de1356bca..b251ee41b 100644 --- a/ipatests/prci_definitions/nightly_rawhide.yaml +++ b/ipatests/prci_definitions/nightly_rawhide.yaml @@ -1335,6 +1335,7 @@ jobs: test_webui/test_config.py test_webui/test_range.py test_webui/test_realmdomains.py + test_webui/test_topology.py test_webui/test_trust.py template: *ci-master-frawhide timeout: 7200 diff --git a/ipatests/test_webui/test_topology.py b/ipatests/test_webui/test_topology.py new file mode 100644 index 000000000..b870ff6a8 --- /dev/null +++ b/ipatests/test_webui/test_topology.py @@ -0,0 +1,14 @@ +# +# Copyright (C) 2020 FreeIPA Contributors see COPYING for license +# + +from ipatests.test_webui.ui_driver import screenshot, UI_driver + + +class TestTopology(UI_driver): + + @screenshot + def test_topology_graph(self): + self.init_app() + self.navigate_to_page('topology-graph') + self.assert_visible('.topology-view') diff --git a/ipatests/test_webui/ui_driver.py b/ipatests/test_webui/ui_driver.py index 4686a7d4b..7f20c6342 100644 --- a/ipatests/test_webui/ui_driver.py +++ b/ipatests/test_webui/ui_driver.py @@ -505,6 +505,10 @@ class UI_driver: self.driver.get(self.get_url(entity, facet)) self.wait_for_request(n=3, d=0.4) + def navigate_to_page(self, page): + self.driver.get('/'.join([self.get_base_url(), '#', 'p', page])) + self.wait_for_request(n=3, d=0.4) + def navigate_by_menu(self, item, complete=True): """ Navigate by using menu