Skip to content

PB-1491 : Add a test to parse an online kml with the wrong content-type#1304

Merged
sami-nouidri-swisstopo merged 2 commits intodevelopfrom
bug-PB-1491-s3-kml-content-type-parsing
May 21, 2025
Merged

PB-1491 : Add a test to parse an online kml with the wrong content-type#1304
sami-nouidri-swisstopo merged 2 commits intodevelopfrom
bug-PB-1491-s3-kml-content-type-parsing

Conversation

@sami-nouidri-swisstopo
Copy link
Contributor

@sami-nouidri-swisstopo sami-nouidri-swisstopo commented Apr 17, 2025

This is an attempt at catching this sort of problem in the future. As of now, the test passses.

Test link

@cypress
Copy link

cypress bot commented Apr 17, 2025

web-mapviewer    Run #5360

Run Properties:  status check passed Passed #5360  •  git commit 12cb974291: PB-1491 : Change Intercept config for validOnlineKml
Project web-mapviewer
Branch Review bug-PB-1491-s3-kml-content-type-parsing
Run status status check passed Passed #5360
Run duration 05m 56s
Commit git commit 12cb974291: PB-1491 : Change Intercept config for validOnlineKml
Committer Sami Nouidri
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 20
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 251
View all changes introduced in this branch ↗︎

@sami-nouidri-swisstopo sami-nouidri-swisstopo force-pushed the bug-PB-1491-s3-kml-content-type-parsing branch 3 times, most recently from 87aa985 to b60da16 Compare April 17, 2025 13:49
@sami-nouidri-swisstopo sami-nouidri-swisstopo force-pushed the bug-PB-1491-s3-kml-content-type-parsing branch 2 times, most recently from 5149199 to 1f8f146 Compare April 22, 2025 06:51
@sami-nouidri-swisstopo sami-nouidri-swisstopo force-pushed the bug-PB-1491-s3-kml-content-type-parsing branch 2 times, most recently from cd45818 to 28bac2b Compare April 23, 2025 10:01
@sami-nouidri-swisstopo sami-nouidri-swisstopo force-pushed the bug-PB-1491-s3-kml-content-type-parsing branch from 28bac2b to 49aaf03 Compare April 24, 2025 08:40
@sami-nouidri-swisstopo sami-nouidri-swisstopo force-pushed the bug-PB-1491-s3-kml-content-type-parsing branch 2 times, most recently from 7ca9e69 to a5ea6b6 Compare May 15, 2025 09:49
@sami-nouidri-swisstopo sami-nouidri-swisstopo force-pushed the bug-PB-1491-s3-kml-content-type-parsing branch 5 times, most recently from fcc79ad to 13848d9 Compare May 16, 2025 08:59
.contains(errorMessage)

// Mouseout to remove tooltip
cy.wrap($layer).trigger('mouseout', { force: true })
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure this will really be removing the tooltip, as you are triggering the mouseout on a different element than the mouseover.
Might be a good idea to replicate the selector above and add the missing .find('[data-cy^="button-has-error"]') before triggering the event

).click({
force: true,
})
cy.get(`[data-cy^="button-remove-layer-${invalidFileOnlineUrl}-"]:visible`).click({
Copy link
Contributor

Choose a reason for hiding this comment

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

why is there a trailing - at the end here?
If the HTML is rendered with that character, I'd prefer we remove it, it's not "nice" 😉

@sami-nouidri-swisstopo sami-nouidri-swisstopo force-pushed the bug-PB-1491-s3-kml-content-type-parsing branch 2 times, most recently from 80c5dd0 to 7d2c40c Compare May 19, 2025 11:28
This is an attempt at catching this sort of problem in the future. As of now,
the test passses.
@sami-nouidri-swisstopo sami-nouidri-swisstopo force-pushed the bug-PB-1491-s3-kml-content-type-parsing branch from 7d2c40c to 37f0161 Compare May 20, 2025 07:38
@sami-nouidri-swisstopo sami-nouidri-swisstopo force-pushed the bug-PB-1491-s3-kml-content-type-parsing branch from 37f0161 to c3008a3 Compare May 20, 2025 10:13
@sami-nouidri-swisstopo sami-nouidri-swisstopo force-pushed the bug-PB-1491-s3-kml-content-type-parsing branch from c3008a3 to 12cb974 Compare May 20, 2025 11:13
@sami-nouidri-swisstopo sami-nouidri-swisstopo merged commit d1f22ab into develop May 21, 2025
6 checks passed
@sami-nouidri-swisstopo sami-nouidri-swisstopo deleted the bug-PB-1491-s3-kml-content-type-parsing branch May 21, 2025 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants