-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3875 from JetBrains/ktl-1227-add-e2e-test
test(KTL-1227): test for redirect to KMP landing page
- Loading branch information
Showing
2 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { closeCookiesConsentBanner, isStaging } from '../utils'; | ||
|
||
test.describe.configure({ mode: 'parallel' }); | ||
|
||
test.describe('/lp/ pages list', async () => { | ||
test.beforeEach(async ({ context, baseURL }) => { | ||
await closeCookiesConsentBanner(context, baseURL); | ||
}); | ||
|
||
test(`Check /lp/multiplatform default redirects`, async ({ page, baseURL }) => { | ||
test.skip(isStaging(baseURL), 'for host with reverse-proxy only'); | ||
|
||
const targetUrl = 'https://www.jetbrains.com/kotlin-multiplatform/'; | ||
|
||
await page.goto('/lp/multiplatform'); | ||
expect(page.url()).toEqual(targetUrl); | ||
|
||
await page.goto('/lp/multiplatform/'); | ||
expect(page.url()).toEqual(targetUrl); | ||
|
||
await page.goto('/lp/multiplatform/any'); | ||
expect(page.url()).toEqual(targetUrl); | ||
}); | ||
|
||
test(`Check /lp/multiplatform case-studies redirect`, async ({ page, baseURL }) => { | ||
test.skip(isStaging(baseURL), 'for host with reverse-proxy only'); | ||
const targetUrl = 'https://www.jetbrains.com/help/kotlin-multiplatform-dev/case-studies.html'; | ||
|
||
await page.goto('/lp/multiplatform/case-studies/'); | ||
expect(page.url()).toEqual(targetUrl); | ||
|
||
await page.goto('/lp/multiplatform/case-studies/philips'); | ||
expect(page.url()).toEqual(targetUrl); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters