Skip to content

test: migrate chromatic tests #1745

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 25 commits into from
Apr 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
to: e2e/pageObjects/<%= name %>/<%= name %>Page.ts
---
import { expect } from '@playwright/test'
import { expect } from '@chromatic-com/playwright'
import { BasePage } from 'e2e/pageObjects/basePage'

export class <%= h.changeCase.pascal(name) %>Page extends BasePage {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
to: e2e/<%= name %>.test.ts
---
import { ApolloClient, NormalizedCacheObject } from '@apollo/client'
import { test } from '@playwright/test'
import { test } from '@chromatic-com/playwright'
import { <%= h.changeCase.pascal(name) %>Page } from 'e2e/pageObjects/<%= name %>/<%= name %>Page'

test.describe('<%= name %>', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ export async function getDatasetsV2({
page,
titleOrderDirection,
searchText,
params,
params = new URLSearchParams(),
client,
}: {
page: number
titleOrderDirection?: OrderBy
searchText?: string
params: URLSearchParams
params?: URLSearchParams
client: ApolloClient<NormalizedCacheObject>
}): Promise<ApolloQueryResult<GetDatasetsV2Query>> {
return client.query({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -555,15 +555,15 @@ export interface GetRunByIdV2Params {
client: ApolloClient<NormalizedCacheObject>
id: number
annotationsPage: number
params: URLSearchParams
params?: URLSearchParams
depositionId?: number
}

export async function getRunByIdV2({
client,
id,
annotationsPage,
params,
params = new URLSearchParams(),
depositionId,
}: GetRunByIdV2Params): Promise<ApolloQueryResult<GetRunByIdV2Query>> {
return client.query({
Expand Down
Loading
Loading