mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
fix: command update
This commit is contained in:
1 parent
2089765c53
commit
ee841b42e7
3 files changed
+14
-6
No files matched your search
@@ -25,10 +25,10 @@
|
||||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
||||
import '@testing-library/cypress/add-commands'
|
||||
|
||||
Cypress.Commands.add('LoginWithPassword', () => {
|
||||
cy.clearAllCookies()
|
||||
Cypress.Commands.add('LoginWithPassword', (username, password) => {
|
||||
cy.clearAllCookies({ domain: null })
|
||||
cy.get('a.text-text-primary').should('contain', 'Log in').click()
|
||||
cy.get('#username').type(Cypress.env('username'))
|
||||
cy.get('#password').type(Cypress.env('password'))
|
||||
cy.get('#username').type(username)
|
||||
cy.get('#password').type(password)
|
||||
cy.findByRole('button', { name: 'Log in' }).click()
|
||||
})
|
||||
Reference in new issue
Block a user