text/cypress
Max 117d10db3c
test: simplify cypress links and Table test
* No need to visit the files app before creating a folder anymore.
* The empty file is... empty - no need to clear its content.

Signed-off-by: Max <max@nextcloud.com>
2022-12-12 12:16:26 +01:00
..
e2e test: simplify cypress links and Table test 2022-12-12 12:16:26 +01:00
fixtures fix: flaky sections test 2022-12-12 11:52:05 +01:00
support fix: flaky sections test 2022-12-12 11:52:05 +01:00
utils cleanup: files app load in initUserAndFiles 2022-12-07 23:38:03 +01:00
.env
.eslintrc.json (#2184): add eslint-plugin-cypress 2022-03-14 11:38:29 -03:00
Dockerfile Fix docker container for local cypress tests 2022-06-30 17:16:05 +02:00
README.md cypress: Use createUser and login from @nextcloud/cypress 2022-11-30 11:30:53 +01:00
docker-compose.yml Fix docker container for local cypress tests 2022-06-30 17:16:05 +02:00
entrypoint.sh Fix docker container for local cypress tests 2022-06-30 17:16:05 +02:00
runLocal.sh Fix docker container for local cypress tests 2022-06-30 17:16:05 +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
nextcloudUpdateUser Update user setting user, password, key, value
nextcloudDeleteUser Delete user user
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

Commands from @nextcloud/cypress

We also use some commands from @nextcloud/cypress:

  • login(user)
  • logout()
  • createRandomUser().then(user => login(user))
  • createUser(user)

see https://github.com/nextcloud/nextcloud-cypress