diff --git a/src/gafaelfawr/templates/new_token.html b/src/gafaelfawr/templates/new_token.html index 3e0c1cddb..902bf0adc 100644 --- a/src/gafaelfawr/templates/new_token.html +++ b/src/gafaelfawr/templates/new_token.html @@ -22,14 +22,14 @@

Download Token

Token Scopes

{% for scope in scopes %} -
+
{{ form[scope](class="form-check-input") }} {{ form[scope].label(class="form-check-label") }}
-
+
{{ form[scope].description }}
diff --git a/src/gafaelfawr/templates/tokens.html b/src/gafaelfawr/templates/tokens.html index 0925d4bee..82c2dc9a8 100644 --- a/src/gafaelfawr/templates/tokens.html +++ b/src/gafaelfawr/templates/tokens.html @@ -35,13 +35,13 @@

Personal access tokens

{% for token in tokens %} {% set form=forms[token.key] %} -
+
{{ form.method_(value="DELETE") }}
-
@@ -51,7 +51,7 @@

Personal access tokens


Scope: - + {{ token.scope }} diff --git a/tests/pages/tokens.py b/tests/pages/tokens.py index fc6597bb9..d311776c1 100644 --- a/tests/pages/tokens.py +++ b/tests/pages/tokens.py @@ -23,7 +23,7 @@ def form(self) -> WebElement: def scopes(self) -> List[ScopeRow]: return [ ScopeRow(e) - for e in self.find_elements_by_class_name("token-scope") + for e in self.find_elements_by_class_name("qa-token-scope") ] async def submit(self) -> None: @@ -46,7 +46,8 @@ def new_token(self) -> Optional[str]: @property def tokens(self) -> List[TokenRow]: return [ - TokenRow(e) for e in self.find_elements_by_class_name("token-row") + TokenRow(e) + for e in self.find_elements_by_class_name("qa-token-row") ] async def click_create_token(self) -> None: @@ -61,7 +62,7 @@ def checkbox(self) -> WebElement: @property def description(self) -> str: - return self.find_element_by_class_name("scope-description").text + return self.find_element_by_class_name("qa-scope-description").text @property def label(self) -> str: @@ -80,4 +81,4 @@ def link(self) -> str: @property def scope(self) -> str: - return self.find_element_by_class_name("token-scope").text + return self.find_element_by_class_name("qa-token-scope").text