Skip to content

Commit

Permalink
chore(cypress): adjust files-sidebar.cy.ts
Browse files Browse the repository at this point in the history
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Aug 2, 2024
1 parent 8cd3154 commit cefcf07
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 31 deletions.
28 changes: 4 additions & 24 deletions cypress/e2e/files/files-sidebar.cy.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
/**
* @copyright Copyright (c) 2024 Ferdinand Thiessen <opensource@fthiessen.de>
*
* @author Ferdinand Thiessen <opensource@fthiessen.de>
*
* @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 <http://www.gnu.org/licenses/>.
*
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import type { User } from '@nextcloud/cypress'
Expand Down Expand Up @@ -87,9 +70,8 @@ describe('Files: Sidebar', { testIsolation: true }, () => {
// open the sidebar
triggerActionForFile('file', 'details')
// validate it is open
cy.get('[data-cy-sidebar]').should('be.visible')
// wait for the sidebar to be settled
cy.wait(500)
cy.get('[data-cy-sidebar]')
.should('be.visible')

// if we navigate to the folder
navigateToFolder('folder')
Expand Down Expand Up @@ -132,8 +114,6 @@ describe('Files: Sidebar', { testIsolation: true }, () => {
// validate it is open
cy.get('[data-cy-sidebar]').should('be.visible')
cy.url().should('contain', `apps/files/files/${otherFileId}`)
// wait for the sidebar to be settled
cy.wait(500)

triggerActionForFile('other', 'delete')
cy.wait('@deleteFile')
Expand Down
1 change: 1 addition & 0 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { addCommands, User } from '@nextcloud/cypress'
import { basename } from 'path'

// Add custom commands
import '@testing-library/cypress/add-commands'
import 'cypress-if'
import 'cypress-wait-until'
addCommands()
Expand Down
128 changes: 122 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
"@nextcloud/stylelint-config": "^2.1.2",
"@nextcloud/webpack-vue-config": "^6.0.1",
"@pinia/testing": "^0.1.2",
"@testing-library/cypress": "^10.0.2",
"@testing-library/jest-dom": "^6.1.5",
"@testing-library/user-event": "^14.4.3",
"@testing-library/vue": "^5.8.3",
Expand All @@ -144,7 +145,7 @@
"babel-loader-exclude-node-modules-except": "^1.2.1",
"colord": "^2.9.3",
"css-loader": "^6.8.1",
"cypress": "^13.7.3",
"cypress": "^13.13.2",
"cypress-axe": "^1.5.0",
"cypress-if": "^1.10.5",
"cypress-split": "^1.21.0",
Expand Down

0 comments on commit cefcf07

Please sign in to comment.