Quickly Create A User And Log in Using Dependent Data Sessions

Veröffentlicht am: 05 Oktober 2021
auf dem Kanal: gleb bahmutov
670
12

Let's say you need to create a user and log in. Do you recreate the user before each test? No, you use cy.dataSession from the cypress-data-session plugin to only create the user if needed. How do you log in? You use another cy.dataSession to execute the commands, and cache the session cookie. And the final step: if the user data session is invalidated, and the user is recreated, then the cookie data session is automatically invalidated using the "dependsOn" parameter linking the second data session to the first one. See the full source code in https://github.com/bahmutov/chat.io


Auf dieser Seite können Sie das Online-Video Quickly Create A User And Log in Using Dependent Data Sessions mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer gleb bahmutov 05 Oktober 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 670 Mal angesehen und es wurde von 12 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!