Skip to content

Commit

Permalink
Sync shared packages from blockera-pro
Browse files Browse the repository at this point in the history
  • Loading branch information
blockerabot committed Nov 17, 2024
1 parent 0b1a345 commit 1b76c8f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/dev-cypress/js/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -676,4 +676,10 @@ export const registerCommands = () => {
});
});
});

Cypress.Commands.add('openRepeaterItem', (parentContainer, contains) => {
cy.getParentContainer(parentContainer).within(() => {
cy.getByDataCy('group-control-header').contains(contains).click();
});
});
};
8 changes: 6 additions & 2 deletions packages/dev-cypress/js/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,19 @@ Cypress.Commands.add('logout', () => {
});

Cypress.Commands.add('addNewUser', (user, pass, role) => {
goTo('/wp-admin/users.php').then(() => {
cy.get('a').contains('Add New User').as('@addUser');
goTo('/wp-admin/users.php', true).then(() => {
cy.get('a').contains('Add New User').as('addUser');
cy.get('@addUser').then(() => {
cy.get('@addUser').click();
cy.wait(1000);

cy.get('input[name="user_login"').clear();
cy.get('input[name="user_login"').type(user);
cy.get('input[name="email"').clear();
cy.get('input[name="email"').type(user + '@' + user + '.com');
cy.get('input[aria-describedby="pass-strength-result"]').clear();
cy.get('input[aria-describedby="pass-strength-result"]').type(pass);
cy.get('label').contains('Confirm use of weak password').click();
cy.get('label')
.contains('Send the new user an email about their account')
.click();
Expand Down

0 comments on commit 1b76c8f

Please sign in to comment.