-
Notifications
You must be signed in to change notification settings - Fork 11
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
PB-1254: fix embed preview in chrome #1159
Conversation
Issue: In chrome-based web browsers, the layers would be removed from the preview and the link when opening the embed preview unless the bgLayer was 'void'. Cause: There might be a need to refactor completely the embed sharing component, but for now, it seems the issue was caused by the bgLayer parameter being handled before the layers. This would cause a situation where the router would trigger a mutation, go to a new URL with no layers, and overwrite what should have been in store. As the default background layer is the void one, we did not go through this when we used the empty background layer. Fix: by changing the order in which the parameters are handled, we can ensure layers are handled before the background layer, and thus ensure they are kept.
da3c4d9
to
f10e2ca
Compare
web-mapviewer Run #4021
Run Properties:
|
Project |
web-mapviewer
|
Branch Review |
fix-PB-1254-allow-embed-layer-sharing
|
Run status |
Passed #4021
|
Run duration | 05m 17s |
Commit |
772af64d10: PB-1254: fix embed test
|
Committer | Martin Künzi |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
21
|
Skipped |
0
|
Passing |
214
|
View all changes introduced in this branch ↗︎ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you change all your invoke(...).then(...)
into invoke(...).should(...)
? This would add retry-ability to all your tests (and should make them a bit more resilient on the CI)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
Issue : the tests for the embed links checked strings as they are without any further processing. This meant that if the order of the parameters changed, it would make the test fail. Fix : We update the tests with a deep comparison between two 'URLSearchParams' made from the variable parameter and the validation string
bcf2432
to
772af64
Compare
Issue: In chrome-based web browsers, the layers would be removed from the preview and the link when opening the embed preview unless the bgLayer was 'void'.
Cause: There might be a need to refactor completely the embed sharing component, but for now, it seems the issue was caused by the bgLayer parameter being handled before the layers. This would cause a situation where the router would trigger a mutation, go to a new URL with no layers, and overwrite what should have been in store. As the default background layer is the void one, we did not go through this when we used the empty background layer.
Fix: by changing the order in which the parameters are handled, we can ensure layers are handled before the background layer, and thus ensure they are kept.
Test link