Fix E2E tests for login
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
bc6c0e0448
commit
4eb15b5ebf
@ -169,7 +169,8 @@ e2e:
|
|||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 2 days
|
expire_in: 2 days
|
||||||
paths:
|
paths:
|
||||||
- js/playwright-report
|
- js/playwright-report/
|
||||||
|
- js/test-results/
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
@ -100,12 +100,7 @@
|
|||||||
}"
|
}"
|
||||||
>{{ t("Didn't receive the instructions?") }}</o-button
|
>{{ t("Didn't receive the instructions?") }}</o-button
|
||||||
>
|
>
|
||||||
<p
|
<p class="control" v-if="canRegister">
|
||||||
class="control"
|
|
||||||
v-if="
|
|
||||||
config && config.registrationsOpen && config.registrationsAllowlist
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<o-button
|
<o-button
|
||||||
tag="router-link"
|
tag="router-link"
|
||||||
variant="text"
|
variant="text"
|
||||||
@ -171,6 +166,13 @@ const { result: configResult } = useQuery<{
|
|||||||
|
|
||||||
const config = computed(() => configResult.value?.config);
|
const config = computed(() => configResult.value?.config);
|
||||||
|
|
||||||
|
const canRegister = computed(() => {
|
||||||
|
return (
|
||||||
|
(config.value?.registrationsOpen || config.value?.registrationsAllowlist) &&
|
||||||
|
config.value?.auth.databaseLogin
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
const errors = ref<string[]>([]);
|
const errors = ref<string[]>([]);
|
||||||
const submitted = ref(false);
|
const submitted = ref(false);
|
||||||
|
|
||||||
|
@ -14,7 +14,9 @@ test("Login has everything we need", async ({ page }) => {
|
|||||||
hasText: "Didn't receive the instructions?",
|
hasText: "Didn't receive the instructions?",
|
||||||
});
|
});
|
||||||
|
|
||||||
const registerLink = page.locator("a", { hasText: "Create an account" });
|
const registerLink = page.locator("a > span > span", {
|
||||||
|
hasText: "Create an account",
|
||||||
|
});
|
||||||
|
|
||||||
await expect(forgotPasswordLink).toBeVisible();
|
await expect(forgotPasswordLink).toBeVisible();
|
||||||
await expect(reAskInstructionsLink).toBeVisible();
|
await expect(reAskInstructionsLink).toBeVisible();
|
||||||
|
Loading…
Reference in New Issue
Block a user