From f7292d4d9c2c5b0098642b50b3870cb1f1235c32 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 14 Dec 2023 20:40:21 +0100 Subject: [PATCH] debug: run spec 4 times in different containers Signed-off-by: Max --- .github/workflows/cypress.yml | 2 +- cypress/e2e/debug2.spec.js | 43 +++++++++++++++++++++++++++++++++++ cypress/e2e/debug3.spec.js | 43 +++++++++++++++++++++++++++++++++++ cypress/e2e/debug4.spec.js | 43 +++++++++++++++++++++++++++++++++++ 4 files changed, 130 insertions(+), 1 deletion(-) create mode 100644 cypress/e2e/debug2.spec.js create mode 100644 cypress/e2e/debug3.spec.js create mode 100644 cypress/e2e/debug4.spec.js diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index a5a85f8cc89..fbd199d210b 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -83,7 +83,7 @@ jobs: fail-fast: false matrix: node-version: [16] - containers: [1] + containers: [1, 2, 3, 4] php-versions: [ '8.1' ] server-versions: [ 'stable28' ] run-in-parallel: diff --git a/cypress/e2e/debug2.spec.js b/cypress/e2e/debug2.spec.js new file mode 100644 index 00000000000..23888ad2e80 --- /dev/null +++ b/cypress/e2e/debug2.spec.js @@ -0,0 +1,43 @@ +/** + * @copyright Copyright (c) 2021 Julien Veyssier + * + * @author Julien Veyssier + * + * @license AGPL-3.0-or-later + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +import { randUser } from '../utils/index.js' + +const user = randUser() + +describe('Test all attachment insertion methods', () => { + before(() => { + cy.createUser(user) + }) + + it('deletes file just fine', () => { + cy.login(user) + const fileName = 'deleteMe.md' + cy.createFile(fileName, '# Hello world!', 'text/markdown') + cy.visit('/apps/files') + cy.getFile(fileName) + .should('exist') + cy.deleteFile(fileName) + cy.reloadFileList() + }) + +}) diff --git a/cypress/e2e/debug3.spec.js b/cypress/e2e/debug3.spec.js new file mode 100644 index 00000000000..23888ad2e80 --- /dev/null +++ b/cypress/e2e/debug3.spec.js @@ -0,0 +1,43 @@ +/** + * @copyright Copyright (c) 2021 Julien Veyssier + * + * @author Julien Veyssier + * + * @license AGPL-3.0-or-later + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +import { randUser } from '../utils/index.js' + +const user = randUser() + +describe('Test all attachment insertion methods', () => { + before(() => { + cy.createUser(user) + }) + + it('deletes file just fine', () => { + cy.login(user) + const fileName = 'deleteMe.md' + cy.createFile(fileName, '# Hello world!', 'text/markdown') + cy.visit('/apps/files') + cy.getFile(fileName) + .should('exist') + cy.deleteFile(fileName) + cy.reloadFileList() + }) + +}) diff --git a/cypress/e2e/debug4.spec.js b/cypress/e2e/debug4.spec.js new file mode 100644 index 00000000000..23888ad2e80 --- /dev/null +++ b/cypress/e2e/debug4.spec.js @@ -0,0 +1,43 @@ +/** + * @copyright Copyright (c) 2021 Julien Veyssier + * + * @author Julien Veyssier + * + * @license AGPL-3.0-or-later + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +import { randUser } from '../utils/index.js' + +const user = randUser() + +describe('Test all attachment insertion methods', () => { + before(() => { + cy.createUser(user) + }) + + it('deletes file just fine', () => { + cy.login(user) + const fileName = 'deleteMe.md' + cy.createFile(fileName, '# Hello world!', 'text/markdown') + cy.visit('/apps/files') + cy.getFile(fileName) + .should('exist') + cy.deleteFile(fileName) + cy.reloadFileList() + }) + +})