Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion src/Turnierplan.App/Client/e2e/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# This docker compose file is used for running the E2E tests during the CI workflow

services:
turnierplan.e2e.database:
image: postgres:17.0
environment:
- POSTGRES_PASSWORD=P@ssw0rd
- POSTGRES_DB=turnierplan_e2e

turnierplan.e2e.application.amd64:
build:
dockerfile: 'docker/turnierplan-amd64/Dockerfile'
context: '../../../../../'
ports:
- "45001:8080"
environment:
- Database__InMemory=true
- Database__ConnectionString=Host=turnierplan.e2e.database;Database=turnierplan_e2e;Username=postgres;Password=P@ssw0rd
- Turnierplan__ApplicationUrl=http://localhost:45001
- Turnierplan__InitialUserPassword=P@ssw0rd
8 changes: 6 additions & 2 deletions src/Turnierplan.App/Client/e2e/pages/view-tournament-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ export class ViewTournamentPage {

public async reportMatch(index: number, scoreA: number, scoreB: number): Promise<void> {
await this.page.getByTestId(turnierplan.viewTournamentPage.matchPlan.matchRow(index)).click();
await this.page.getByTestId(turnierplan.editMatchDialog.scoreAField).pressSequentially(`${scoreA}`);
await this.page.getByTestId(turnierplan.editMatchDialog.scoreBField).pressSequentially(`${scoreB}`);
await this.page.getByTestId(turnierplan.editMatchDialog.scoreAField).fill(`${scoreA}`);

// This click() below seems pointless but is required because the scoreB is sometimes inserted into the scoreA field...
await this.page.getByTestId(turnierplan.editMatchDialog.scoreBField).click();

await this.page.getByTestId(turnierplan.editMatchDialog.scoreBField).fill(`${scoreB}`);
await this.page.getByTestId(turnierplan.editMatchDialog.saveButton).click();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Turnierplan.App/Client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"test:ci": "ng test --watch=false --source-map=true --code-coverage --browsers ChromeHeadless",
"e2e:swap-environment": "replace-in-file \"environment.prod.ts\" \"environment.e2e.ts\" angular.json",
"e2e:swap-environment-back": "replace-in-file \"environment.e2e.ts\" \"environment.prod.ts\" angular.json",
"e2e:prepare:amd64": "npx playwright install chromium && npm run e2e:swap-environment && docker compose -f e2e/docker/docker-compose.yaml up --build -d turnierplan.e2e.application.amd64 && npm run e2e:swap-environment-back",
"e2e:prepare:amd64": "npx playwright install chromium && npm run e2e:swap-environment && docker compose -f e2e/docker/docker-compose.yaml up --build -d && npm run e2e:swap-environment-back",
"e2e:destroy": "docker compose -f e2e/docker/docker-compose.yaml down",
"e2e:open": "npx playwright test --ui",
"e2e:run": "npx playwright test"
Expand Down
Loading