Skip to content

Commit feb67f7

Browse files
committed
Revert "Update internal.spec.ts"
This reverts commit 985f280.
1 parent 985f280 commit feb67f7

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

packages/gitbook/e2e/internal.spec.ts

Lines changed: 19 additions & 11 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: 20000,
1988+
});
19871989

19881990
await iframe.getByTestId('embed-tab-assistant').click(); // Switch to assistant tab
19891991
await expect(iframe.getByTestId('ai-chat')).toBeVisible();
@@ -2000,14 +2002,14 @@ const testCases: TestsCase[] = [
20002002
GitBook('navigateToPage', '/getting-started/quickstart');
20012003
});
20022004
await expect(page.locator('#gitbook-widget-window')).toBeVisible();
2003-
await expect(
2004-
page.frameLocator('#gitbook-widget-iframe').getByTestId('embed-docs-page')
2005-
).toBeVisible({
2006-
timeout: 10000,
2005+
const iframe = page.frameLocator('#gitbook-widget-iframe');
2006+
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible({
2007+
timeout: 20000,
20072008
});
2008-
await expect(
2009-
page.frameLocator('#gitbook-widget-iframe').owner()
2010-
).toHaveAttribute('src', expect.stringContaining('getting-started/quickstart'));
2009+
await expect(iframe.owner()).toHaveAttribute(
2010+
'src',
2011+
expect.stringContaining('getting-started/quickstart')
2012+
);
20112013
},
20122014
},
20132015
{
@@ -2216,7 +2218,9 @@ const testCases: TestsCase[] = [
22162218
run: async (page) => {
22172219
await expect(page.locator('#gitbook-widget-window')).toBeVisible();
22182220
const iframe = page.frameLocator('#gitbook-widget-iframe');
2219-
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible();
2221+
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible({
2222+
timeout: 20000,
2223+
});
22202224
},
22212225
},
22222226
{
@@ -2225,7 +2229,9 @@ const testCases: TestsCase[] = [
22252229
run: async (page) => {
22262230
await expect(page.locator('#gitbook-widget-window')).toBeVisible();
22272231
const iframe = page.frameLocator('#gitbook-widget-iframe');
2228-
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible();
2232+
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible({
2233+
timeout: 20000,
2234+
});
22292235
const tocButton = iframe.getByTestId('toc-button');
22302236
await expect(tocButton).toBeVisible();
22312237
await tocButton.click();
@@ -2238,7 +2244,9 @@ const testCases: TestsCase[] = [
22382244
run: async (page) => {
22392245
await expect(page.locator('#gitbook-widget-window')).toBeVisible();
22402246
const iframe = page.frameLocator('#gitbook-widget-iframe');
2241-
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible();
2247+
await expect(iframe.getByTestId('embed-docs-page')).toBeVisible({
2248+
timeout: 20000,
2249+
});
22422250
const openInNewTabButton = iframe.getByTestId(
22432251
'embed-docs-page-open-in-new-tab'
22442252
);

0 commit comments

Comments
 (0)