-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added a common mesocycle and a view test
- Loading branch information
1 parent
d345d4c
commit 0e08287
Showing
2 changed files
with
105 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { commonSplits } from "$lib/commonMesocycles"; | ||
import { test, expect } from "../fixtures"; | ||
|
||
const commonExerciseSplit = commonSplits[0]; | ||
|
||
test.beforeEach(async ({ page }) => { | ||
await page.goto("/"); | ||
await page.request.post("/api/exerciseSplits", { | ||
data: JSON.stringify(commonExerciseSplit) | ||
}); | ||
await page.getByRole("link", { name: "Exercise splits" }).click(); | ||
await expect(page.getByRole("main")).toContainText("Pull Push Legs"); | ||
}); | ||
|
||
test("show some stats", async ({ page }) => { | ||
await page.getByRole("link", { name: "Pull Push Legs" }).click(); | ||
await page.waitForURL(/exerciseSplits\/view/); | ||
await expect(page.getByText("Split name Pull Push Legs")).toBeVisible(); | ||
await expect(page.getByText("Sets per cycle 68")).toBeVisible(); | ||
await expect(page.getByText("Avg. sets per day 11.33")).toBeVisible(); | ||
|
||
await page.getByLabel("Exercises").check(); | ||
await expect(page.getByTestId("split-exercises-table")).toContainText( | ||
"Pull up BW 3 sets of 5 to 15 reps Back (vertical pulls)" | ||
); | ||
}); |