saleor-dashboard/cypress/support/user/index.js
M.Graczyk ef967eb5e4
Refactor of login tests (#630)
* WIP refactor of login tests

* Xit not woriking tests, fixed rest of them

* Properly pass env vars to cypress

* Remove unused code

Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>
2020-08-20 15:36:00 +02:00

11 lines
356 B
JavaScript

import { LOGIN_SELECTORS } from "../../elements/account/login-selectors";
Cypress.Commands.add("loginUser", () =>
cy
.get(LOGIN_SELECTORS.emailAddressInput)
.type(Cypress.env("USER_NAME"))
.get(LOGIN_SELECTORS.emailPasswordInput)
.type(Cypress.env("USER_PASSWORD"), { log: false })
.get(LOGIN_SELECTORS.signInButton)
.click()
);