Skip to content

Commit 27e9c5e

Browse files
committed
Add timeouts?
1 parent dc5e88e commit 27e9c5e

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

packages/gitbook/e2e/internal.spec.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,7 +1983,9 @@ const testCases: TestsCase[] = [
19831983
await expect(page.locator('#gitbook-widget-window')).toBeVisible();
19841984
const iframe = page.frameLocator('#gitbook-widget-iframe');
19851985
await iframe.getByTestId('embed-tab-docs').click(); // Switch to docs tab
1986-
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible();
1986+
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible({
1987+
timeout: 10000,
1988+
});
19871989

19881990
await iframe.getByTestId('embed-tab-assistant').click(); // Switch to assistant tab
19891991
await expect(iframe.getByTestId('ai-chat')).toBeVisible();
@@ -2001,7 +2003,9 @@ const testCases: TestsCase[] = [
20012003
});
20022004
await expect(page.locator('#gitbook-widget-window')).toBeVisible();
20032005
const iframe = page.frameLocator('#gitbook-widget-iframe');
2004-
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible();
2006+
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible({
2007+
timeout: 10000,
2008+
});
20052009
await expect(iframe.owner()).toHaveAttribute(
20062010
'src',
20072011
expect.stringContaining('getting-started/quickstart')
@@ -2214,7 +2218,9 @@ const testCases: TestsCase[] = [
22142218
run: async (page) => {
22152219
await expect(page.locator('#gitbook-widget-window')).toBeVisible();
22162220
const iframe = page.frameLocator('#gitbook-widget-iframe');
2217-
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible();
2221+
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible({
2222+
timeout: 10000,
2223+
});
22182224
},
22192225
},
22202226
{
@@ -2223,7 +2229,9 @@ const testCases: TestsCase[] = [
22232229
run: async (page) => {
22242230
await expect(page.locator('#gitbook-widget-window')).toBeVisible();
22252231
const iframe = page.frameLocator('#gitbook-widget-iframe');
2226-
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible();
2232+
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible({
2233+
timeout: 10000,
2234+
});
22272235
const tocButton = iframe.getByTestId('toc-button');
22282236
await expect(tocButton).toBeVisible();
22292237
await tocButton.click();
@@ -2236,7 +2244,9 @@ const testCases: TestsCase[] = [
22362244
run: async (page) => {
22372245
await expect(page.locator('#gitbook-widget-window')).toBeVisible();
22382246
const iframe = page.frameLocator('#gitbook-widget-iframe');
2239-
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible();
2247+
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible({
2248+
timeout: 10000,
2249+
});
22402250
const openInNewTabButton = iframe.getByTestId(
22412251
'embed-docs-page-open-in-new-tab'
22422252
);

0 commit comments

Comments
 (0)