Skip to content
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

Remove /v/ from e2e tests #2505

Merged
merged 6 commits into from
Oct 1, 2024
Merged
Changes from all commits
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
18 changes: 9 additions & 9 deletions packages/gitbook/e2e/pages.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { DeepPartial } from 'ts-essentials';
import { argosScreenshot } from '@argos-ci/playwright';
import {
CustomizationHeaderPreset,
Expand All @@ -9,6 +8,7 @@ import {
import { test, expect, Page } from '@playwright/test';
import jwt from 'jsonwebtoken';
import rison from 'rison';
import { DeepPartial } from 'ts-essentials';

import { getContentTestURL } from '../tests/utils';

Expand Down Expand Up @@ -104,7 +104,7 @@ const testCases: TestsCase[] = [
},
{
name: 'RFC variant',
url: 'v/rfcs',
url: 'rfcs',
},
{
name: 'Customized variant titles are displayed',
Expand Down Expand Up @@ -156,13 +156,13 @@ const testCases: TestsCase[] = [

// It should keep the current page path, i.e "reference/api-reference/pets" when navigating to the new variant
await page.waitForURL(
'https://gitbook-open-e2e-sites.gitbook.io/api-multi-versions/v/2.0/reference/api-reference/pets?fallback=true',
'https://gitbook-open-e2e-sites.gitbook.io/api-multi-versions/2.0/reference/api-reference/pets?fallback=true',
);
},
},
{
name: 'Keep navigation path/route when switching variant (Share link)',
url: 'api-multi-versions-share-links/bRfQbzwsK8rbN1GRxx7K/reference/api-reference/pets',
url: 'api-multi-versions-share-links/8tNo6MeXg7CkFMzSSz81/reference/api-reference/pets',
screenshot: false,
taranvohra marked this conversation as resolved.
Show resolved Hide resolved
run: async (page) => {
const spaceDrowpdown = await page.waitForSelector(
Expand All @@ -179,7 +179,7 @@ const testCases: TestsCase[] = [

// It should keep the current page path, i.e "reference/api-reference/pets" when navigating to the new variant
await page.waitForURL(
'https://gitbook-open-e2e-sites.gitbook.io/api-multi-versions-share-links/bRfQbzwsK8rbN1GRxx7K/v/2.0/reference/api-reference/pets?fallback=true',
'https://gitbook-open-e2e-sites.gitbook.io/api-multi-versions-share-links/8tNo6MeXg7CkFMzSSz81/2.0/reference/api-reference/pets?fallback=true',
);
},
},
Expand Down Expand Up @@ -214,7 +214,7 @@ const testCases: TestsCase[] = [

// It should keep the current page path, i.e "reference/api-reference/pets" when navigating to the new variant
await page.waitForURL(
'https://gitbook-open-e2e-sites.gitbook.io/api-multi-versions-va/v/2.0/reference/api-reference/pets?fallback=true',
'https://gitbook-open-e2e-sites.gitbook.io/api-multi-versions-va/2.0/reference/api-reference/pets?fallback=true',
);
},
},
Expand Down Expand Up @@ -558,7 +558,7 @@ const testCases: TestsCase[] = [
expiresIn: '24h',
},
);
return `v/spacea?jwt_token=${token}`;
return `spacea?jwt_token=${token}`;
})(),
run: waitForCookiesDialog,
},
Expand All @@ -575,7 +575,7 @@ const testCases: TestsCase[] = [
expiresIn: '24h',
},
);
return `v/spaceb?jwt_token=${token}`;
return `spaceb?jwt_token=${token}`;
})(),
run: waitForCookiesDialog,
},
Expand All @@ -592,7 +592,7 @@ const testCases: TestsCase[] = [
expiresIn: '24h',
},
);
return `v/spacec?jwt_token=${token}`;
return `spacec?jwt_token=${token}`;
})(),
run: waitForCookiesDialog,
},
Expand Down
Loading