-
Notifications
You must be signed in to change notification settings - Fork 25
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
Cypress: find a way to preserve auth info and server in 'after' part of tests #1220
Labels
dev: tests
For all types of tests: unit tests, e2e (Cypress)...
developers
From a developer point of view.
Comments
AoNoOokami
pushed a commit
to AoNoOokami/rero-ils
that referenced
this issue
Oct 27, 2020
* Creates e2e tests for collections. * Replaces 'goToMenu' custom command in order not to go to the frontpage each time we navigate in the app. * Adds an empty template to re-use for test creation. * Renames 'templates' in 'examples' in order to avoid confusion with rero-ils template resource. * Adds cookies preservation to keep authentication information between tests. * Improves login and logout methods. * Allows language preservation in professional interface. * Closes rero#1220. Co-Authored-by: Alicia Zangger <[email protected]>
AoNoOokami
pushed a commit
to AoNoOokami/rero-ils
that referenced
this issue
Oct 28, 2020
* Creates e2e tests for collections. * Replaces 'goToMenu' custom command in order not to go to the frontpage each time we navigate in the app. * Adds an empty template to re-use for test creation. * Renames 'templates' in 'examples' in order to avoid confusion with rero-ils template resource. * Adds cookies preservation to keep authentication information between tests. * Improves login and logout methods. * Allows language preservation in professional interface. * Closes rero#1220. Co-Authored-by: Alicia Zangger <[email protected]>
6 tasks
AoNoOokami
pushed a commit
to AoNoOokami/rero-ils
that referenced
this issue
Oct 28, 2020
* Creates e2e tests for collections. * Replaces 'goToMenu' custom command in order not to go to the frontpage each time we navigate in the app. * Adds an empty template to re-use for test creation. * Renames 'templates' in 'examples' in order to avoid confusion with rero-ils template resource. * Adds cookies preservation to keep authentication information between tests. * Improves login and logout methods. * Allows language preservation in professional interface. * Closes rero#1220. Co-Authored-by: Alicia Zangger <[email protected]>
AoNoOokami
pushed a commit
to AoNoOokami/rero-ils
that referenced
this issue
Oct 30, 2020
* Creates e2e tests for collections. * Replaces 'goToMenu' custom command in order not to go to the frontpage each time we navigate in the app. * Adds an empty template to re-use for test creation. * Renames 'templates' in 'examples' in order to avoid confusion with rero-ils template resource. * Adds cookies preservation to keep authentication information between tests. * Changes login and logout commands in order to use API calls instead of UI actions. * Adds a test for login and logout (UI actions). * Allows language preservation in professional interface. * Closes rero#1220. Co-Authored-by: Alicia Zangger <[email protected]>
AoNoOokami
pushed a commit
to AoNoOokami/rero-ils
that referenced
this issue
Oct 30, 2020
* Creates e2e tests for collections. * Replaces 'goToMenu' custom command in order not to go to the frontpage each time we navigate in the app. * Adds an empty template to re-use for test creation. * Renames 'templates' in 'examples' in order to avoid confusion with rero-ils template resource. * Adds cookies preservation to keep authentication information between tests. * Changes login and logout commands in order to use API calls instead of UI actions. * Adds a test for login and logout (UI actions). * Improves templates test in order to allow retries if the test fails or don't go to the end. * Allows language preservation in professional interface. * Closes rero#1220. Co-Authored-by: Alicia Zangger <[email protected]>
AoNoOokami
pushed a commit
to AoNoOokami/rero-ils
that referenced
this issue
Oct 30, 2020
* Creates e2e tests for collections. * Replaces 'goToMenu' custom command in order not to go to the frontpage each time we navigate in the app. * Adds an empty template to re-use for test creation. * Renames 'templates' in 'examples' in order to avoid confusion with rero-ils template resource. * Adds cookies preservation to keep authentication information between tests. * Changes login and logout commands in order to use API calls instead of UI actions. * Adds a test for login and logout (UI actions). * Improves templates test in order to allow retries if the test fails or don't go to the end. * Allows language preservation in professional interface. * Closes rero#1220. Co-Authored-by: Alicia Zangger <[email protected]>
AoNoOokami
pushed a commit
to AoNoOokami/rero-ils
that referenced
this issue
Oct 30, 2020
* Creates e2e tests for collections. * Replaces 'goToMenu' custom command in order not to go to the frontpage each time we navigate in the app. * Adds an empty template to re-use for test creation. * Adds cookies preservation to keep authentication information between tests. * Changes login and logout commands in order to use API calls instead of UI actions. * Adds a test for login and logout (UI actions). * Allows language preservation in professional interface. * Closes rero#1220. Co-Authored-by: Alicia Zangger <[email protected]>
AoNoOokami
pushed a commit
to AoNoOokami/rero-ils
that referenced
this issue
Nov 2, 2020
* Creates e2e tests for collections. * Replaces 'goToMenu' custom command in order not to go to the frontpage each time we navigate in the app. * Adds an empty template to re-use for test creation. * Adds cookies preservation to keep authentication information between tests. * Changes login and logout commands in order to use API calls instead of UI actions. * Adds a test for login and logout (UI actions). * Allows language preservation in professional interface. * Closes rero#1220. Co-Authored-by: Alicia Zangger <[email protected]>
AoNoOokami
pushed a commit
to AoNoOokami/rero-ils
that referenced
this issue
Nov 2, 2020
* Creates e2e tests for collections. * Replaces 'goToMenu' custom command in order not to go to the frontpage each time we navigate in the app. * Adds an empty template to re-use for test creation. * Adds cookies preservation to keep authentication information between tests. * Changes login and logout commands in order to use API calls instead of UI actions. * Creates a test for login and logout (UI actions). * Allows language preservation in professional interface. * Closes rero#1220. Co-Authored-by: Alicia Zangger <[email protected]>
AoNoOokami
pushed a commit
to AoNoOokami/rero-ils
that referenced
this issue
Nov 2, 2020
* Creates e2e tests for collections. * Replaces 'goToMenu' custom command in order not to go to the frontpage each time we navigate in the app. * Adds an empty template to re-use for test creation. * Adds cookies preservation to keep authentication information between tests. * Changes login and logout commands in order to use API calls instead of UI actions. * Creates a test for login and logout (UI actions). * Allows language preservation in professional interface. * Closes rero#1220. Co-Authored-by: Alicia Zangger <[email protected]>
AoNoOokami
pushed a commit
to AoNoOokami/rero-ils
that referenced
this issue
Nov 3, 2020
* Creates e2e tests for collections. * Replaces 'goToMenu' custom command in order not to go to the frontpage each time we navigate in the app. * Adds an empty template to re-use for test creation. * Adds cookies preservation to keep authentication information between tests. * Changes login and logout commands in order to use API calls instead of UI actions. * Creates a test for login and logout (UI actions). * Allows language preservation in professional interface. * Closes rero#1220. Co-Authored-by: Alicia Zangger <[email protected]>
AoNoOokami
pushed a commit
that referenced
this issue
Nov 3, 2020
* Creates e2e tests for collections. * Replaces 'goToMenu' custom command in order not to go to the frontpage each time we navigate in the app. * Adds an empty template to re-use for test creation. * Adds cookies preservation to keep authentication information between tests. * Changes login and logout commands in order to use API calls instead of UI actions. * Creates a test for login and logout (UI actions). * Allows language preservation in professional interface. * Closes #1220. Co-Authored-by: Alicia Zangger <[email protected]>
BadrAly
pushed a commit
that referenced
this issue
Nov 5, 2020
* Creates e2e tests for collections. * Replaces 'goToMenu' custom command in order not to go to the frontpage each time we navigate in the app. * Adds an empty template to re-use for test creation. * Adds cookies preservation to keep authentication information between tests. * Changes login and logout commands in order to use API calls instead of UI actions. * Creates a test for login and logout (UI actions). * Allows language preservation in professional interface. * Closes #1220. Co-Authored-by: Alicia Zangger <[email protected]>
zannkukai
pushed a commit
that referenced
this issue
Nov 5, 2020
* Creates e2e tests for collections. * Replaces 'goToMenu' custom command in order not to go to the frontpage each time we navigate in the app. * Adds an empty template to re-use for test creation. * Adds cookies preservation to keep authentication information between tests. * Changes login and logout commands in order to use API calls instead of UI actions. * Creates a test for login and logout (UI actions). * Allows language preservation in professional interface. * Closes #1220. Co-Authored-by: Alicia Zangger <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dev: tests
For all types of tests: unit tests, e2e (Cypress)...
developers
From a developer point of view.
How it works
By now, some code is repeated in the after part of test:
Improvement suggestion
There might be a better way to do this and not repeat the code. Making the hypothesis that both behaviours reported are linked, we may find an answer by managing the cookies during the test. See the documentation here: https://docs.cypress.io/api/cypress-api/cookies.html#Preserve-Once
The text was updated successfully, but these errors were encountered: