Skip to content

Test/e2e phase 1 #450

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

Merged
merged 20 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: rename modalPage as it is not a modalPage
  • Loading branch information
devceline committed Feb 26, 2024
commit 0e2267c56dd83ca59bdbba84bb835d6ae06e8fc3
10 changes: 5 additions & 5 deletions tests/shared/fixtures/fixture.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import { test as base } from '@playwright/test'

import { ModalPage } from '../pages/InboxPage'
import { InboxPage } from '../pages/InboxPage'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could add a tests folder to absolute paths too. (But it might cause some issues on Jest, not really sure, might worth checking)

import { ModalValidator } from '../validators/ModalValidator'

// Declare the types of fixtures to use
export interface ModalFixture {
modalPage: ModalPage
modalValidator: ModalValidator
inboxPage: InboxPage
inboxValidator: ModalValidator
library: string
}

export const test = base.extend<ModalFixture>({
modalPage: async ({ page }, use) => {
inboxPage: async ({ page }, use) => {
const modalPage = new ModalPage(page)
await modalPage.load()
await use(modalPage)
},
modalValidator: async ({ modalPage }, use) => {
inboxValidator: async ({ modalPage }, use) => {
const modalValidator = new ModalValidator(modalPage.page)
await use(modalValidator)
}
Expand Down
2 changes: 1 addition & 1 deletion tests/shared/pages/InboxPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { type Locator, type Page, expect } from '@playwright/test'

import { BASE_URL } from '../constants'

export class ModalPage {
export class InboxPage {
private readonly baseURL = BASE_URL

private readonly connectButton: Locator
Expand Down