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