Skip to content

Commit 88df296

Browse files
authored
Merge pull request #4997 from JetBrains/ktl-2871-add-test-for-external-links-in-docs
KTL-2871 Docs: Add test to ensure external links open in the same tab
2 parents 32fb182 + 9a16392 commit 88df296

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/e2e/webhelp.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ test.describe('WebHelp page appearance', async () => {
9898
expect(await lightbox.count()).toBe(0);
9999
});
100100

101+
test('External link should opens in the same tab', async({page}) => {
102+
const externalLink = page.getByText('external link').first();
103+
104+
await expect(externalLink).not.toHaveAttribute('target', /_blank/i);
105+
})
106+
101107
for (const [resolutionName, resolution] of Object.entries(RESOLUTIONS)) {
102108
test(`Should render layout of the article properly on ${resolutionName}`, async ({ page }) => {
103109
await page.setViewportSize(resolution);

0 commit comments

Comments
 (0)