From c05a5829f0b17875e48a60181640a0c80f813ca4 Mon Sep 17 00:00:00 2001 From: Sam Date: Sun, 26 Feb 2023 18:57:35 +0100 Subject: [PATCH] update end2end tests --- e2e/test_registration.py | 4 +++- e2e/utils.py | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/e2e/test_registration.py b/e2e/test_registration.py index 5279972d..24e8f3d1 100644 --- a/e2e/test_registration.py +++ b/e2e/test_registration.py @@ -16,13 +16,15 @@ class TestRegistration: selenium.implicitly_wait(1) inputs = selenium.find_elements(By.TAG_NAME, 'input') - assert len(inputs) == 4 + assert len(inputs) == 5 assert inputs[0].get_attribute('id') == 'username' assert inputs[0].get_attribute('type') == 'text' assert inputs[1].get_attribute('id') == 'email' assert inputs[1].get_attribute('type') == 'email' assert inputs[2].get_attribute('id') == 'password' assert inputs[2].get_attribute('type') == 'password' + assert inputs[4].get_attribute('id') == 'accepted_policy' + assert inputs[4].get_attribute('type') == 'checkbox' form_infos = selenium.find_elements(By.CLASS_NAME, 'form-info') assert len(form_infos) == 3 diff --git a/e2e/utils.py b/e2e/utils.py index 22b4617f..795f865f 100644 --- a/e2e/utils.py +++ b/e2e/utils.py @@ -32,6 +32,8 @@ def register(selenium, user): email.send_keys(user.get('email')) password = selenium.find_element(By.ID, 'password') password.send_keys(user.get('password')) + accepted_policy = selenium.find_element(By.ID, 'accepted_policy') + accepted_policy.click() submit_button = selenium.find_element(By.TAG_NAME, 'button') submit_button.click()