Skip to content

Commit 3982ccf

Browse files
committed
test: adjust tests after outlined-material-icons switch
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 9f056f3 commit 3982ccf

File tree

5 files changed

+114
-2
lines changed

5 files changed

+114
-2
lines changed

cypress/e2e/actions/download.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ describe(`Download ${fileName} in viewer`, function() {
4444
it('Download the image', function() {
4545
// open the menu
4646
cy.get('body > .viewer .modal-header button.action-item__menutoggle').click()
47-
// download the file
48-
cy.get('.action-link .download-icon').click()
47+
// download the
48+
cy.findByRole('menuitem', { name: 'Download' }).click()
4949
})
5050

5151
it('Compare downloaded file with asset by size', function() {

cypress/support/commands.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { ShareType } from '@nextcloud/sharing'
99
import { addCompareSnapshotCommand } from 'cypress-visual-regression/dist/command'
1010
import { basename } from 'path'
1111

12+
import '@testing-library/cypress/add-commands'
13+
1214
addCommands()
1315
addCompareSnapshotCommand({
1416
errorThreshold: 0.01,

cypress/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"compilerOptions": {
55
"rootDir": "..",
66
"types": [
7+
"@testing-library/cypress",
78
"cypress",
89
"dockerode",
910
"node"

package-lock.json

Lines changed: 108 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
"@nextcloud/sharing": "^0.2.5",
8383
"@nextcloud/stylelint-config": "^3.1.0",
8484
"@nextcloud/vite-config": "^1.5.6",
85+
"@testing-library/cypress": "^10.0.3",
8586
"@types/dockerode": "^3.3.39",
8687
"@vue/tsconfig": "^0.5.1",
8788
"cypress": "^13.17.0",

0 commit comments

Comments
 (0)