Better fuzz testing for PDF generation #2965
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a follow-up of #2958, the changes here makes the test I added in the previous PR redundant as this makes random failure much more likely if the
#readyForPrint
logic is insufficient. Even though I could safely remove that test here, it's important to keep in mind that everything is not covered automatically now. For example, thechangeName
test with the map component will probably not fail for any other reason than the map since the tiles almost always load last and gives a lot of time for other things to load while waiting on those.Changes:
cy.intercept()
after its been added, so the workaround is to check a variable if it has been disabled or not. This is only really relevant if you continue the test after runningtestPdf()
cy.clock()
immediately after#readyForPrint
is visible. This will effectively pause all timers, which in many cases pauses things from updating in the UI which can make the snapshots a little more likely to fail if something is not quite ready. It is by no means a guarantee.testPdf
call in thechangeName
test now fails if options don't load in time.Related Issue(s)