text/cypress
Ferdinand Thiessen e89292f4d3 Add tests for heading anchors and inter-page links
Also added a chai assertion for checking an element
is currently shown in the viewport of the window.
This is needed as the cypress visibility checks fail
for tiptap elements, as they are overlaid by the author color / names.

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
2022-09-13 17:57:51 +02:00
..
e2e Add tests for heading anchors and inter-page links 2022-09-13 17:57:51 +02:00
fixtures rename cypress attachment tests, add one for media upload 2022-09-06 14:44:54 +02:00
support 🐛 fix missing sharing token 2022-09-03 12:27:36 -03:00
utils test: try to make image test retryable 2022-06-30 14:35:24 -03:00
.env Add public share page tests 2020-01-04 13:37:02 +01:00
.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 Clean up cypress tests 2022-06-30 13:41:01 -03: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
login Log in user user, password
logout Logout
nextcloudCreateUser Create a new user user, password
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
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
getActionEntry Get menu entry name
openWorkspace Open workspace and return Editor content