Cumulocity-IoT / cumulocity-cypress

Collection of commands and utilities to be used for automating tests for Cumulocity with Cypress.
Apache License 2.0
8 stars 2 forks source link

#19: improve logging of user for c8yclient commands #26

Closed thomaswinkler closed 1 year ago

thomaswinkler commented 1 year ago

c8y/client has some special handling of users that might be confusing when using cy.c8yclient.

Behaviour of cy.c8yclient now changed to:

  1. prefer basic auth if passed as previousSubject as with cy.getAuth(...).c8yclient(...). this is similar to using preferBasicAuth option.
  2. debug logging of CookieAuth and BasicAuth being used or available to c8y/client
  3. debug log user for CookieAuth and BasicAuth

cy.login now stores the logged in user as Cypress env C8Y_LOGGED_IN_USER.

thomaswinkler commented 1 year ago

@hnaether-sag @CGuether is change 1.) now as expected? Thats addressing the problem reported in your tests when cookie user from cy.login was used instead of the user passed into cy.c8yclient via cy.getAuth.