Refine the calculator result layout
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
This commit is contained in:
parent
51853245ad
commit
0959c6740b
5 changed files with 61 additions and 11 deletions
|
|
@ -67,6 +67,9 @@ test("current values are subtracted from totals and kept during recalculation",
|
|||
await expect(subtractCurrent).toHaveAttribute("aria-pressed", "true");
|
||||
await expect(current).toBeFocused();
|
||||
await expect(totalLabel).toBeVisible();
|
||||
await expect(tool.locator(".calculator-result-field")).toHaveClass(/has-current/);
|
||||
await expect(tool.locator(".calculator-result").getByText("Résultat", { exact: true })).toHaveCount(0);
|
||||
await expect(tool.locator(".calculator-result-field > span")).toHaveText("Résultat");
|
||||
const expressionBounds = await expression.boundingBox();
|
||||
const currentBounds = await current.boundingBox();
|
||||
expect(currentBounds.x).toBeCloseTo(expressionBounds.x, 0);
|
||||
|
|
@ -94,6 +97,7 @@ test("current values are subtracted from totals and kept during recalculation",
|
|||
await expect(tool.locator(".calculator-result strong")).toHaveAttribute("aria-label", "160");
|
||||
await subtractCurrent.click();
|
||||
await expect(current).toHaveCount(0);
|
||||
await expect(tool.locator(".calculator-result-field")).not.toHaveClass(/has-current/);
|
||||
await expect(tool.locator(".calculator-result strong")).toHaveAttribute("aria-label", "180");
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue