diff --git a/cypress/e2e/conflict.spec.js b/cypress/e2e/conflict.spec.js index 52d2eebc50b..d872fda74d2 100644 --- a/cypress/e2e/conflict.spec.js +++ b/cypress/e2e/conflict.spec.js @@ -1,7 +1,7 @@ /** - * @copyright Copyright (c) 2019 John Molakvoæ + * @copyright Copyright (c) 2022 Nextcloud GmbH and Nextcloud contributors * - * @author John Molakvoæ + * @author Max * * @license AGPL-3.0-or-later * @@ -20,9 +20,7 @@ * */ -import { initUserAndFiles, randUser } from '../utils/index.js' - -const user = randUser() +import { randUser } from '../utils/index.js' const variants = [ { fixture: 'lines.txt', mime: 'text/plain' }, @@ -30,18 +28,19 @@ const variants = [ ] variants.forEach(function({ fixture, mime }) { + const user = randUser() const fileName = fixture const prefix = mime.replaceAll('/', '-') describe(`${mime} (${fileName})`, function() { const getWrapper = () => cy.get('.text-editor__wrapper.has-conflicts') before(() => { - initUserAndFiles(user) + cy.createUser(user) }) beforeEach(function() { cy.login(user) - cy.isolateTest({ sourceFile: fileName }) + cy.createTestFolder() }) it(prefix + ': no actual conflict - just reload', function() { @@ -140,6 +139,10 @@ variants.forEach(function({ fixture, mime }) { * @param {string} mime - mimetype */ function createConflict(fileName, mime) { + cy.testName().then(testName => { + cy.uploadFile(fileName, mime, `${testName}/${fileName}`) + }) + cy.visitTestFolder() cy.openFile(fileName) cy.log('Inspect editor') cy.getEditor().find('.ProseMirror').should('have.attr', 'contenteditable', 'true')