Our legacy Application is developed with AngularJS(app folder in the picture) but now started with nx (Angular) for the new feature development (which is in web-apps
within the app).
My question is NX by default support cypress, where as AngularJS does not support cypress. I want to add cypress at root level directly (which is on AngularJS) level and should also support XN developed features. i want to write e2e test cases that can run on jenkins pipeline once before the build.
-
1Component tests or end-to-end? In the latter case it shouldn't matter to your tests which (if any) front-end framework is in use; Cypress just drives the browser.jonrsharpe– jonrsharpe2023年05月05日 20:40:46 +00:00Commented May 5, 2023 at 20:40
-
1@MaryumKhan What have you tried so far? Have you seen any error or problem?João Farias– João Farias2023年05月07日 09:28:22 +00:00Commented May 7, 2023 at 9:28
-
i want to write e2e test cases that can run on jenkins pipeline once before the build.Maryum Khan– Maryum Khan2023年05月07日 21:24:59 +00:00Commented May 7, 2023 at 21:24
-
1Does this answer your question? How to Use Cypress with AngularJS application and Angular as wellIAmMilinPatel– IAmMilinPatel2023年05月08日 04:03:33 +00:00Commented May 8, 2023 at 4:03
1 Answer 1
Cypress is browser automation and is not typically specific to a development framework. It may or may not be installed in the same repo as the application code.
To use it you do need to install it, e.g. npm install cypress -D
and have it in your package.json for the project you want. Or a higher level directory in the git repo. Or a separate repo. I recommend keeping it in the same repo as it encourages more use by app devs. It then becomes a dependency of the project in order to run cypress but not of the Angular application itself.
-
i want to write e2e test cases that can run on jenkins pipeline once before the build. does it make any difference if i have angular and angularJS both in one repository,Maryum Khan– Maryum Khan2023年05月07日 21:24:32 +00:00Commented May 7, 2023 at 21:24
-
Is your question about building different Angular applications in Jenkins using one repo? If so it is not about cypress and is about application configuration and maybe belongs on the main site.Michael Durrant– Michael Durrant2023年05月08日 17:23:14 +00:00Commented May 8, 2023 at 17:23