Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e test setup & test implementation #12

Merged
merged 132 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from 117 commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
e01fdc2
adding feature file
koebel Mar 12, 2024
621b3fe
adding cucumber config
koebel Mar 12, 2024
0fafb30
adding test:e2e script to package.json
koebel Mar 12, 2024
543a386
adding 3DViewerContext.ts including boilerplate steps
koebel Mar 12, 2024
939804b
fix typo
koebel Mar 12, 2024
b20b57d
adding some selectors
koebel Mar 12, 2024
a8e2d32
adding a file for testing
koebel Mar 12, 2024
7854fea
fix indentation
koebel Mar 12, 2024
b2a00f5
add cucumber.cjs
koebel Mar 13, 2024
704338d
add e2e config.js
koebel Mar 13, 2024
afec419
update test:e2e
koebel Mar 13, 2024
c2f770d
rename ViewerContext.ts and move selectors to new script in pageObjects
koebel Mar 13, 2024
ed8e539
add some more config stuff
koebel Mar 13, 2024
1761b34
refactor config, move stuff into hooks script
koebel Mar 14, 2024
8c12163
update feature file
koebel Mar 14, 2024
d5cfd8c
update steps
koebel Mar 14, 2024
a896fc2
fix import
koebel Mar 14, 2024
488d0c2
update feature file and steps
koebel Mar 14, 2024
d02bd1d
add specific feature to script since there is only one feature
koebel Mar 15, 2024
f9afaf0
adding more models for testing
koebel Mar 15, 2024
36577ac
add column title for data table
koebel Mar 15, 2024
3ce96d6
draft implementation of steps
koebel Mar 15, 2024
a05d600
add imports
koebel Mar 18, 2024
f33e0f6
updating base url
koebel Mar 18, 2024
b9edb9b
remove user store (for simplicity, since we only have one user in the…
koebel Mar 18, 2024
f9d9c1f
implement first 5 steps of the scenario & adding some notes for check…
koebel Mar 18, 2024
59c8c53
skip steps related to rotate, zoom and reset for now
koebel Mar 20, 2024
793d1dd
adding boilerplate code for check fullscreen mode & check standard di…
koebel Mar 20, 2024
afd513f
Merge branch 'master' into e2e-test-setup
koebel Mar 20, 2024
4d2a4c9
code clean up
koebel Mar 20, 2024
be30f95
Merge branch 'e2e-test-setup' of https://github.com/koebel/web-app-3d…
koebel Mar 20, 2024
f2277ec
adding lint:fix
koebel Mar 26, 2024
29b412e
add missing comma
koebel Mar 27, 2024
50217c8
remove lint
koebel Mar 27, 2024
44bb4c5
adding lint again
koebel Mar 27, 2024
abc8115
code style improvements by lint
koebel Mar 27, 2024
9d5a448
adding lint:fix
koebel Mar 27, 2024
808ab24
deactivate step regarding topbar visibility in full screen mode
koebel Mar 27, 2024
65bed82
adding test for full screen mode
koebel Mar 27, 2024
5fe274f
lint improvements
koebel Mar 27, 2024
60ab7bf
remove unnecessary code
koebel Mar 27, 2024
f2dd1a9
adding test for existence of fullscreen pseudo class
koebel Mar 27, 2024
731038f
remove vue gettext
koebel Mar 28, 2024
85d2b10
remove empty lines
koebel Mar 28, 2024
f0c1bef
remove playwright dependency
koebel Mar 28, 2024
0905a8f
Update pnpm-lock.yaml
koebel Mar 28, 2024
a35d223
extending from root tsconfig
koebel Mar 28, 2024
4c6c02a
uncommenting unnecessary line in scenario
koebel Mar 28, 2024
3a18d27
removing @ownclouders/tsconfig dependency
koebel Mar 28, 2024
95652c6
Update pnpm-lock.yaml
koebel Mar 28, 2024
81a52f4
remove unnecessary steps from scenario
koebel Apr 2, 2024
b404e50
remove unneeded step implementation and refactor checkTopbarVisibilit…
koebel Apr 2, 2024
5899dd0
Update cucumber.cjs
koebel Apr 2, 2024
511bb87
make login function static
koebel Apr 2, 2024
ed238d3
renaming config.js to config.ts
koebel Apr 2, 2024
5525603
adding node dependency
koebel Apr 2, 2024
f555d60
remove unused selector
koebel Apr 2, 2024
037a90d
set response type to any
koebel Apr 2, 2024
b11f032
change file type back to js
koebel Apr 2, 2024
712c8c5
fix typo in header of config
koebel Apr 2, 2024
cc5cc63
fix syntax error about static async
koebel Apr 2, 2024
bc1456b
undo static login
koebel Apr 2, 2024
941f08b
fix lint error
koebel Apr 2, 2024
d4d8722
refactoring adding Ocis pageObject
koebel Apr 2, 2024
9c8f52e
convert config.js to .ts
koebel Apr 2, 2024
edd3bcf
using path instead of join-path
koebel Apr 2, 2024
a3c6806
adding path. prefix
koebel Apr 2, 2024
996910e
removing join-path dependency
koebel Apr 2, 2024
04c9851
Update tests/e2e/config.ts
koebel Apr 2, 2024
436e1b6
removing unused import
koebel Apr 2, 2024
38082fb
Merge branch 'e2e-test-setup' of https://github.com/koebel/web-app-3d…
koebel Apr 2, 2024
4624076
trying to make functions in Ocis.ts static
koebel Apr 3, 2024
6ddab4f
refactoring (creating helpers.ts)
koebel Apr 3, 2024
fdc73d8
refactoring deleteAllFiles()
koebel Apr 4, 2024
13ea730
fix lint error
koebel Apr 4, 2024
799ed52
adding PROXY_ENABLE_BASIC_AUTH
koebel Apr 5, 2024
f449cdc
update scenario
koebel Apr 5, 2024
169c097
Refactoring how files are uploaded and deleted (using API instead of …
koebel Apr 5, 2024
182f1d1
fix lint issues
koebel Apr 5, 2024
25370bd
storing filenames and deleting all files dynamically after test
koebel Apr 5, 2024
a6941ad
moving previewFile to Ocis.ts, code cleanup
koebel Apr 5, 2024
fa10065
refactoring (define getter in pageObject, do assertion in Context)
koebel Apr 9, 2024
a4738ff
add error message if uploadFile is not successful
koebel Apr 11, 2024
bdb6f8e
defining response
koebel Apr 11, 2024
304a3b6
fix error in full screen assertion step
koebel Apr 11, 2024
d7c3e8f
fix lint errors
koebel Apr 11, 2024
f860705
remove state and use global variable instead
koebel Apr 11, 2024
ca2b944
fix imports
koebel Apr 11, 2024
ee3efef
move viewer and ocis constructor outside the steps
koebel Apr 11, 2024
6996984
refactor remaining steps
koebel Apr 11, 2024
4166e04
pseudo code implementation of model modification
koebel Apr 11, 2024
981053f
adding modifyModelRotation() function
koebel Apr 11, 2024
8914efd
implementing modifyModelZoom() and removing some other code and comments
koebel Apr 12, 2024
3648e19
changes in viewer context
koebel Apr 12, 2024
d9a2988
updating steps
koebel Apr 12, 2024
d6c3675
replacing previous models with smaller models
koebel Apr 12, 2024
7ae69fd
removing logout function that is no longer used in any step of the tests
koebel Apr 12, 2024
b80690d
remove unused helper function and update values for zoom
koebel Apr 12, 2024
715b8de
fix lint error
koebel Apr 12, 2024
5c070f5
clean up code
koebel Apr 12, 2024
0d4a2df
remove empty space
koebel Apr 17, 2024
1f177a7
remove comment
koebel Apr 17, 2024
d0022b6
remove section regarding rotate, zoom & reset from scenario
koebel Apr 17, 2024
905ae19
Merge branch 'e2e-test-setup' of https://github.com/koebel/web-app-3d…
koebel Apr 17, 2024
412e59e
remove implementation of these steps
koebel Apr 17, 2024
eabf724
remove functions related to the steps that have been removed
koebel Apr 17, 2024
3bd1668
fix delay with playwright function
koebel Apr 17, 2024
d2a37ee
update misspelling in step
koebel Apr 18, 2024
b8ba6d7
make assertion stricter
koebel Apr 18, 2024
a267a5b
adding assert for first given step
koebel May 8, 2024
1b2aada
correcting lint error
koebel May 8, 2024
b967329
rename helper function
koebel May 20, 2024
058ebf1
remove some comment
koebel May 20, 2024
ce5fa63
change "fullscreen" to "full screen"
koebel May 20, 2024
5937c0b
update name of button
koebel May 20, 2024
c20fdad
renaming feature file
koebel May 20, 2024
914bc99
updating package.json
koebel May 20, 2024
3f7a11a
make check of viewport description tighter to avoid flaky tests
koebel May 24, 2024
5954ebc
fix lint error
koebel May 24, 2024
b0c27ac
renaming file
koebel May 24, 2024
c6e05f3
renaming file
koebel May 24, 2024
59797a0
renaming steps file
koebel May 29, 2024
1c4737e
adding assertion for successful login
koebel May 29, 2024
d29b019
assert status code for file upload
koebel Jul 15, 2024
b3c9299
return response status code for delete file
koebel Jul 15, 2024
a06d7ca
refactoring deleteAllFiles method
koebel Jul 15, 2024
1de1f7f
fix lint error
koebel Jul 15, 2024
33aa443
adding status check for emptyTrashbin method
koebel Jul 15, 2024
096849d
Update and rename ModelViewerPage.ts to modelViewerPage.ts
koebel Jul 15, 2024
9e2653b
Update and rename OcisWebPage.ts to ocisWebPage.ts
koebel Jul 15, 2024
e54fd8f
update import
koebel Jul 15, 2024
82e6283
updating test:e2e script
koebel Jul 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions cucumber.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
default: {
require: ["tests/e2e/**/*.ts"],
requireModule: ["ts-node/register"],
retry: process.env.RETRY || 0,
format: ["@cucumber/pretty-formatter"]
}
}

// see https://github.com/cucumber/cucumber-js/blob/main/docs/configuration.md for documentation
koebel marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
OCIS_INSECURE: true
OCIS_LOG_LEVEL: error
IDM_ADMIN_PASSWORD: admin
PROXY_ENABLE_BASIC_AUTH: true
WEB_UI_CONFIG_FILE: /etc/ocis/web.json
volumes:
- ./dev/web.json:/etc/ocis/web.json:ro
Expand Down
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"scripts": {
"build": "pnpm vite build",
"build:w": "pnpm vite build -w -m development",
"lint": "eslint './*.{js,ts}' '{src,tests}/**/*.{js,ts,vue}' --color"
"test:e2e": "NODE_TLS_REJECT_UNAUTHORIZED=0 TS_NODE_PROJECT=./tests/e2e/tsconfig.json cucumber-js tests/e2e/features/previewModelWith3DViewer.feature",
koebel marked this conversation as resolved.
Show resolved Hide resolved
"lint": "eslint './*.{js,ts}' '{src,tests}/**/*.{js,ts,vue}' --color",
"lint:fix": "pnpm lint --fix"
},
"keywords": [
"owncloud",
Expand All @@ -20,17 +22,24 @@
],
"devDependencies": {
"@babel/eslint-parser": "^7.23.10",
"@cucumber/cucumber": "^10.3.1",
"@cucumber/pretty-formatter": "^1.0.0",
"@ownclouders/extension-sdk": "0.0.5-alpha.2",
"@ownclouders/prettier-config": "^0.0.1",
"@playwright/test": "^1.41.2",
"@types/node": "^20.12.2",
"@types/three": "^0.161.2",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@vitejs/plugin-vue": "^4.0.0",
"axios": "^1.6.7",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier-vue": "^5.0.0",
"eslint-plugin-unused-imports": "^3.1.0",
"eslint-plugin-vue": "^9.23.0",
"lodash": "^4.17.21",
"three": "^0.160.0",
"ts-node": "^10.9.2",
"vite": "^5.0.12",
"vue": "^3.4.15"
},
Expand Down
Loading