Skip to content

Commit

Permalink
fix ui tests
Browse files Browse the repository at this point in the history
fix for tests: test_api_key_autocomplete, test_api_multiple_specs, test_tls_terminology_policy_via_ui, test_tls_terminology_policy_content
  • Loading branch information
mastastny committed Sep 27, 2024
1 parent ad13247 commit 158f338
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion testsuite/tests/ui/oas/test_api_key_autocomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def api_doc_page(login, navigator, ui_active_doc, request, custom_admin_login):
"""Custom doc page for developer portal"""
view = navigator.navigate(CMSNewPageView)
page_name = blame(request, "CustomDocumentation")
page_path = blame(request, "apidocs")
page_path = blame(request, "/apidocs")

view.create(
page_name,
Expand Down
2 changes: 1 addition & 1 deletion testsuite/tests/ui/oas/test_multiple_oas_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def multiple_api_doc_page(login, navigator, oas3_one_spec, oas3_two_spec, reques
"""Custom doc page for developer portal"""
view = navigator.navigate(CMSNewPageView)
page_name = blame(request, "Multiple OAS docs")
page_path = blame(request, "multiple_oas")
page_path = blame(request, "/multiple_oas")

view.create(
page_name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ def test_tls_terminology_policy_content(navigator, policy_service):
assert tls_policy_view.local_cert_key.is_displayed

tls_policy_view.cert_type_select.select_by_value("1")
assert tls_policy_view.embedded_cert_path.is_displayed
assert tls_policy_view.embedded_cert_key_path.is_displayed
assert tls_policy_view.embedded_cert.is_displayed
assert tls_policy_view.embedded_cert_key.is_displayed

tls_policy_view.cert_type_select.select_by_value("0")
assert tls_policy_view.local_cert_key.is_displayed
Expand Down
8 changes: 4 additions & 4 deletions testsuite/ui/views/admin/product/integration/policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class TlsTerminationPolicyView(View):
add_cert_btn = Button(locator=".//button[contains(@class, 'btn-add')]")
local_cert_key = FileInput(id="root_certificate_key_path")
local_cert = FileInput(id="root_certificate_path")
embedded_cert_path = TextInput(id="root_certificate")
embedded_cert_key_path = TextInput(id="root_certificate_key")
embedded_cert = FileInput(id="root_certificate")
embedded_cert_key = FileInput(id="root_certificate_key")
update_policy_btn = Button(locator=".//button[text()='Update Policy']")
cert_type_select = ThreescaleDropdown('//*[@id="root_certificates_0_anyof_select"]')

Expand All @@ -67,8 +67,8 @@ def add_embedded_certs(self, certificate: Certificate):
"""Adds certs from filesystem"""
self.add_cert_btn.click()
self.cert_type_select.select_by_value("1")
self.embedded_cert_path.fill(certificate.files["certificate"])
self.embedded_cert_key_path.fill(certificate.files["key"])
self.embedded_cert.fill(certificate.files["certificate"])
self.embedded_cert_key.fill(certificate.files["key"])
self.update_policy_btn.click()

@property
Expand Down

0 comments on commit 158f338

Please sign in to comment.