Skip to content

Commit

Permalink
♻ adapt lock out to manage confirm estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfremium13 committed Feb 8, 2024
1 parent fc13c9e commit 057de73
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clock_out.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Factorial Clock Out

on:
schedule:
- cron: '0 15 * * 1-5' # Ejecuta a las 15 PM UTC de lunes a viernes
- cron: '0 16 * * 1-5' # Ejecuta a las 15 PM UTC de lunes a viernes

jobs:
test:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_modules/
/playwright-report/
/blob-report/
/playwright/.cache/
.env
.env
/tmp
2 changes: 2 additions & 0 deletions tests/factorial/factorial.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ test.describe("The Factorial page should", () => {
const factorialPage = await SignIn(page);
await expect(LocatorHelpers.ClockOutButton(factorialPage)).toBeVisible();
await LocatorHelpers.ClockOutButton(factorialPage).click();
await expect(LocatorHelpers.ConfirmEstimationButton(factorialPage)).toBeVisible();
await LocatorHelpers.ConfirmEstimationButton(factorialPage).click();
await expect(LocatorHelpers.ClockInButton(factorialPage)).toBeVisible();
});

Expand Down
5 changes: 5 additions & 0 deletions tests/factorial/fixtures/locator.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ const ClockOutButton = (page: Page): Locator => {
return page.getByRole("button", { name: "Detener" });
};

const ConfirmEstimationButton = (page: Page): Locator => {
return page.getByRole('button', { name: 'Confirmar estimación' });
}

export const LocatorHelpers = {
ClockInButton,
ClockOutButton,
ConfirmEstimationButton
};

0 comments on commit 057de73

Please sign in to comment.