Skip to content

Commit

Permalink
fix: Added url check for unique map URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
josebui committed Sep 27, 2024
1 parent eab82e8 commit 8d6e33b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sharedData/visualization/visualization.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ const testVisualizationForm = async ({

// View page
const url = new URL(page.url());
const expectedPathname = `/groups/${group.slug}/map/${visualizationSlug}`;
expect(url.pathname).toBe(expectedPathname);
const expectedPattern = new RegExp(`/\/groups\/${group.slug}\/map\/[\\w-]+\/pw-map-${group.slug}/`);

Check failure on line 189 in src/sharedData/visualization/visualization.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Replace ``/\/groups\/${group.slug}\/map\/[\\w-]+\/pw-map-${group.slug}/`` with `⏎····`/\/groups\/${group.slug}\/map\/[\\w-]+\/pw-map-${group.slug}/`,⏎··`

Check failure on line 189 in src/sharedData/visualization/visualization.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Unnecessary escape character: \/

Check failure on line 189 in src/sharedData/visualization/visualization.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Unnecessary escape character: \/

Check failure on line 189 in src/sharedData/visualization/visualization.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Unnecessary escape character: \/

Check failure on line 189 in src/sharedData/visualization/visualization.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Unnecessary escape character: \/

Check failure on line 189 in src/sharedData/visualization/visualization.spec.ts

View workflow job for this annotation

GitHub Actions / lint

Unnecessary escape character: \/
expect(url.pathname).toMatch(expectedPattern);
await visualizationFormPage.changeBaseMap(page, 'Satellite');

// Download file
Expand Down

0 comments on commit 8d6e33b

Please sign in to comment.