Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
e2e test setup & test implementation (#12)
* adding feature file * adding cucumber config * adding test:e2e script to package.json * adding 3DViewerContext.ts including boilerplate steps * fix typo * adding some selectors * adding a file for testing * fix indentation * add cucumber.cjs * add e2e config.js * update test:e2e * rename ViewerContext.ts and move selectors to new script in pageObjects * add some more config stuff * refactor config, move stuff into hooks script * update feature file * update steps * fix import * update feature file and steps * add specific feature to script since there is only one feature * adding more models for testing * add column title for data table * draft implementation of steps * add imports * updating base url * remove user store (for simplicity, since we only have one user in the given scenario) * implement first 5 steps of the scenario & adding some notes for checking mouse input * skip steps related to rotate, zoom and reset for now * adding boilerplate code for check fullscreen mode & check standard display mode still needs to be implemented properly * code clean up * adding lint:fix * add missing comma * remove lint * adding lint again * code style improvements by lint * adding lint:fix * deactivate step regarding topbar visibility in full screen mode * adding test for full screen mode * lint improvements * remove unnecessary code * adding test for existence of fullscreen pseudo class * remove vue gettext Co-authored-by: Sawjan Gurung <[email protected]> * remove empty lines Co-authored-by: Sawjan Gurung <[email protected]> * remove playwright dependency Co-authored-by: Sawjan Gurung <[email protected]> * Update pnpm-lock.yaml * extending from root tsconfig * uncommenting unnecessary line in scenario * removing @ownclouders/tsconfig dependency Co-authored-by: Sawjan Gurung <[email protected]> * Update pnpm-lock.yaml * remove unnecessary steps from scenario * remove unneeded step implementation and refactor checkTopbarVisibility() function * Update cucumber.cjs avoid using require config.js Co-authored-by: Sawjan Gurung <[email protected]> * make login function static Co-authored-by: Sawjan Gurung <[email protected]> * renaming config.js to config.ts * adding node dependency * remove unused selector * set response type to any * change file type back to js * fix typo in header of config * fix syntax error about static async * undo static login * fix lint error * refactoring adding Ocis pageObject * convert config.js to .ts * using path instead of join-path Co-authored-by: Sawjan Gurung <[email protected]> * adding path. prefix * removing join-path dependency * Update tests/e2e/config.ts Co-authored-by: Sawjan Gurung <[email protected]> * removing unused import * trying to make functions in Ocis.ts static * refactoring (creating helpers.ts) * refactoring deleteAllFiles() * fix lint error * adding PROXY_ENABLE_BASIC_AUTH * update scenario * Refactoring how files are uploaded and deleted (using API instead of UI), added try/catch for makeApiRequest * fix lint issues * storing filenames and deleting all files dynamically after test * moving previewFile to Ocis.ts, code cleanup * refactoring (define getter in pageObject, do assertion in Context) WiP * add error message if uploadFile is not successful * defining response * fix error in full screen assertion step * fix lint errors * remove state and use global variable instead * fix imports * move viewer and ocis constructor outside the steps * refactor remaining steps * pseudo code implementation of model modification * adding modifyModelRotation() function * implementing modifyModelZoom() and removing some other code and comments * changes in viewer context * updating steps * replacing previous models with smaller models the models are from https://3dexport.com/ and were originally called Low Poly Tree GLTF.glb and Tea-pot_glb.glb * removing logout function that is no longer used in any step of the tests * remove unused helper function and update values for zoom * fix lint error * clean up code * remove empty space Co-authored-by: Sawjan Gurung <[email protected]> * remove comment Co-authored-by: Sawjan Gurung <[email protected]> * remove section regarding rotate, zoom & reset from scenario * remove implementation of these steps * remove functions related to the steps that have been removed * fix delay with playwright function * update misspelling in step * make assertion stricter * adding assert for first given step * correcting lint error * rename helper function * remove some comment * change "fullscreen" to "full screen" * update name of button * renaming feature file * updating package.json * make check of viewport description tighter to avoid flaky tests * fix lint error * renaming file * renaming file * renaming steps file * adding assertion for successful login * assert status code for file upload * return response status code for delete file * refactoring deleteAllFiles method * fix lint error * adding status check for emptyTrashbin method * Update and rename ModelViewerPage.ts to modelViewerPage.ts * Update and rename OcisWebPage.ts to ocisWebPage.ts * update import * updating test:e2e script --------- Co-authored-by: Sawjan Gurung <[email protected]>
- Loading branch information