-
Notifications
You must be signed in to change notification settings - Fork 298
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
Ako/80792/ end to end setup using playwright #7332
Ako/80792/ end to end setup using playwright #7332
Conversation
… ako/80792/playwright-setup
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
A production App ID was automatically generated for this PR. (log)
Click here to copy & paste above information.
|
Codecov Report
@@ Coverage Diff @@
## develop #7332 +/- ##
========================================
Coverage 19.40% 19.40%
========================================
Files 1478 1478
Lines 34569 34569
Branches 6366 6366
========================================
Hits 6709 6709
Misses 27349 27349
Partials 511 511 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
await this.page.waitForSelector( | ||
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__field' | ||
); | ||
await this.page.click( | ||
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__field' | ||
); | ||
|
||
await this.page.waitForSelector( | ||
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__field' | ||
); | ||
await this.page.click( | ||
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__field' | ||
); | ||
|
||
await this.page.waitForSelector( | ||
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__field' | ||
); |
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 these lines? 🤔
because in line 40 we are getting the target element and doing actions on it and for that parts we don't need to use WaitForElement
since playwright will wait for the element to be ready before performing any actions (according to the doc)
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.
as far as i understood this happens when we use page.locator
api, correct?
await this.page.click('.dc-themed-scrollbars > form > div:nth-child(6) > .dc-checkbox > .dc-checkbox__box'); | ||
} | ||
|
||
await this.page.waitForSelector('#deriv_app > #app_contents > .dc-themed-scrollbars > form > .dc-btn--primary'); |
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.
again we don't need to use waitForSelector
🚨 Lighthouse report for the changes in this PR:
Lighthouse ran with https://deriv-app-git-fork-ali-hosseini-deriv-ako-80792playwright-setup.binary.sx/ |
await this.signupPage.locator('input[name=email]#dm-email-input').type(this.email); | ||
process.env.email = this.email; | ||
await this.signupPage.waitForSelector( | ||
'.signup__Form-sc-1bdbun8-1 > ._signup-new__SignupContent-sc-1f1r3le-0 > label > .checkbox__CheckboxContainer-sc-r1zf4m-0 > .checkbox__StyledCheckbox-sc-r1zf4m-3' |
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'm not sure but AFAIK these generated hashed class names changes and when that happens your these tests will fail. is that correct?
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.
yess, you are right. i need to update them.
didn't notice that since they are auto generated
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.
done @shayan-deriv
would you please check one more time?
… ako/80792/playwright-setup
* fix: exit button issue * fix: hide currency selection modal if user has an mf mt5 account * fix: fixed an error in mobile mode and added isOnboardingVisited again * fix: remove toggleExitTradersHubModal action from traders-hub-store * fix: css styles * fix: currency selector for EU demo * fix: currency auto selecting first currency after refresh * fix: tradershub header issues on mobile * fix: multipliers_status_badge * fix: demo_low_risk flg in tradershub store * fix: add or remove modal * fix: reloading of account_switcher * chore: update currency switcher styles * chore: hide derivx for low_risk_cr_eu clients for real and demo * chore: update styles for currency switcher * fix: mt5 dashboard fix * fix: test cases * fix: test case * fix: fixed the alignment issue of password-selection-modal * fix: switching on exit traders modal * chore: show appropriate information on the account switcher in the old UI * fix: next button disabled in eu signup * fix: test case fix * fix: account switcher * fix: manage account in account switcher * fix: dxtrade error * fix: redirecting for traders_hub * fix: header traders hub cursor pointer * fix: acc switcher * fix: fixing issues of the tour guide * fix: change regulations to regulation * fix: regulations v2 * fix: icon and message * fix: cursor pointer for status badge * fix: mf real account signup width * fix: real account signup modal * fix: place of birth for eu * fix: tests * fix: fixed the scroll issue and added a new condition to tour guide * fix: removed the redundant line of trading-hub-header * fix: made a small change for the handle scroll function * fix: replaced interval with timeout * fix: hide idv for EU * fix: some capital characters * fix: signup modal title * fix: regulation compare table scroll smooth * fix: compare account modal * fix: responsive alignment * fix: fix popup content * fix: malta description fix and styles * fix: regulation responsive scroll * fix: compare account modal * fix: update jurisdiction content * fix: jurisdiction content * fix: get_more_btn * fix: regulators * fix: css for account type dropdown * fix: add options account for eu * fix: onboarding content desc * fix: onboarding content at stage 5 * fix: onboarding platform names * chore: hide region for new accounts * fix: add options account * fix: design-difference-in-transfer-popup * fix: regulator table scroll * fix: success modal meesage * fix: responsive scroll dashboard * fix: regulation switcher appearing for high risk * fix: 86699_stock_to_stocks * fix: fix add new account * fix: traders hub header dark theme icon * fix: tooltip description for non-eu * fix: dropdown icon for onboarding currency switcher * fix: add short code text for derived and financial accounts * fix: eu currency switcher showing in non-eu * fix: change dmt5 to deriv mt5 in total assets * fix: cfd learn more link * test: fix tests * fix: dark_mode_status_badge * fix: add icon for deriv and financial accounts in receipt * refactor: code refactoring * fix: transfer now to top-up now * fix: total assets to be shown based on selected region * fix: total assets to be shown based on selected region * fix: loginid error on logout * fix: show popover in mobile * fix: disable click on tourguide overlay and remove setting accountType on tour guide * fix: onboarding footer * fix: test failure * fix: fixed the background color issue of onboarding in dark theme * fix: region seitcher in mobile view * fix: fixed the glitch issue with onboarding * fix: fixed the issue of tour guide * fix: dont show loader if user has no account when switching * fix: deposit now style in cashier transfer modal * fix: dashboard title size * fix: decreased the delays * fix: redirect to static pages * fix: fixed the localization issue of tour guide * fix: remove balance when account has mt5 status * fix: regulation switcher glitch in high risk * fix: onboarding labels * fix: pointer display * fix: status badge icon overflow and total assets currency in dark theme * fix: success_message * fix: minor issues in contents * fix: account from field should be tha same as trading account * trigger codecov * fix: top-up to transfer * fix: switch account to real for demo_low_risk * fix: can create deriv x account if user has no cr account and status badge icon css * fix: status badge color inconsistency and size * fix: deriv x trade modal huawei css * fix: jurisdiction modal content * Account fix selected to (#27) * fix: default selected to account * fix: account transfer switch to default client acc * fix: onboarding footer text padding * fix: real account needed modal for mt5 if user has no cr account * fix: eu onboarding footer * fix: redirect_to_traders_hub_on_entering_mt5_url * fix: redirect derivx url * fix: icon design mismatch (#26) * fix: simplified the conditions * test: fix test * fix: fixed all conflicts * refactor: code refactoring * fix: salutation * fix: short code visibility * fix: fix short code visibility * refactor: code refactoring * fix: remove icon for derivx trade modal * fix: fixed the issue where is_pre_appstore was retrived from another place * fix: add Assets alias to webpack/tsconfig, refactor imports * test: fix jest config * fix: default page should be demo in onboarding * fix: freeze_mg_acc_on_cooling_perios * fix: onboarding buttons * fix: transfer_form_from_account_style * fix: mt5 trade modal css alignment * chore: hide disclaimer for low-risk clients * fix: notification console error * chore: add volatility in regulator modal * fix: account_transfer_title * chore: add disclamer to low risk eu * fix: asterik_on_required_fields * fix: adding loader to total asset balance on switching * fix: loader * fix: loader console error * fix: regulation switcher glitch when switching * fix: add back react content loader * fix: safari styling shiii * fix: close button on on boarding * fix: Trader's hub title * fix: disclaimer text change * fix: all dem loaders * fix: up/dpwn icon * fix: dmt5 paswrd * fix: low_risk flag in dbot * fix: fix layout shift on safari * fix: servererror component fix * fix: circleci and typo * fix: header loader * fix: investor password * fix: merge conflicts --------- Co-authored-by: amina-deriv <amina@deriv.com> Co-authored-by: mahdiyeh-deriv <82078941+mahdiyeh-deriv@users.noreply.github.com> Co-authored-by: Thisyahlen <thisyahlen@regentmarkets.com> Co-authored-by: Hirad <hirad@re-work.dev> Co-authored-by: mahdiyeh-fs <mahdiyeh@firstsource.tech> Co-authored-by: Jim Daniels Wasswa <jim@deriv.com> Co-authored-by: Thisyahlen Nair <thisyahlennair@Thisyahlens-MacBook-Pro.local> Co-authored-by: Bahar <bahar@regentmarkets.com> Co-authored-by: george-usynin-binary <heorhi@binary.com> Co-authored-by: GeorgeUsynin <70709786+GeorgeUsynin@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>
* fix: exit modal fix * chore: empty commit to trigger vercel deployment --------- Co-authored-by: Matin shafiei <matin@deriv.com>
Co-authored-by: Yashim Wong <yashim@deriv.com>
* fix: cfd listing * chore: empty commit to trigger vercel deployment --------- Co-authored-by: Matin shafiei <matin@deriv.com>
… ako/80792/playwright-setup
⏳ Generating Lighthouse report... |
855c237
to
6058e8f
Compare
…o ako/80792/playwright-setup
Kudos, SonarCloud Quality Gate passed! |
closing this and opening a new PR because of lots of unneeded changes included in this one. |
Changes:
When you need to add unit test
When you need to add integration test
Test coverage checklist (for reviewer)
Type of change