Skip to content

Commit 2700eed

Browse files
committed
chore: Remove E2E tests for silent auth
1 parent e88f1b3 commit 2700eed

File tree

2 files changed

+1
-92
lines changed

2 files changed

+1
-92
lines changed

src/e2e/pages/authPage.ts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -71,34 +71,4 @@ export class AuthPage {
7171
expect(verificationCode).toBeDefined();
7272
await this.enterVerificationCode(verificationCode as string);
7373
}
74-
75-
async signInToFxA(email: string, password: string) {
76-
await this.page.goto(process.env.FXA_SETTINGS_URL as string);
77-
await this.page.context().clearCookies();
78-
await this.page
79-
.locator("//input[@type='password'] | //div/input[@type='email']")
80-
.waitFor({ state: "visible" });
81-
const visible = await this.useDifferentEmailButton.isVisible();
82-
if (visible) {
83-
await this.useDifferentEmailButton.click();
84-
await this.page.waitForURL(/^(?!.*signin).*/);
85-
}
86-
87-
// enter email
88-
await this.emailInputField.fill(email);
89-
await this.continueButton.click();
90-
await this.page.waitForURL(/^(?!.*signin).*/);
91-
92-
// enter password
93-
await this.passwordInputField.fill(password);
94-
await this.continue({ waitForURL: process.env.FXA_SETTINGS_URL });
95-
}
96-
97-
async initSilentAuth() {
98-
await this.page.goto(
99-
`${process.env.E2E_TEST_BASE_URL as string}/?utm_source=moz-account&utm_campaign=settings-promo&utm_content=monitor-free`,
100-
);
101-
// FxA can take a while to load on stage:
102-
await this.page.waitForURL("**/oauth/**");
103-
}
10474
}

src/e2e/specs/auth.spec.ts

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ test.describe(`${process.env.E2E_TEST_ENV} - Authentication flow verification @s
4545
landingPage,
4646
dashboardPage,
4747
}, testInfo) => {
48-
// speed up test by ignoring non-necessary requests
48+
// speed up test by ignore non necessary requests
4949
await page.route(/(analytics)/, async (route) => {
5050
await route.abort();
5151
});
@@ -68,65 +68,4 @@ test.describe(`${process.env.E2E_TEST_ENV} - Authentication flow verification @s
6868
},
6969
);
7070
});
71-
72-
test("Verify successful silent authentication with existing user", async ({
73-
page,
74-
authPage,
75-
dashboardPage,
76-
}, testInfo) => {
77-
// speed up test by ignoring non-necessary requests
78-
await page.route(/(analytics)/, async (route) => {
79-
await route.abort();
80-
});
81-
82-
// login to FxA
83-
await authPage.signInToFxA(
84-
process.env.E2E_TEST_ACCOUNT_EMAIL as string,
85-
process.env.E2E_TEST_ACCOUNT_PASSWORD as string,
86-
);
87-
88-
// start authentication flow
89-
await authPage.initSilentAuth();
90-
91-
// assert successful login
92-
await expect(dashboardPage.fixedTab).toBeVisible();
93-
await expect(dashboardPage.actionNeededTab).toBeVisible();
94-
95-
await testInfo.attach(
96-
`${process.env.E2E_TEST_ENV}-silent-authentication-monitor-dashboard.png`,
97-
{
98-
body: await page.screenshot(),
99-
contentType: "image/png",
100-
},
101-
);
102-
});
103-
104-
test("Verify failed silent authentication with existing user", async ({
105-
page,
106-
authPage,
107-
dashboardPage,
108-
}, testInfo) => {
109-
// speed up test by ignoring non-necessary requests
110-
await page.route(/(analytics)/, async (route) => {
111-
await route.abort();
112-
});
113-
114-
// start authentication flow
115-
await authPage.initSilentAuth();
116-
117-
// sign in
118-
await authPage.signIn(process.env.E2E_TEST_ACCOUNT_EMAIL as string);
119-
120-
// assert successful login
121-
await expect(dashboardPage.fixedTab).toBeVisible();
122-
await expect(dashboardPage.actionNeededTab).toBeVisible();
123-
124-
await testInfo.attach(
125-
`${process.env.E2E_TEST_ENV}-silent-authentication-monitor-dashboard.png`,
126-
{
127-
body: await page.screenshot(),
128-
contentType: "image/png",
129-
},
130-
);
131-
});
13271
});

0 commit comments

Comments
 (0)