-
Notifications
You must be signed in to change notification settings - Fork 7
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
Playwright test for ReefKnot #203
base: main
Are you sure you want to change the base?
Conversation
|
ff82a50
to
2957649
Compare
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.
Good work, but there are some issues with texts that make it difficult to read and understand the meaning. It is totally okay to use Google Translate or ChatGPT to translate and improve texts.
playwright-tests/README.md
Outdated
# <img src="logo.svg" alt='Reef Knot logo' height='45' align='top'/> Reef-Knot. Playwright test | ||
|
||
## ❖ Installation | ||
1. Install dependencies from `/plyawright-tests` folder |
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.
1. Install dependencies from `/plyawright-tests` folder | |
1. Install dependencies from the `/playwright-tests` directory: |
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.
Thank you, fixed
playwright-tests/README.md
Outdated
``` | ||
yarn && yarn playwright install chromium | ||
``` | ||
1. Fill the `.env` with `.env.example` in the `/playwright-tests` folder |
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.
1. Fill the `.env` with `.env.example` in the `/playwright-tests` folder | |
1. Fill the `.env` file in the `/playwright-tests` folder using the `.env.example` file as a template. |
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.
Thank you, fixed
playwright-tests/README.md
Outdated
## ❖ How to run tests from deployed stand? | ||
1. Set up the `.env` variable: `STAND_TYPE=stand` | ||
2. Run command from `/plyawright-tests` folder: `yarn test:reef-knot` | ||
|
||
## ❖ How to run tests from localhost? | ||
1. Run `reef-knot` stand on the localhost | ||
2. Check the localhost link in the `/playwright-tests/config/env.config.ts` => `STAND_LINK.localhost` (_default value is http://localhost:3000_) | ||
3. Set up the `.env` variable: `STAND_TYPE=localhost` | ||
4. Run command from `/plyawright-tests` folder: `yarn test:reef-knot` |
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.
## ❖ How to run tests from deployed stand? | |
1. Set up the `.env` variable: `STAND_TYPE=stand` | |
2. Run command from `/plyawright-tests` folder: `yarn test:reef-knot` | |
## ❖ How to run tests from localhost? | |
1. Run `reef-knot` stand on the localhost | |
2. Check the localhost link in the `/playwright-tests/config/env.config.ts` => `STAND_LINK.localhost` (_default value is http://localhost:3000_) | |
3. Set up the `.env` variable: `STAND_TYPE=localhost` | |
4. Run command from `/plyawright-tests` folder: `yarn test:reef-knot` | |
## ❖ How to run tests on a Deployed Stand | |
1. Set up the `.env` variable: `STAND_TYPE=stand` | |
2. Navigate to the `/playwright-tests` folder and run: `yarn test:reef-knot` | |
## ❖ How to run tests on Localhost | |
1. Start the `reef-knot` demo app on your local machine: `yarn run dev` | |
2. Verify the localhost link in `/playwright-tests/config/env.config.ts`, see the `STAND_LINK.localhost` property (_default value is http://localhost:3000_) | |
3. Set the `.env` variable: `STAND_TYPE=localhost` | |
4. Navigate to the `/playwright-tests` directory and run: `yarn test:reef-knot` |
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.
Thank you, fixed
// If contextDataDir is undefined - will be created temp dir for context data. | ||
// Else contextDataDir is not undefined - will be created user dir for context data in current folder. |
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.
// If contextDataDir is undefined - will be created temp dir for context data. | |
// Else contextDataDir is not undefined - will be created user dir for context data in current folder. | |
// If contextDataDir is undefined, a temporary directory will be created for storing context data. | |
// If contextDataDir is defined, a user-specific directory will be created in the current folder for context data. |
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.
Thank you, fixed
// If fork was started we send to browserContextService set up separately context | ||
// but, if fork wasn't started we send custom directory for create share context. |
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.
Please, rewright the comment using some kind of translator or remove it. The comment is not really helpful in its current state.
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.
removed 👌
async disconnectWalletForce() { | ||
await test.step('Forcefully disconnect wallet', async () => { | ||
await this.page.evaluate(() => { | ||
// Get all localStorage keys |
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.
This is obvious.
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.
removed
await test.step('Check the stand appearance before wallet connection', async () => { | ||
await expect( | ||
reefKnotPage.statsBlock.mainComponent, | ||
'Expected the statistic block is not displayed before wallet connection', |
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.
This sentence is not grammatically correct and hard to understand. Please, fix it using Google translate, ChatGPT or something similar. This also applies to other sentences in this file.
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.
Thank you. I fixed all assert descriptions in all test files
forbidOnly: !!process.env.CI, | ||
retries: 1, | ||
workers: 1, | ||
reporter: REPORT_CONFIG(), |
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.
REPORT_CONFIG function must be a lowercase
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.
fixed
Notes:
/playwright-tests
folderworkflow
for the run tests on the deployed ReefKnot standqase.reporter
for save report