Skip to content

Commit

Permalink
fix: dendrogram e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yvonneyx committed Dec 19, 2024
1 parent f9ef864 commit c54c6d7
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
11 changes: 8 additions & 3 deletions packages/graphs/tests/demos/hooks/useQueryOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ export const useGraphOptions = <T extends Omit<GraphOptions, 'data'>>(options: T
const [params] = useSearchParams();
const queryParams = Object.fromEntries(params) as any;

if (queryParams.animation === 'false') {
queryParams.animation = false;
}
Object.keys(queryParams).forEach((key) => {
if (queryParams[key] === 'true') {
queryParams[key] = true;
}
if (queryParams[key] === 'false') {
queryParams[key] = false;
}
});

queryParams.devicePixelRatio = 4;

Expand Down
12 changes: 6 additions & 6 deletions tests/dendrogram.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ import { test } from '@playwright/test';
import { it } from './util';

test('use Vertical as direction', async ({ page }) => {
await it(page, '/Dendrogram?direction=vertical');
await it(page, '/Dendrogram?direction=vertical&animation=false');
});

test('use Horizontal as direction', async ({ page }) => {
await it(page, '/Dendrogram?direction=horizontal');
await it(page, '/Dendrogram?direction=horizontal&animation=false');
});

test('use Radial as direction', async ({ page }) => {
await it(page, '/Dendrogram?direction=radial');
await it(page, '/Dendrogram?direction=radial&animation=false');
});

test('Compact Vertical Dendrogram', async ({ page }) => {
await it(page, '/Dendrogram?direction=vertical&compact=true');
await it(page, '/Dendrogram?direction=vertical&compact=true&animation=false');
});

test('Compact Horizontal Dendrogram', async ({ page }) => {
await it(page, '/Dendrogram?direction=horizontal&compact=true');
await it(page, '/Dendrogram?direction=horizontal&compact=true&animation=false');
});

test('Compact Radial Dendrogram', async ({ page }) => {
await it(page, '/Dendrogram?direction=radial&compact=true');
await it(page, '/Dendrogram?direction=radial&compact=true&animation=false');
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c54c6d7

Please sign in to comment.