fix(m4): drop stale tick-nudge hint from tape page (#99)
This commit is contained in:
@@ -327,7 +327,7 @@
|
|||||||
<span class="val">{Math.round(transform.zoom * 100)}%</span>
|
<span class="val">{Math.round(transform.zoom * 100)}%</span>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="ghost fit" on:click={fit}>Fit</button>
|
<button type="button" class="ghost fit" on:click={fit}>Fit</button>
|
||||||
<p class="nudge">Wheel or pinch zooms the slab. Arrow keys tilt; up and down nudge the last tick. Shift is a fine step. Double-tap the slab to fit.</p>
|
<p class="nudge">Wheel or pinch zooms the slab, drag pans it, and the handle tilts it. Arrow keys tilt; Shift is a fine step. Double-tap the slab to fit.</p>
|
||||||
|
|
||||||
<p class="ctl">Crop fill</p>
|
<p class="ctl">Crop fill</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -58,8 +58,9 @@ test.describe('#99 fixed tape line', () => {
|
|||||||
expect(fs.existsSync(FACE_A), 'fixture face-a').toBeTruthy();
|
expect(fs.existsSync(FACE_A), 'fixture face-a').toBeTruthy();
|
||||||
await toLengthPage(page);
|
await toLengthPage(page);
|
||||||
|
|
||||||
// The hint must never tell the owner to drag the ticks.
|
// The hint must never tell the owner to drag or nudge the ticks.
|
||||||
await expect(page.getByText('Drag the ticks')).toHaveCount(0);
|
await expect(page.getByText('Drag the ticks')).toHaveCount(0);
|
||||||
|
await expect(page.getByText('nudge the last tick')).toHaveCount(0);
|
||||||
await expect(page.getByText('The line is fixed in the middle')).toBeVisible();
|
await expect(page.getByText('The line is fixed in the middle')).toBeVisible();
|
||||||
|
|
||||||
const stage = page.getByTestId('tape-line');
|
const stage = page.getByTestId('tape-line');
|
||||||
@@ -110,12 +111,14 @@ test.describe('#99 fixed tape line', () => {
|
|||||||
await toLengthPage(page);
|
await toLengthPage(page);
|
||||||
|
|
||||||
const canvas = page.getByTestId('tape-line').locator('canvas').first();
|
const canvas = page.getByTestId('tape-line').locator('canvas').first();
|
||||||
|
const fill = page.getByLabel('Crop fill percent');
|
||||||
const before = await canvas.screenshot();
|
const before = await canvas.screenshot();
|
||||||
|
|
||||||
// Move the crop-fill slider to a different value.
|
// Move the crop-fill slider and confirm the control really took the value,
|
||||||
const fill = page.getByLabel('Crop fill percent');
|
// so a no-op fill() can never masquerade as a passing assertion.
|
||||||
await fill.fill('50');
|
await fill.fill('50');
|
||||||
await page.waitForTimeout(500);
|
await expect(fill).toHaveValue('50');
|
||||||
|
await page.waitForTimeout(1200);
|
||||||
|
|
||||||
const after = await canvas.screenshot();
|
const after = await canvas.screenshot();
|
||||||
expect(Buffer.compare(before, after), 'crop fill must move the line ends').not.toBe(0);
|
expect(Buffer.compare(before, after), 'crop fill must move the line ends').not.toBe(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user