add cypress login commands

This commit is contained in:
Yisroel Baum 2026-04-24 16:07:07 +03:00
parent 95f7f1cb78
commit 49c5ed49b0
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

@ -1,25 +1,15 @@
// *********************************************** Cypress.Commands.add('login', (email, password) => {
// This example commands.js shows you how to cy.request({
// create various custom commands and overwrite method: 'POST',
// existing commands. url: '/api/auth/login',
// body: { email, password },
// For more comprehensive examples of custom })
// commands please read more here: })
// https://on.cypress.io/custom-commands
// *********************************************** Cypress.Commands.add('loginAsAdmin', () => {
// cy.login('admin@example.com', 'admin1234')
// })
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... }) Cypress.Commands.add('loginAsUser', () => {
// cy.login('user@example.com', 'password1')
// })
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })