test(playwright): migrate propfind tests from Cypress to Playwright - #9021
Conversation
|
/backport to stable34 |
|
/backport to stable33 |
Signed-off-by: Jonas <jonas@freesources.org> Assisted-by: OpenCode:claude-fable-5
0282101 to
b9c8505
Compare
| const [root1] = await propfindFolder(user, '/', 0, properties) | ||
| expect(root1).toHaveProperty(PROPERTY_WORKSPACE_FLAT, '') | ||
|
|
||
| await deleteWebDAVResource(user, '/Readme.md') |
There was a problem hiding this comment.
This line most likely fixes the flakiness of the test compared to the Cypress one. Without this line, this test succeeds reliably locally but fails reliably (so far) in CI.
Claude assumes that this is because the storage cache doesn't get invalidated properly in CI when only overwriting the file compared to deleting it and uploading a new file (which results in new fileId etc). It may well be that the missing cache invalidation is due to different APCu caching setup in CI.
There was a problem hiding this comment.
I wonder if we could fix that different setup. Would such a setup have visible consequences in actual setups or is this a CI artifact we are observing?
There was a problem hiding this comment.
I don't have hard feelings here. I didn't dive into investigating the actual differences with caching setup between CI and local environment, I merely was happy to have found an explanation for the flaky test and decided to move on 😆
There was a problem hiding this comment.
@max-nextcloud do you see a problem with adding the delete in the test? It arguably changes what is being tested: updating a file no longer is tested. But do you think it should be tested in the propfind tests?
There was a problem hiding this comment.
Well... this started out as a regression test. Would be interesting to see if this actually represents a user visible bug. So if one user creates an empty readme.md and then another one adds content... does the content show? I'll try.
There was a problem hiding this comment.
So I tried this on cloud.nextcloud.com and it works as intended. However we may not have the problematic caching config and I think I remember that the propfind was also used by the desktop client.
In the browser it basically directly opens an editing session - editable or read only and dynamically syncs the content.
There was a problem hiding this comment.
Yes... this initially was about android: nextcloud/server#32548 (comment)
There was a problem hiding this comment.
I was hoping the backports would tell us if this is present in previous versions as well. But they do not work automatically.
There was a problem hiding this comment.
test is passing in stable34 so this seems to be a recent regression.
There was a problem hiding this comment.
The test was just being flaky. The underlying cause is that Etags will not be updated if the mtime does not change. So if the file was initially written in the same second the update happened the update will not be propagated.
This problem is specific to our test setup - as usually one does not update a file multiple times per second. I'll adjust the test to account for this.
…slow The test often exceeds the default timeout in CI. Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Max <max@nextcloud.com>
|
/backport! to stable34 please |
|
/backport! to stable33 please |
|
The backport to # Switch to the target branch and update it
git checkout stable33
git pull origin stable33
# Create the new backport branch
git checkout -b backport/9021/stable33
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick b9c85053 86f6d68a bd5cc743
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/9021/stable33Error: Failed to check for changes with origin/stable33: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
Etags will not be updated if the mtime does not change. So if the file was overwritten within the same second it was created the mtime and the etag will remain the same and the outdated cached content will be distributed. This problem is specific to our test setup. Usually one does not update a file multiple times per second. Adjust the test to ensure the mtime changes. Signed-off-by: Max <max@nextcloud.com>
|
The backport to # Switch to the target branch and update it
git checkout stable33
git pull origin stable33
# Create the new backport branch
git checkout -b backport/9021/stable33
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick b9c85053 86f6d68a bd5cc743 cb19d998
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/9021/stable33Error: Failed to check for changes with origin/stable33: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
|
The backport to # Switch to the target branch and update it
git checkout stable34
git pull origin stable34
# Create the new backport branch
git checkout -b backport/9021/stable34
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick b9c85053 86f6d68a bd5cc743 cb19d998
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/9021/stable34Error: Failed to create pull request: Validation Failed: {"resource":"PullRequest","code":"custom","message":"A pull request already exists for nextcloud:backport/9021/stable34."} - https://docs.github.com/rest/pulls/pulls#create-a-pull-request Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
|
/backport to stable34 |
Assisted-by: OpenCode:claude-fable-5
🏁 Checklist
npm run lint/npm run stylelint/composer run cs:check)🤖 AI (if applicable)