Conversation
|
hi some improvements
|
We still need to switch on to |
9f39355 to
99e80b9
Compare
4b892b8 to
c29a2e1
Compare
| triggerDownload(blob, fileName) { | ||
| const link = document.createElement('a') | ||
| link.href = URL.createObjectURL(blob) | ||
| link.download = fileName | ||
|
|
||
| link.click() | ||
| URL.revokeObjectURL(link.href) | ||
| }, |
There was a problem hiding this comment.
could you add a little comment that we must use this <a> approach so that we can define the downloaded file name?
otherwise the next one to come here will want to switch to a window.open(...) 😉
| context('check how app behave with backend output', () => { | ||
| const goToDrawingWithMockProfile = (mockValue) => { | ||
| cy.mockupBackendResponse('rest/services/profile.json', mockValue, 'profile') | ||
| cy.mockupBackendResponse('rest/services/profile.json?*', mockValue, 'profile') |
There was a problem hiding this comment.
why not cy.mockupBackendResponse('rest/services/profile.json**', mockValue, 'profile')?
now if the app calls the backend without any URL argument (without the ?... part of the URL) it might not be caught anymore, no?
|
Please add some Cypress test that covers this new button and the output it gives 😉 (or at least that the right backend was called) |
2704803 to
bb11368
Compare
Also hid file extension outside of file api and simplified the triggerdownload function.
- profile.api uses now JSON format to pass the geoJSON, and not the urlencoded format. Fixed the e2e tests accordingly - search.api now does not use anymore a version number in the URL, as this is not supported anymore by sys-api3
bb11368 to
9907a26
Compare
A Link is shown to the user to download the CSV of the profile data
Test link