[full-ci] e2e tests. fix flakiness while filling resource name for text file #981
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
CI is being flaky wile creating
.txtfile: https://ci.opencloud.eu/repos/3/pipeline/2357/314This is also flaky in local environment because:
lorem.txt) from test steplorem.txt.txtflakiness.mp4
What we have used is:
await page.locator(resourceNameInput).fill(name)but the.fill()method of playwright is flaky in itself: microsoft/playwright#36395So as a fix, this PR adds
await page.locator(resourceNameInput).selectText()to select all what exists in the resource input field and then only fills what comes from the test step (i.e resource name with extension) so that we can only have what is sent from the test step, which removes the creation of double file extensions.Related Issue
How Has This Been Tested?
Locally I have tested this change for up-to 20 iterations without getting any failures.
Types of changes