2023-11-10 14:48:31 -08:00
|
|
|
import { BasePage } from './base';
|
|
|
|
|
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.
|
|
|
|
*/
|
2023-11-10 14:48:31 -08:00
|
|
|
export class WorkerViewPage extends BasePage {
|
2023-11-21 02:29:24 -08:00
|
|
|
url = '/settings/workers';
|
2024-06-10 06:49:50 -07:00
|
|
|
|
2023-11-10 14:48:31 -08:00
|
|
|
getters = {
|
|
|
|
workerCards: () => cy.getByTestId('worker-card'),
|
|
|
|
workerCard: (workerId: string) => this.getters.workerCards().contains(workerId),
|
|
|
|
workerViewLicensed: () => cy.getByTestId('worker-view-licensed'),
|
|
|
|
workerViewUnlicensed: () => cy.getByTestId('worker-view-unlicensed'),
|
|
|
|
menuItems: () => cy.get('.el-menu-item'),
|
2023-11-21 02:29:24 -08:00
|
|
|
menuItem: () => this.getters.menuItems().get('#settings-workersview'),
|
2023-11-10 14:48:31 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
actions = {};
|
|
|
|
}
|