2022-12-15 07:39:59 -08:00
|
|
|
import { BasePage } from '../base';
|
2022-11-24 14:22:09 -08:00
|
|
|
|
2025-01-08 00:36:44 -08:00
|
|
|
/**
|
|
|
|
* @deprecated Use functional composables from @composables instead.
|
|
|
|
* If a composable doesn't exist for your use case, please create a new one in:
|
|
|
|
* cypress/composables
|
|
|
|
*
|
|
|
|
* This class-based approach is being phased out in favor of more modular functional composables.
|
|
|
|
* Each getter and action in this class should be moved to individual composable functions.
|
|
|
|
*/
|
2022-11-24 14:22:09 -08:00
|
|
|
export class SettingsSidebar extends BasePage {
|
|
|
|
getters = {
|
2024-05-17 01:53:15 -07:00
|
|
|
menuItem: (id: string) => cy.getByTestId('menu-item').get('#' + id),
|
|
|
|
users: () => this.getters.menuItem('settings-users'),
|
2022-11-24 14:22:09 -08:00
|
|
|
back: () => cy.getByTestId('settings-back'),
|
|
|
|
};
|
2024-06-10 06:49:50 -07:00
|
|
|
|
2022-11-24 14:22:09 -08:00
|
|
|
actions = {
|
2022-12-20 01:52:01 -08:00
|
|
|
goToUsers: () => {
|
|
|
|
this.getters.users().should('be.visible');
|
|
|
|
// We must wait before ElementUI menu is done with its animations
|
|
|
|
cy.get('[data-old-overflow]').should('not.exist');
|
|
|
|
this.getters.users().click();
|
|
|
|
},
|
2022-11-24 14:22:09 -08:00
|
|
|
back: () => this.getters.back().click(),
|
|
|
|
};
|
|
|
|
}
|