Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f108a32
fix(tests): improve cookie banner handling and refactor e2e setup
zoobestik Jan 26, 2026
1f4585d
fix(e2e): update Playwright reporter for CI environments
zoobestik Jan 26, 2026
2db0ab6
fix(ci): run all production compatible Playwright tests
zoobestik Jan 26, 2026
96e3ad1
fix(ci): add branch filter for E2E production notifications
zoobestik Jan 26, 2026
f2b4d24
fix(e2e): refactor screenshot verification to use `checkScreenshot` f…
zoobestik Jan 26, 2026
bfabe74
fix(e2e): refine href matching for tooling section links in why.spec.ts
zoobestik Jan 26, 2026
d35cf66
fix(e2e): adjust CI command to include all Playwright tests
zoobestik Jan 26, 2026
fdad9f5
fix(ci): streamline E2E test dependencies and Docker setup
zoobestik Jan 26, 2026
7eccac3
fix(e2e): update Playwright version and simplify e2e Docker setup
zoobestik Jan 26, 2026
5e2d6a1
fix(e2e): update baseURL references in landings.spec.ts for consisten…
zoobestik Jan 27, 2026
e22cb94
fix(e2e): refine href matching for tooling section links in why.spec.ts
zoobestik Jan 27, 2026
5d46b6e
fix(e2e): handle load state exception in server-side-use-cases.spec.ts
zoobestik Jan 27, 2026
3756551
fix(e2e): improve customer link interaction in server-side-use-cases.…
zoobestik Jan 27, 2026
60e57ca
fix(e2e): refine customer link testing with improved steps
zoobestik Jan 27, 2026
aa66b57
fix(test): refine isDevelopment utility function for URL validation
zoobestik Jan 27, 2026
6f0f9e6
fix(e2e): update URL assertions for consistency with relative paths
zoobestik Jan 27, 2026
8d909e1
fix(e2e): Replace absolute URLs with consistent relative path assertions
zoobestik Jan 27, 2026
219abf2
fix(test): update isDevelopment logic for localhost detection
zoobestik Jan 27, 2026
024dfd3
fix(test): update isDevelopment logic for localhost detection
zoobestik Jan 27, 2026
ff5bcd7
fix(e2e): update Playwright image to v1.57.0-noble
zoobestik Jan 27, 2026
b5b6583
fix(e2e): remove`closeExternalBanners` utility and fix education pages
zoobestik Feb 2, 2026
1437510
fix(e2e): remove redundant timeouts and update isDevelopment logic
zoobestik Feb 2, 2026
0b4538b
fix(e2e): update CSS paths and enhance screenshot handling
zoobestik Feb 2, 2026
f0da4cc
fix(e2e): improve test utilities and update CSS paths
zoobestik Feb 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ generated
/reports*
/data/page_views_map.json
test-results
test/storage-state.json
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is created each time the tests run, see shared account in all tests


