From d74ba487994663cf01175e4a532407c17852a120 Mon Sep 17 00:00:00 2001 From: lucasew Date: Tue, 15 Apr 2025 09:21:27 -0300 Subject: [PATCH] nixosTests.cockpit: tests more complete Signed-off-by: lucasew --- nixos/tests/cockpit.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/tests/cockpit.nix b/nixos/tests/cockpit.nix index 0433cebf3b56..b7dcf9cc629b 100644 --- a/nixos/tests/cockpit.nix +++ b/nixos/tests/cockpit.nix @@ -123,10 +123,14 @@ import ./make-test-python.nix ( assert "Web console is running in limited access mode" in driver.page_source log("Clicking the sudo button") + for button in driver.find_elements(By.TAG_NAME, "button"): + if 'admin' in button.text: + button.click() driver.switch_to.default_content() - driver.find_element(By.CSS_SELECTOR, 'button.ct-locked').click() + log("Checking that /nonexistent is not a thing") assert '/nonexistent' not in driver.page_source + assert driver.find_element(By.CSS_SELECTOR, '#machine-reconnect') is not None driver.close() '';