1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# 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
```js
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 | |
|