public/data
1 change: 1 addition & 0 deletions .teamcity/tests/buildTypes/E2EProductionTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ object E2EProductionTest : BuildType({

features {
notifications {
branchFilter = "+:master"
enabled = !isProjectPlayground()
notifierSettings = slackNotifier {
connection = "PROJECT_EXT_486"
Expand Down
75 changes: 19 additions & 56 deletions .teamcity/tests/buildTypes/E2ETests.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package tests.buildTypes

import documentation.builds.KotlinWithCoroutines
import jetbrains.buildServer.configs.kotlin.BuildType
import jetbrains.buildServer.configs.kotlin.FailureAction
import jetbrains.buildServer.configs.kotlin.buildSteps.script
import kotlinlang.builds.BuildJsAssets
import references.builds.kotlinx.coroutines.KotlinxCoroutinesBuildApiReference
import references.builds.kotlinx.serialization.KotlinxSerializationBuildApiReference
import kotlinlang.builds.BuildSitePages


object E2ETests : BuildType({
Expand All @@ -16,70 +13,36 @@ object E2ETests : BuildType({
+:test-results/* => test-results.zip
""".trimIndent()

requirements {
exists("docker.server.version")
contains("docker.server.osType", "linux")
}

vcs {
root(vcsRoots.KotlinLangOrg)
}

dependencies {
artifacts(KotlinWithCoroutines) {
cleanDestination = true
artifactRules = """
+:webHelpImages.zip!** => dist/docs/images/
+:webHelpKR2.zip!** => dist/docs/
""".trimIndent()
}

dependency(BuildJsAssets) {
snapshot {
onDependencyFailure = FailureAction.FAIL_TO_START
onDependencyCancel = FailureAction.CANCEL
}

artifacts {
artifactRules = "+:assets.zip!** => _assets/"
}
}

dependency(KotlinxCoroutinesBuildApiReference) {
snapshot {
onDependencyFailure = FailureAction.CANCEL
onDependencyCancel = FailureAction.CANCEL
}

artifacts {
artifactRules = "+:pages.zip!** => libs/kotlinx.coroutines/"
}
}

dependency(KotlinxSerializationBuildApiReference) {
snapshot {
onDependencyFailure = FailureAction.CANCEL
onDependencyCancel = FailureAction.CANCEL
}

artifacts {
artifactRules = "+:pages.zip!** => libs/kotlinx.serialization/"
}
}
params {
param("env.WEBTEAM_UI_NPM_TOKEN", "%WEBTEAM_UI_NPM_TOKEN%")
}

steps {
script {
name = "Set execute permissions"
scriptContent = "chmod +x ./scripts/test/run-e2e-tests.sh"
}
script {
name = "Run E2E tests"
scriptContent = "./scripts/test/run-e2e-tests.sh"
}
}

artifactRules = """
+:test-results/ => test-results/
""".trimIndent()

requirements {
exists("docker.server.version")
contains("docker.server.osType", "linux")
dependencies {
dependency(BuildSitePages) {
snapshot {
onDependencyFailure = FailureAction.FAIL_TO_START
onDependencyCancel = FailureAction.CANCEL
}
artifacts {
buildRule = sameChainOrLastFinished()
artifactRules = "+:pages.zip!** => dist/"
}
}
}
})
6 changes: 3 additions & 3 deletions blocks/education/courses-list/courses-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ interface CoursesListProps {
export const CoursesList: FC<CoursesListProps> = ({ universities }) => {
const textCn = useTextStyles();
return (
<div className={styles.list}>
<div className={cn(styles.header, textCn('rs-h4'))}>
<div className={styles.list} data-test="courses">
<div className={cn(styles.header, textCn('rs-h4'))} data-test="courses-header">
<div className={cn(styles.cell, styles.cellFirst)}>University title</div>
<div className={cn(styles.cell, styles.cellSecond)}>Location</div>
<div className={cn(styles.cell, styles.cellThird)}>Teaching Kotlin</div>
</div>
{universities.map((university) => (
<div className={cn(styles.item, textCn('rs-text-2', { hardness: 'hard' }))} key={university.id}>
<div className={cn(styles.item, textCn('rs-text-2', { hardness: 'hard' }))} key={university.id} data-test="courses-item">
<div className={cn(styles.cell, styles.cellFirst)}>{university.title}</div>
<div className={cn(styles.cell, styles.cellSecond)}>{university.location}</div>
<div className={cn(styles.cell, styles.cellThird)}>
Expand Down
1 change: 1 addition & 0 deletions blocks/education/education-layout/education-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const EducationLayout: FC<EducationLayoutProps> = ({
</div>

<CtaBlock
className={'cta-block'}
topTitle={
'If you would like to introduce Kotlin into your classroom or have any questions about teaching or learning Kotlin'
}
Expand Down
8 changes: 5 additions & 3 deletions blocks/education/subscription-form/subscription-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const SubscriptionForm: FC = () => {
}}
>
{({ setFieldValue }) => (
<Form className={styles.form}>
<Form className={styles.form} data-test="subscription-form">
<img src={MailIcon.src} className={styles.icon} alt="Subscribe form" />

<div className={cn(styles.text, textCn('rs-h3'))}>
Expand All @@ -66,12 +66,14 @@ export const SubscriptionForm: FC = () => {
className={styles.input}
/>

<FormikPrivacyCheckbox consentId={consentId} privacy={privacy} className={styles.checkbox} />
<div data-test="subscription-checkbox">
<FormikPrivacyCheckbox consentId={consentId} privacy={privacy} className={styles.checkbox} />
</div>

{isSubmitted ? (
<span className={cn(styles.button, styles.submitted)}>
<span className={styles.submittedText}>Subscribe</span>
<CheckIcon className={styles.submittedIcon} />
<CheckIcon className={styles.submittedIcon} data-test="subscription-submitted-icon" />
</span>
) : (
<FormikSubmitButton size="m" className={styles.button}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const TeachLaunchCourse: FC = () => {

return (
<div className={styles.launchCourse}>
<div className={cn('ktl-text-1', styles.text)}>
<div className={cn('ktl-text-1', styles.text)} data-test="teach-launch-course">
The Programming in Kotlin course is a comprehensive toolkit for teaching Kotlin and can be easily
customized to align with specific educational needs. The course comes with slides, lecture notes, and
assessment resources.
Expand Down
2 changes: 1 addition & 1 deletion blocks/education/teach-map/teach-map-marker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface TeachMapMarkerProps {

export const TeachMapMarker: FC<TeachMapMarkerProps> = ({ university, showTooltip, onClose }) => {
return (
<div className={cn(styles.marker, { [styles.active]: showTooltip })}>
<div className={cn(styles.marker, { [styles.active]: showTooltip })} data-test="teach-map-marker">
{showTooltip && <TeachMapTooltip university={university} onClose={onClose} />}
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion blocks/education/teach-map/teach-map-tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const TeachMapTooltip: FC<TeachMapTooltipProps> = ({ university, onClose
);

return (
<div className={cn(styles.tooltip, 'ktl-text-3')}>
<div className={cn(styles.tooltip, 'ktl-text-3')} data-test="teach-map-tooltip">
<div className={styles.header}>
<div>
<div className={styles.headerText}>{university.title}</div>
Expand Down
2 changes: 1 addition & 1 deletion blocks/education/teach-map/teach-map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const TeachMap: FC<TeachMapProps> = ({ className, universities }) => {

return (
<ErrorBoundary fallback={<div>Map is unavailable</div>}>
<div className={cn(styles.map, className)}>
<div className={cn(styles.map, className)} data-test={'teach-map'}>
<GoogleMapReact
bootstrapURLKeys={{ key: mapSettings.key }}
defaultCenter={mapSettings.defaultCenter}
Expand Down
4 changes: 2 additions & 2 deletions blocks/education/teach-numbers/teach-numbers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ export const TeachNumbers: FC<TeachNumbersProps> = ({ countriesCount, universiti
<div className={styles.title}>
<div className="ktl-hero">{countriesCount}</div>
</div>
<div className={styles.subtitle}>
<div className={styles.subtitle} data-test="teach-number-subtitle">
<div className="ktl-text-2">countries</div>
</div>
</div>
<div className={styles.number}>
<div className={styles.title}>
<div className="ktl-hero">{universitiesCount}</div>
</div>
<div className={styles.subtitle}>
<div className={styles.subtitle} data-test="teach-number-subtitle">
<div className="ktl-text-2">universities</div>
</div>
</div>
Expand Down
34 changes: 15 additions & 19 deletions docker-compose-e2e-statics.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
version: '3'
services:
nginx-server:
build:
context: .
dockerfile: ./dockerfiles/nginx-server/Dockerfile
ports:
- 8081:80
image: nginx:stable-alpine
networks:
- network1
- test-network
volumes:
- ./dist:/usr/share/nginx/html
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost" ]
interval: 30s
timeout: 10s
retries: 3
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost" ]
interval: 30s
timeout: 5s
retries: 3

playwright:
build:
context: .
dockerfile: ./dockerfiles/playwright/Dockerfile
command: yarn run test:e2e:ci
image: mcr.microsoft.com/playwright:v1.57.0-noble
environment:
BASE_URL: "http://nginx-server"
WEBTEAM_UI_NPM_TOKEN: ${WEBTEAM_UI_NPM_TOKEN}
working_dir: /var/www
volumes:
- ./test/snapshots:/var/www/test/snapshots
- ./test-results:/var/www/test-results
- .:/var/www
command: sh -c "yarn install && yarn run test:e2e:ci"
depends_on:
nginx-server:
condition: service_healthy
networks:
- network1
- test-network

networks:
network1:
test-network:
2 changes: 1 addition & 1 deletion dockerfiles/e2e-tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN npm install --global yarn

# Install Playwright dependencies
RUN apt-get -y install wget gnupg
RUN npx playwright@1.53.0 install-deps
RUN npx playwright@1.57 install-deps

WORKDIR /var/www

Expand Down
8 changes: 0 additions & 8 deletions dockerfiles/nginx-server/Dockerfile

This file was deleted.

13 changes: 0 additions & 13 deletions dockerfiles/playwright/Dockerfile

This file was deleted.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
"next-optimized-images": "3.0.0-canary.10",
"next-transpile-modules": "^10.0.1",
"playwright": "1.57.0",
"playwright-teamcity-reporter": "1.0.5",
"postcss-custom-media": "10.0.0",
"postcss-import": "15.1.0",
"prettier": "2.6.2",
Expand Down Expand Up @@ -136,11 +137,11 @@
"lint": "next lint",
"test": "playwright test test",
"test:production": "playwright test test/production",
"test:production:ci": "CI=true BASE_URL=https://kotlinlang.org playwright test test/production",
"test:production:ci": "CI=true BASE_URL=https://kotlinlang.org playwright test",
"test:production:headed": "playwright test test/production --headed --project=chromium",
"test:production:debug": "PWDEBUG=1 playwright test test/production --project=chromium",
"test:e2e": "playwright test test/e2e",
"test:e2e:ci": "CI=true playwright test test/e2e",
"test:e2e:ci": "CI=true playwright test",
"test:e2e:headed": "playwright test test/e2e --headed",
"test:e2e:debug": "PWDEBUG=1 playwright test test/e2e --project=chromium",
"test:e2e:update": "playwright test test/e2e --update-snapshots",
Expand Down
Loading
Loading