Skip to content

Commit

Permalink
fix TlsTerminationPolicyView
Browse files Browse the repository at this point in the history
Change embedded_cert and embedded_cert attributes from TextInput to FileInput since UI has changed. Fix for test test_tls_terminology_policy_via_ui
  • Loading branch information
mastastny committed Sep 25, 2024
1 parent 7aca124 commit bbea8c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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 bbea8c8

Please sign in to comment.