-
Notifications
You must be signed in to change notification settings - Fork 5
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
New automation tests #1080
base: develop
Are you sure you want to change the base?
New automation tests #1080
Conversation
eslint.config.mjs
Outdated
@@ -0,0 +1,13 @@ | |||
import globals from "globals"; |
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.
Could you please tell me why we need 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.
this file shouldn't be here, will update in next PR
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 remove it in this PR
package.json
Outdated
"eslint-plugin-react-hooks": "4.6.0", | ||
"file-loader": "^6.2.0", | ||
"fs-extra": "11.2.0", | ||
"globals": "^15.11.0", |
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.
what does this package do?
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.
probably was added when installing and trying to fix issue with eslint. Will try to clean it up
package.json
Outdated
@@ -167,6 +169,7 @@ | |||
"ts-node": "10.9.1", | |||
"tsconfig-paths-webpack-plugin": "^4.1.0", | |||
"typescript": "5.4.5", | |||
"typescript-eslint": "^8.9.0", |
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.
do we need this?
package.json
Outdated
@@ -110,6 +110,7 @@ | |||
"@babel/preset-env": "7.23.2", | |||
"@babel/preset-react": "7.18.6", | |||
"@babel/preset-typescript": "^7.23.3", | |||
"@eslint/js": "^9.12.0", |
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.
do we need this?
README.md
Outdated
@@ -160,7 +160,7 @@ You should install Redux DevTools browser extension and connect it to Redux DevT | |||
|
|||
Write tests into `e2e-tests` folder. | |||
|
|||
To run e2e tests, you must use npm script `npm run e2e:chrome:ui:popup` or `e2e:chrome:ui:onboarding`. | |||
To run e2e tests, you must use npm script `` or `e2e:chrome:ui:onboarding`.npm run e2e:chrome:ui:popup |
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.
I guess there is an error
); | ||
|
||
popup( | ||
'negative review flow - go to home page', |
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.
the same
await unlockVault(); | ||
|
||
await popupPage.route(URLS.rpc, route => | ||
route.fulfill(RPC_RESPONSE.success) | ||
); | ||
|
||
await new Promise(r => setTimeout(r, 5000)); | ||
|
||
await popupPage.getByText('Send').click(); | ||
|
||
await popupExpect( | ||
popupPage.getByRole('heading', { name: 'Select token and account' }) | ||
).toBeVisible(); | ||
|
||
await popupPage.getByRole('button', { name: 'Next' }).click(); | ||
|
||
await popupExpect( | ||
popupPage.getByRole('heading', { name: 'Specify recipient' }) | ||
).toBeVisible(); | ||
|
||
await popupExpect( | ||
popupPage.getByRole('button', { name: 'Next' }) | ||
).toBeDisabled(); | ||
|
||
await popupPage | ||
.getByPlaceholder('Public key or name', { exact: true }) | ||
.fill(DEFAULT_SECOND_ACCOUNT.publicKey); | ||
|
||
await popupExpect( | ||
popupPage.getByText(DEFAULT_SECOND_ACCOUNT.mediumTruncatedPublicKey, { | ||
exact: true | ||
}) | ||
).toBeVisible(); | ||
|
||
await popupPage | ||
.getByText(DEFAULT_SECOND_ACCOUNT.mediumTruncatedPublicKey, { | ||
exact: true | ||
}) | ||
.click(); | ||
|
||
await popupPage.getByRole('button', { name: 'Next' }).click(); | ||
|
||
await popupExpect( | ||
popupPage.getByRole('heading', { name: 'Enter amount' }) | ||
).toBeVisible(); | ||
|
||
await popupPage.getByRole('button', { name: 'Next' }).click(); | ||
|
||
await popupExpect( | ||
popupPage.getByRole('heading', { name: 'Confirm sending' }) | ||
).toBeVisible(); | ||
|
||
await popupExpect( | ||
popupPage.getByText(DEFAULT_SECOND_ACCOUNT.publicKey) | ||
).toBeVisible(); | ||
|
||
await popupExpect( | ||
popupPage.getByRole('button', { name: 'Confirm send' }) | ||
).toBeDisabled(); | ||
|
||
// Scroll to the bottom | ||
await popupPage.evaluate(() => { | ||
const container = document.querySelector('#ms-container'); | ||
|
||
container?.scrollTo(0, 1000); | ||
}); | ||
|
||
await popupExpect( | ||
popupPage.getByRole('button', { name: 'Confirm send' }) | ||
).not.toBeDisabled(); | ||
|
||
await popupPage.getByRole('button', { name: 'Confirm send' }).click(); | ||
|
||
await popupExpect( | ||
popupPage.getByRole('heading', { name: 'You submitted a transaction' }) | ||
).toBeVisible(); | ||
|
||
await popupPage.getByRole('button', { name: 'Done' }).click(); |
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 code is used 3 times in this file. Maybe try to reuse it somehow and not duplicate
} | ||
); | ||
popup( | ||
'should display safety tips', |
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.
I don't think that this test is useful. Here you test UI text and no functionality
); | ||
|
||
popup( | ||
'should timeout after providing wrong password 5 times', |
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.
we already have a test for locking the wallet for 5 minutes when the user types the wrong password 5 times
common/wallet.spec.ts
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.
yes, but I wanted to include it in other fields which require password
await popupExpect( | ||
popupPage.getByTestId('network-switcher').getByRole('img') | ||
).toBeVisible(); |
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.
why did you check this? it does not apply to this test
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.
I added it only to make sure that user is logged in
Also, please check why tests failed on github |
Description
Tests added
Small improvements and fixes across the tests.
Fixed issue with not always loading CSPR value for tests which use transaction
Linked tickets
No active tickets were created for test automation