mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 08:12:17 +01:00
make sure e2e tests use the visible timer button only
This commit is contained in:
@@ -25,7 +25,12 @@ test('test that dashboard loads with all expected sections', async ({ page }) =>
|
||||
|
||||
// Timer section (scoped to dashboard_timer to avoid matching sidebar timer)
|
||||
await expect(page.getByTestId('time_entry_description')).toBeVisible();
|
||||
await expect(page.getByTestId('dashboard_timer').getByTestId('timer_button')).toBeVisible();
|
||||
await expect(
|
||||
page
|
||||
.getByTestId('dashboard_timer')
|
||||
.getByTestId('timer_button')
|
||||
.and(page.locator(':visible'))
|
||||
).toBeVisible();
|
||||
|
||||
// Dashboard cards
|
||||
await expect(page.getByText('Recent Time Entries', { exact: true })).toBeVisible();
|
||||
@@ -104,7 +109,10 @@ test.describe('Employee Dashboard Restrictions', () => {
|
||||
|
||||
// Timer should be available
|
||||
await expect(
|
||||
employee.page.getByTestId('dashboard_timer').getByTestId('timer_button')
|
||||
employee.page
|
||||
.getByTestId('dashboard_timer')
|
||||
.getByTestId('timer_button')
|
||||
.and(employee.page.locator(':visible'))
|
||||
).toBeVisible();
|
||||
await expect(employee.page.getByTestId('time_entry_description')).toBeEditable();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user