Skip to content

Commit d74ba48

Browse files
committed
nixosTests.cockpit: tests more complete
Signed-off-by: lucasew <[email protected]>
1 parent ee36f6c commit d74ba48

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nixos/tests/cockpit.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,14 @@ import ./make-test-python.nix (
123123
assert "Web console is running in limited access mode" in driver.page_source
124124
125125
log("Clicking the sudo button")
126+
for button in driver.find_elements(By.TAG_NAME, "button"):
127+
if 'admin' in button.text:
128+
button.click()
126129
driver.switch_to.default_content()
127-
driver.find_element(By.CSS_SELECTOR, 'button.ct-locked').click()
130+
128131
log("Checking that /nonexistent is not a thing")
129132
assert '/nonexistent' not in driver.page_source
133+
assert driver.find_element(By.CSS_SELECTOR, '#machine-reconnect') is not None
130134
131135
driver.close()
132136
'';

0 commit comments

Comments
 (0)