mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-27 07:20:23 +05:30
14 lines
528 B
TypeScript
14 lines
528 B
TypeScript
export function getSectionByName(name: string) {
|
|
return cy.findAllByTestId('profile-item').contains(name).closest('[data-testid="profile-item"]');
|
|
}
|
|
|
|
export function openSectionByName(name: string) {
|
|
return getSectionByName(name).findByTestId('profile-action').click();
|
|
}
|
|
|
|
export function confirmWithPassword(password: string) {
|
|
cy.findByTestId('password-request-form').should('be.visible');
|
|
cy.get('[name=password]').type(password);
|
|
cy.findByTestId('password-request-form').find('[type=submit]').click();
|
|
}
|