-
Notifications
You must be signed in to change notification settings - Fork 1
Web add invite external flow #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MarcWadai
wants to merge
3
commits into
main
Choose a base branch
from
web-add-invite-external-flow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,96 @@ | ||
| /** | ||
| The new file playwright.ci.config.ts only add a webserver config to start during a web CI action run. | ||
| It will replace the standard playwirght config during the trigger of the action | ||
| */ | ||
|
|
||
| import { defineConfig, devices } from '@playwright/test'; | ||
| import dotenv from 'dotenv'; | ||
| import { BROWSER_LOCALE } from './utils/config'; | ||
| import path from 'path'; | ||
|
|
||
| // Determine which environment to use | ||
| const env = process.env.ENV || 'local'; | ||
| console.log(`Loading environment configuration for: ${env}`); | ||
|
|
||
| // Load environment variables from the appropriate .env file | ||
| dotenv.config({ path: path.resolve(__dirname, `.env.${env}`) }); | ||
|
|
||
| console.log('[playwright conf] process.env', process.env); | ||
| /** | ||
| * See https://playwright.dev/docs/test-configuration | ||
| */ | ||
| export default defineConfig({ | ||
| testDir: './tests', | ||
| /* Maximum time one test can run for */ | ||
| timeout: 15 * 1000, | ||
| /* Run tests in files in parallel */ | ||
| fullyParallel: process.env.TEST_IN_PARALLEL === 'true', | ||
|
|
||
| /* Define how many workers */ | ||
| // Limit the number of workers on CI, use default locally | ||
| workers: process.env.CI ? 2 : 1, | ||
|
|
||
| /* Fail the build on CI if you accidentally left test.only in the source code. */ | ||
| forbidOnly: !!process.env.CI, | ||
|
|
||
| retries: process.env.CI ? 2 : 2, | ||
| /* Reporter to use */ | ||
| reporter: 'html', | ||
| /* Shared settings for all the projects below */ | ||
| use: { | ||
| /* Base URL to use in actions like `await page.goto('/')` */ | ||
| baseURL: process.env.MAS_URL || 'https://auth.tchapgouv.com', | ||
|
|
||
| /* Set locale to French */ | ||
| locale: BROWSER_LOCALE, | ||
|
|
||
| /* Collect trace when retrying the failed test */ | ||
| trace: 'on-first-retry', | ||
|
|
||
| /* Take screenshot on failure */ | ||
| screenshot: 'only-on-failure', | ||
|
|
||
| /* Record video on failure */ | ||
| video: 'on-first-retry', | ||
|
|
||
| /* Ignore HTTPS errors */ | ||
| ignoreHTTPSErrors: true, | ||
| }, | ||
|
|
||
| /* Configure projects for major browsers */ | ||
| projects: [ | ||
| /* e2e tests do not work well on firefox nor webkit (bit flaky) | ||
| { | ||
| name: 'firefox', | ||
| use: { ...devices['Desktop Firefox'] }, | ||
| }, | ||
| { | ||
| name: 'webkit', | ||
| use: { ...devices['Desktop Edge'] }, | ||
| }, | ||
| */ | ||
|
|
||
| /* when using archlinux to use ui testing, bundled browser are not correctly installed | ||
| Directly use the installed chromium | ||
| { | ||
| name: "chromium", | ||
| use: { ...devices["Desktop Chrome"], | ||
| launchOptions: { | ||
| executablePath: "/usr/bin/chromium", | ||
| }, | ||
| }, | ||
| }, | ||
| }, | ||
|
|
||
| */ | ||
| { | ||
| name: 'chromium', | ||
| use: { ...devices['Desktop Chrome'] }, | ||
| }, | ||
| ], | ||
| webServer: { | ||
| // use the dist folder to start devserver in CI | ||
| command: 'npx serve dist -l 8088', | ||
| port: 8088, | ||
| }, | ||
| }); |
This file contains hidden or 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,10 +1,16 @@ | ||
| import { defineConfig, devices } from '@playwright/test'; | ||
| import dotenv from 'dotenv'; | ||
| import { BROWSER_LOCALE } from './utils/config'; | ||
| import path from 'path'; | ||
|
|
||
| // Load environment variables from .env file | ||
| dotenv.config(); | ||
| // Determine which environment to use | ||
| const env = process.env.ENV || 'local'; | ||
| console.log(`Loading environment configuration for: ${env}`); | ||
|
|
||
| // Load environment variables from the appropriate .env file | ||
| dotenv.config({ path: path.resolve(__dirname, `.env.${env}`) }); | ||
|
|
||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Move initialization of dotenv config on one place only (at the higher call) |
||
| console.log('[playwright conf] process.env', process.env); | ||
| /** | ||
| * See https://playwright.dev/docs/test-configuration | ||
| */ | ||
|
|
@@ -57,6 +63,20 @@ export default defineConfig({ | |
| use: { ...devices['Desktop Edge'] }, | ||
| }, | ||
| */ | ||
|
|
||
| /* when using archlinux to use ui testing, bundled browser are not correctly installed | ||
| Directly use the installed chromium | ||
| { | ||
| name: "chromium", | ||
| use: { ...devices["Desktop Chrome"], | ||
| launchOptions: { | ||
| executablePath: "/usr/bin/chromium", | ||
| }, | ||
| }, | ||
| }, | ||
| }, | ||
|
|
||
| */ | ||
| { | ||
| name: 'chromium', | ||
| use: { ...devices['Desktop Chrome'] }, | ||
|
|
||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ import type { Page } from '@playwright/test'; | |
| //this scenario is one big test to cover all the scenario on a not MAS synapse (dev02 - a) and one MAS synapse (ext01 - e) | ||
|
|
||
| // Helper function to create a public room | ||
| async function createPublicRoom(page: Page, roomName: string): Promise<string> { | ||
| export async function createPublicRoom(page: Page, roomName: string): Promise<string> { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expose the room creation fonction, since it will be used in lot of places |
||
| const appPage = new TchapAppPage(page); | ||
| await page.getByRole('button', { name: 'Ajouter', exact: true }).click(); | ||
| await page.getByRole('menuitem', { name: 'Nouveau salon', exact: true }).click(); | ||
|
|
@@ -33,7 +33,7 @@ async function createPublicRoom(page: Page, roomName: string): Promise<string> { | |
| } | ||
|
|
||
| // Helper function to create an encrypted private room | ||
| async function createEncryptedPrivateRoom(page: Page, roomName: string): Promise<string> { | ||
| export async function createEncryptedPrivateRoom(page: Page, roomName: string): Promise<string> { | ||
| const appPage = new TchapAppPage(page); | ||
| await page.getByRole('button', { name: 'Ajouter', exact: true }).click(); | ||
| await page.getByText('Nouveau salon').click(); | ||
|
|
@@ -57,7 +57,7 @@ async function createEncryptedPrivateRoom(page: Page, roomName: string): Promise | |
| } | ||
|
|
||
| // Helper function to create an unencrypted private room | ||
| async function createUnencryptedPrivateRoom(page: Page, roomName: string): Promise<string> { | ||
| export async function createUnencryptedPrivateRoom(page: Page, roomName: string): Promise<string> { | ||
| const appPage = new TchapAppPage(page); | ||
| await page.getByRole('button', { name: 'Ajouter', exact: true }).click(); | ||
| await page.getByText('Nouveau salon').click(); | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO : clean up the users only after the tests finish running. Will be good to delete also room creation