feat: hide inactive employees (#10821)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2026-05-05 18:06:13 +07:00
committed by GitHub
parent 2d73be14f8
commit 136a4e6b93
23 changed files with 106 additions and 38 deletions
+2 -1
View File
@@ -84,7 +84,8 @@ test.describe('contact tests', () => {
await contractPage.clickCreateButton()
await contractPage.waitForFormAntiCardDetached()
await contractPage.kickEmployee(first, last)
// In non refactored code, the last assert just checks if the employee does exist, not if it has inactive status
// After kick, employee is inactive and hidden by default. Toggle off to see it.
await contractPage.toggleHideInactive()
await contractPage.expectKickEmployeeShowsInactiveStatus(first, last)
})
@@ -209,6 +209,12 @@ export class ContractPage {
}
}
async toggleHideInactive (): Promise<void> {
await this.page.locator('[data-id="btn-viewOptions"]').click()
await this.page.locator('.antiCard-menu__item', { hasText: 'Hide inactive' }).click()
await this.page.keyboard.press('Escape')
}
// ASSERTIONS
async expectKickEmployeeShowsInactiveStatus (first: string, last: string): Promise<void> {