Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for validating dynamic aggregates title. #1658

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Piotrk39
Copy link
Contributor

@Piotrk39 Piotrk39 commented Oct 15, 2024

Describe your changes

Adds E2E test for validating aggregates title to be dynamic.

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have added tests wherever relevant
  • I have made sure that all automated checks pass before requesting a review

@Piotrk39 Piotrk39 marked this pull request as ready for review October 15, 2024 12:48
@Piotrk39 Piotrk39 linked an issue Oct 15, 2024 that may be closed by this pull request
@Piotrk39 Piotrk39 added the test This involves testing label Oct 15, 2024
Copy link
Member

Choose a reason for hiding this comment

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

The new spelling is missing a n. Component.

await this.page.waitForSelector('.leaflet-interactive');

// Assert the that Aggregates title is visible and does not contain the text 'National View'
// 20 is the more or less number of admin boundaries that can be hovered over with Playwright to succesfully assert the title
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this magic number 20. Is it not sufficient to test one admin boundary and assume the others work the same way?

I feel I'm missing some testing-specific science here so correct me if I'm wrong.

@@ -1,7 +1,6 @@
import * as request from 'supertest';
import TestAgent from 'supertest/lib/agent';

import { FloodsScenario } from '../../../services/API-service/src/scripts/enum/mock-scenario.enum';
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test This involves testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add E2E test for: "Aggregates title should be dynamic"
2 participants