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

feat: E2E coverage for Draw Boundary #4035

Merged
merged 10 commits into from
Dec 18, 2024
Merged

feat: E2E coverage for Draw Boundary #4035

merged 10 commits into from
Dec 18, 2024

Conversation

RODO94
Copy link
Contributor

@RODO94 RODO94 commented Dec 3, 2024

What does this Test do?

For the Draw Boundary testing, I have focused only on:

  • the ability to add via the Editor modal
  • path to navigate to the file upload route
  • a map is present with correct geoJSON
  • a map can be reset and new boundary drawn

I have left testing the file upload to the relevant unit tests or related testing elsewhere in the code base. I thought this was the easiest given we are yet to do the FileUploadAndLabel e2e tests. I can come back to add this in after that.

Rather than add in comments, in some parts I have just added custom text to the expect(). It made it easier for me to track when running the test and it was acting the same as the comments in the code.

    await expect(drawBoundaryTitle, "We have navigated back to the map component",).toBeVisible();
Screenshot 2024-12-10 at 16 45 01

@RODO94 RODO94 force-pushed the rory/e2e-draw-boundary branch from 6251e38 to dc9caa0 Compare December 3, 2024 17:57
Copy link

github-actions bot commented Dec 3, 2024

Removed vultr server and associated DNS entries

@RODO94
Copy link
Contributor Author

RODO94 commented Dec 3, 2024

@RODO94 RODO94 force-pushed the rory/e2e-draw-boundary branch from 26d70e0 to c5a5d7c Compare December 9, 2024 09:43
@@ -37,3 +43,23 @@ export const mockMapGeoJson: Feature = {
"organisation-entity": "13",
},
};

export const mockChangedMapGeoJson: GeoJsonChangeHandler = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

pulled this from the tests so I had a static mock to check against when running the tests

@RODO94 RODO94 marked this pull request as ready for review December 10, 2024 16:29
@RODO94 RODO94 requested a review from a team December 10, 2024 16:43
Copy link
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

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

This looks like a solid start! Some initial comments below and a larger one:

  • I was expecting to find mocks for Ordnance Survey API calls as part of this work - when you load up the DrawBoundary here, is it making live calls to the OS Vector Tiles API ? Are OS mocks something you previously handled with FindProperty & PropertyInformation components before this ?

We definitely don't want our live OS APIs to be called repeated by E2E so let's catch up about this please to move this forward !

e2e/tests/ui-driven/src/mocks/geospatialMocks.ts Outdated Show resolved Hide resolved
e2e/tests/ui-driven/src/mocks/geospatialMocks.ts Outdated Show resolved Hide resolved
@RODO94 RODO94 force-pushed the rory/e2e-draw-boundary branch from ea4c351 to cd70fe5 Compare December 17, 2024 09:36
address comments from review

refine osMapsMocks

rename OSMapMocks
@RODO94 RODO94 force-pushed the rory/e2e-draw-boundary branch from d086f26 to e2d2534 Compare December 17, 2024 14:22
Copy link
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

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

Thank you for adding mocks here, looks good to go to me 👍

@RODO94 RODO94 merged commit ff6cc54 into main Dec 18, 2024
12 checks passed
@RODO94 RODO94 deleted the rory/e2e-draw-boundary branch December 18, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants