-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Do not enter phone number because it is optional now * Remove sessions due to state or timing conflict in tests
- Loading branch information
1 parent
b089da9
commit 8a37fe7
Showing
2 changed files
with
8 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,16 +28,14 @@ import 'cypress-file-upload'; | |
import './commands/block-editor'; | ||
|
||
Cypress.Commands.add('login', (username = '[email protected]', password = 'password') => { | ||
cy.session([username,password], () => { | ||
cy.visit(`/wp-admin`); | ||
cy.get('body').then(($body) => { | ||
if ($body.find('#wpwrap').length === 0) { | ||
cy.get('input#user_login').clear(); | ||
cy.get('input#user_login').click().type(username); | ||
cy.get('input#user_pass').type(`${password}{enter}`); | ||
} | ||
}); | ||
}) | ||
cy.visit(`/wp-admin`); | ||
cy.get('body').then(($body) => { | ||
if ($body.find('#wpwrap').length === 0) { | ||
cy.get('input#user_login').clear(); | ||
cy.get('input#user_login').click().type(username); | ||
cy.get('input#user_pass').type(`${password}{enter}`); | ||
} | ||
}); | ||
}); | ||
|
||
Cypress.Commands.add('visitAdminPage', (page = 'index.php') => { | ||
|