mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 03:32:15 +01:00
fix flakyness in e2e tests for reporting
This commit is contained in:
committed by
Constantin Graf
parent
6a740015b7
commit
fb41d60a21
@@ -31,7 +31,7 @@ async function createTimeEntryWithProject(page: Page, projectName: string, durat
|
|||||||
await page.getByRole('button', { name: 'Manual time entry' }).click();
|
await page.getByRole('button', { name: 'Manual time entry' }).click();
|
||||||
|
|
||||||
// Fill in the time entry details
|
// Fill in the time entry details
|
||||||
await page.getByTestId('time_entry_description').fill(`Time entry for ${projectName}`);
|
await page.getByRole('dialog').getByRole('textbox', { name: 'Description' }).fill(`Time entry for ${projectName}`);
|
||||||
|
|
||||||
await page.getByRole('button', { name: 'No Project' }).click();
|
await page.getByRole('button', { name: 'No Project' }).click();
|
||||||
await page.getByText(projectName).click();
|
await page.getByText(projectName).click();
|
||||||
@@ -52,7 +52,7 @@ async function createTimeEntryWithTag(page: Page, tagName: string, duration: str
|
|||||||
await page.getByRole('button', { name: 'Manual time entry' }).click();
|
await page.getByRole('button', { name: 'Manual time entry' }).click();
|
||||||
|
|
||||||
// Fill in the time entry details
|
// Fill in the time entry details
|
||||||
await page.getByTestId('time_entry_description').fill(`Time entry with tag ${tagName}`);
|
await page.getByRole('dialog').getByRole('textbox', { name: 'Description' }).fill(`Time entry with tag ${tagName}`);
|
||||||
|
|
||||||
// Add tag
|
// Add tag
|
||||||
await page.getByRole('button', { name: 'Tags' }).click();
|
await page.getByRole('button', { name: 'Tags' }).click();
|
||||||
@@ -74,7 +74,7 @@ async function createTimeEntryWithBillableStatus(page: Page, isBillable: boolean
|
|||||||
await page.getByRole('button', { name: 'Manual time entry' }).click();
|
await page.getByRole('button', { name: 'Manual time entry' }).click();
|
||||||
|
|
||||||
// Fill in the time entry details
|
// Fill in the time entry details
|
||||||
await page.getByTestId('time_entry_description').fill(`Time entry ${isBillable ? 'billable' : 'non-billable'}`);
|
await page.getByRole('dialog').getByRole('textbox', { name: 'Description' }).fill(`Time entry ${isBillable ? 'billable' : 'non-billable'}`);
|
||||||
|
|
||||||
// Set billable status
|
// Set billable status
|
||||||
await page.getByRole('button', { name: 'Non-Billable' }).click();
|
await page.getByRole('button', { name: 'Non-Billable' }).click();
|
||||||
@@ -103,7 +103,7 @@ test('test that project filtering works in reporting', async ({ page }) => {
|
|||||||
// Go to reporting and filter by project1
|
// Go to reporting and filter by project1
|
||||||
await goToReporting(page);
|
await goToReporting(page);
|
||||||
await page.getByRole('button', { name: 'Project' }).nth(0).click();
|
await page.getByRole('button', { name: 'Project' }).nth(0).click();
|
||||||
await page.getByText(project1).click();
|
await page.getByRole('dialog').getByText(project1).click();
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
// escape
|
// escape
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ type BillableOption = {
|
|||||||
id="description"
|
id="description"
|
||||||
ref="description"
|
ref="description"
|
||||||
v-model="timeEntry.description"
|
v-model="timeEntry.description"
|
||||||
|
aria-label="Description"
|
||||||
placeholder="What did you work on?"
|
placeholder="What did you work on?"
|
||||||
type="text"
|
type="text"
|
||||||
class="mt-1 block w-full"
|
class="mt-1 block w-full"
|
||||||
|
|||||||
Reference in New Issue
Block a user