-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add global setup in playwright config
- Loading branch information
Showing
7 changed files
with
10 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ test.describe("Admin user create quiz item", () => { | |
await expect(submitLocator).toHaveText("SIGN IN"); | ||
|
||
// Fill username and password | ||
// TODO: should move the user and password in the .env | ||
await emailLocator.fill("[email protected]"); | ||
await passwordLocator.fill("123"); | ||
await submitLocator.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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,7 @@ test.describe("Existed user take exam", () => { | |
const submitLocator = await page.locator("input[type='submit']"); | ||
await expect(submitLocator).toHaveText("SIGN IN"); | ||
// Fill username and password | ||
// TODO: should move the user and password in the .env | ||
emailLocator.fill("[email protected]"); | ||
passwordLocator.fill("123"); | ||
await submitLocator.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
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,4 @@ | ||
export default async function globalTeardown() { | ||
console.log("B Y E !"); | ||
// You can add additional cleanup logic here if needed | ||
} |