Skip to content

Commit

Permalink
fix(cy): avoid double upload to prevent lock error
Browse files Browse the repository at this point in the history
`isolateTest` in `beforeEach` already uploads the file.

Uploading it again in the `no actual conflict - just reload` case

sometimes led to 423 - Locked responses.

Use `cy.createTestDir()` instead and upload only once.

Signed-off-by: Max <max@nextcloud.com>

[skip ci]
  • Loading branch information
max-nextcloud authored and backportbot[bot] committed Dec 10, 2024
1 parent e738295 commit fd9b141
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cypress/e2e/conflict.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
* @copyright Copyright (c) 2022 Nextcloud GmbH and Nextcloud contributors
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
* @author Max <max@nextcloud.com>
*
* @license AGPL-3.0-or-later
*
Expand All @@ -20,16 +20,15 @@
*
*/

import { initUserAndFiles, randUser } from '../utils/index.js'

const user = randUser()
import { randUser } from '../utils/index.js'

const variants = [
{ fixture: 'lines.txt', mime: 'text/plain' },
{ fixture: 'test.md', mime: 'text/markdown' },
]

variants.forEach(function({ fixture, mime }) {
const user = randUser()
const fileName = fixture
describe(`${mime} (${fileName})`, function() {
const getWrapper = () => cy.get('.text-editor__wrapper.has-conflicts')
Expand Down

0 comments on commit fd9b141

Please sign in to comment.