Skip to content

Commit 138fd58

Browse files
authored
Merge pull request #4975 from JetBrains/new_test_for_main_page
Add a test for the button "Develop by JetBrains" on the main page.
2 parents 37c79f2 + c69a779 commit 138fd58

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/production/main-page-buttons.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ test.describe('Main page buttons', () => {
1616
await expect(pageTitle).toContainText('Get started with Kotlin');
1717
});
1818

19+
test('Develop by JetBrains link should navigate to JetBrains homepage', async ({ page, context }) => {
20+
const jetBrainsLink = page.getByTestId('hero-block').getByRole('link', { name: 'JetBrains' });
21+
await expect(jetBrainsLink).toBeVisible();
22+
const newPagePromise = context.waitForEvent('page');
23+
await jetBrainsLink.click();
24+
const newPage = await newPagePromise;
25+
await newPage.waitForLoadState();
26+
await expect(newPage.url()).toContain('https://www.jetbrains.com/');
27+
});
28+
1929
test('Kotlin blog button', async ({ page }) => {
2030
const blogButton = page.getByRole('link', { name: 'Kotlin blog' });
2131
await expect(blogButton).toBeVisible();

0 commit comments

Comments
 (0)