Skip to content

Commit

Permalink
fix: Modify integration tests
Browse files Browse the repository at this point in the history
* Card ID: CCT-425
* Modify integration tests according changes of cockpit. Replacing
  keyword auto-attach with enable content and removing button
  "Auto-Attach"
  • Loading branch information
jirihnidek committed Jun 10, 2024
1 parent 6ab887f commit 5a534c9
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions test/check-subscriptions
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,12 @@ class TestSubscriptions(SubscriptionsCase):
# find another one that isn't subscribed too
self.wait_subscription(PRODUCT_SHARED, False)

def testRegisterWithoutAutoAttach(self):
def testRegisterDoNotEnableContent(self):
"""
Test registration without enabled content. Only consumer certificate
should be installed. No entitlement certificate is installed in this
case.
"""
b = self.browser

self.login_and_go("/subscriptions")
Expand All @@ -334,11 +339,11 @@ class TestSubscriptions(SubscriptionsCase):
# enter server and correct login data
b.set_val("#subscription-register-url", "custom")
b.set_input_text("#subscription-register-url-custom", CANDLEPIN_URL)
b.set_input_text("#subscription-register-username", "doc")
b.set_input_text("#subscription-register-password", "password")
b.set_input_text("#subscription-register-org", "snowwhite")
b.set_input_text("#subscription-register-username", "admin")
b.set_input_text("#subscription-register-password", "admin")
b.set_input_text("#subscription-register-org", "donaldduck")

b.click("#subscription-auto-attach-use")
b.click("#subscription-enable-content")

dialog_register_button_sel = "footer .pf-m-primary"
b.click(dialog_register_button_sel)
Expand All @@ -347,15 +352,6 @@ class TestSubscriptions(SubscriptionsCase):
with b.wait_timeout(60):
b.wait_not_present(dialog_register_button_sel)

# this product should not be subscribed ATM, because auto-attach was skipped
self.wait_subscription(PRODUCT_SHARED, False)

b.click("button:contains('Auto-attach')")

# find another one that is subscribed
with b.wait_timeout(60):
self.wait_subscription(PRODUCT_SHARED, True)

def testUnpriv(self):
self.machine.execute("useradd junior; echo junior:foobar | chpasswd")
self.login_and_go("/subscriptions", user="junior")
Expand Down

0 comments on commit 5a534c9

Please sign in to comment.