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

V2: search and ask AI #2889

Merged
Changes from 1 commit
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
Prev Previous commit
Try different approach
  • Loading branch information
SamyPesse committed Mar 3, 2025
commit 953c1407624452e8dec8d7e33090529ebf3d33c5
15 changes: 15 additions & 0 deletions packages/gitbook/e2e/util.ts
Original file line number Diff line number Diff line change
@@ -155,6 +155,21 @@ export function runTestCases(testCases: TestsCase[]) {
);
}

// Set the header to disable the Vercel toolbar
// But only on the main document as it'd cause CORS issues on other resources
await page.route('**/*', async (route, request) => {
if (request.resourceType() === 'document') {
await route.continue({
headers: {
...request.headers(),
'x-vercel-skip-toolbar': '1',
},
});
} else {
await route.continue();
}
});

await page.goto(url);
if (testEntry.run) {
await testEntry.run(page);
3 changes: 0 additions & 3 deletions packages/gitbook/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -19,8 +19,5 @@ export default defineConfig({
baseURL: process.env.BASE_URL || 'http://localhost:3000',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
extraHTTPHeaders: {
'x-vercel-skip-toolbar': '1',
},
},
});
Loading