text/cypress
Max 79e6709fe1
fix(cy): avoid double upload to prevent lock error
`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>
2024-12-10 13:54:27 +01:00
..
component fix(sync): Do not resend document state in first push. 2024-11-25 10:41:34 +01:00
e2e fix(cy): avoid double upload to prevent lock error 2024-12-10 13:54:27 +01:00
fixtures feat: Move search highlighting to editor API (#6199) 2024-08-13 10:34:21 -04:00
snapshots/base/cypress/e2e/print.spec.js chore: Update cypress snapshots 2024-11-26 23:07:31 +01:00
support test(cy): introduce insertLine command 2024-10-02 07:00:17 +02:00
utils chore: Add SPDX headers 2024-06-14 11:56:34 +02:00
.env chore: Add SPDX headers 2024-06-14 11:56:34 +02:00
.eslintrc.json (#2184): add eslint-plugin-cypress 2022-03-14 11:38:29 -03:00
Dockerfile chore: Add SPDX headers 2024-06-14 11:56:34 +02:00
README.md chore: Add SPDX headers 2024-06-14 11:56:34 +02:00
docker-compose.yml chore: Add SPDX headers 2024-06-14 11:56:34 +02:00
entrypoint.sh chore: Add SPDX headers 2024-06-14 11:56:34 +02:00
runLocal.sh chore: Add SPDX headers 2024-06-14 11:56:34 +02:00

README.md

Cypress tests

There are some custom cypress commands available making it easier to write tests, for example you can get the editor content and insert text by using

cy.getContent()
    .type('some test')

Available custom commands

Command Function Parameters
uploadFile Upload file fileName, mimeType, target
createFile Create file target, content, mimeType
moveFile Move a file path, destinationPath
copyFile Copy file path, destinationPath
createFolder Create a folder dirName
shareFileToUser Share a file with user userId, password, path, targetUserId
openFile Open file in Viewer / Editor fileName, clickParams
closeFile Close the current file
getFile Get file list element of file fileName
deleteFile Remove a file fileName
reloadFileList Refresh the file list
getEditor Get TipTap Editor element
getContent Get editor content
clearContent Clear the editor content
getMenu Get editor menu bar
getMenuEntry Same as getActionEntry but also searches the overflow menu name
getSubmenuEntry Open parent menu and then return sub menu entry parent, name
getActionEntry Get menu entry name
getActionSubEntry Get submenu entry (after menu clicked) name
openWorkspace Open workspace and return Editor content

We also use some commands from the @nextcloud/cypress package.