-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add comments about manual test results to social login testcases * add prod url to playground .env * progress * fix existing social login test * prettier * add social login tests * prettier * add comment about setting different timeout for microsoft social login tests
- Loading branch information
Showing
8 changed files
with
147 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
packages/tests-e2e/src/models/corbado-auth-blocks/socialLogin.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import type { Page } from '@playwright/test'; | ||
import { expect } from '@playwright/test'; | ||
|
||
export const socialLogin = async (page: Page, email: string, password: string) => { | ||
await page.getByTitle(`Continue with Microsoft`).click(); | ||
await expect(page.getByRole('heading', { level: 1 })).toHaveText('Sign in'); | ||
|
||
await page.getByRole('textbox', { name: 'email' }).click(); | ||
await page.getByRole('textbox', { name: 'email' }).fill(email); | ||
await expect(page.getByRole('textbox', { name: 'email' })).toHaveValue(email); | ||
|
||
await page.getByRole('button', { name: 'Next' }).click(); | ||
await expect(page.getByRole('heading', { level: 1 })).toHaveText('Enter password'); | ||
|
||
await page.getByPlaceholder('Password').click(); | ||
await page.getByPlaceholder('Password').fill(password); | ||
await expect(page.getByPlaceholder('Password')).toHaveValue(password); | ||
|
||
await page.getByRole('button', { name: 'Sign in' }).click(); | ||
await expect(page.getByRole('heading', { level: 1 })).toHaveText('Stay signed in?'); | ||
|
||
await page.getByRole('button', { name: 'No' }).click(); | ||
}; | ||
|
||
export const repeatSocialLogin = async (page: Page) => { | ||
await page.getByTitle(`Continue with Microsoft`).click(); | ||
await expect(page.getByRole('heading', { level: 1 })).toHaveText('Let this app access your info? (1 of 1 apps)'); | ||
|
||
await page.getByRole('button', { name: 'Accept' }).click(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
REACT_APP_CORBADO_PROJECT_ID_ManualTesting=pro-3652881945085154854 | ||
REACT_APP_CORBADO_PROJECT_ID_LocalDevelopment=pro-2 | ||
# REACT_APP_CORBADO_FRONTEND_API_URL_SUFFIX=frontendapi.corbado.io | ||
|
||
# REACT_APP_CORBADO_FRONTEND_API_URL_SUFFIX=frontendapi.cloud.corbado-staging.io | ||
REACT_APP_CORBADO_FRONTEND_API_URL_SUFFIX=frontendapi.corbado-dev.io | ||
REACT_APP_CORBADO_FRONTEND_API_URL_SUFFIX=frontendapi.cloud.corbado-staging.io | ||
# REACT_APP_CORBADO_FRONTEND_API_URL_SUFFIX=frontendapi.corbado-dev.io | ||
# REACT_APP_CORBADO_FRONTEND_API_URL_SUFFIX=frontendapi.corbado.io |