-
Notifications
You must be signed in to change notification settings - Fork 8
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
Beds 982/login tests #1168
Beds 982/login tests #1168
Conversation
Deploying beaconchain with Cloudflare Pages
|
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 so far, thx for making such good progress in such a short amount of time 💪
frontend/package-lock.json
Outdated
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.
reminder:
package-lock.json has to be removed and recreated before merging, as other parts might have changed in the meantime
backButton: (page: Page) => page.locator("text=Back"), | ||
continueNetworkButton: (page: Page) => page.getByRole("button", { name: "Continue" }), | ||
|
||
clickContinue: async (page: 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.
would be nice if we use the most generic form of our app behaviour
, which does not rely on the users device
.
Do I really click
on a mobile device
?
What if I tell alexa
or siri
that I want to do something specific....if tests could be reduced to the actual behavioural pattern
we will have the most resilient
tests
clickContinue: async (page: Page) => { | |
continue: async (page: Page) => { |
errorPassword: (page: Page) => page.locator(".p-error").nth(1), | ||
toastMessage: (page: Page) => page.locator(".p-toast-message-error"), | ||
|
||
login: async (page: Page, userEmail: string, userPassword: string) => { |
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.
haha an alltime classic
...I guess we should change our button
in frontend as well, shouldn't we?
https://ux.stackexchange.com/questions/1080/using-sign-in-vs-using-log-in
|
||
export const BasePage = { | ||
goto: async (page: Page, endpoint: string) => { | ||
await page.goto("https://v2-staging-mainnet.beaconcha.in" + endpoint); |
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 this should suffice, if we set the base url
in the config
await page.goto("https://v2-staging-mainnet.beaconcha.in" + endpoint); | |
await page.goto(endpoint); |
frontend/tests/playwright.config.ts
Outdated
import dotenv from 'dotenv'; | ||
import path from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
|
||
dotenv.config({ path: path.resolve(__dirname, './tests/.env') }); |
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.
import dotenv from 'dotenv'; | |
import path from 'path'; | |
import { fileURLToPath } from 'url'; | |
const __filename = fileURLToPath(import.meta.url); | |
const __dirname = path.dirname(__filename); | |
dotenv.config({ path: path.resolve(__dirname, './tests/.env') }); | |
import dotenv from 'dotenv' | |
dotenv.config({ path: path.resolve(process.cwd(), '.env') }) |
this should work
np: Before merging we should clean up all commit messages locally I can help with |
eb32c94
to
4105f1f
Compare
4105f1f
to
f117a1b
Compare
plz do a |
f117a1b
to
b3454b9
Compare
b3454b9
to
73e275b
Compare
@@ -0,0 +1,8 @@ | |||
import type { Page } from '../utils/helpers' | |||
|
|||
export const BasePage = { |
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 was not referenced anymore
@tanya-bitfly good work....we are on the best way to improve our |
No description provided.