style: give teacher shortcuts distinct text colors
This commit is contained in:
@@ -66,15 +66,19 @@ for (const width of [319, 508]) {
|
||||
await expect(shortcuts.first()).toHaveCSS('box-shadow', 'none');
|
||||
await expect(shortcuts.first()).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)');
|
||||
expect((await row.boundingBox())!.y + (await row.boundingBox())!.height).toBeLessThan((await composer.boundingBox())!.y);
|
||||
const shortcutRows = await shortcuts.evaluateAll(elements => elements.map(el => ({ color: getComputedStyle(el).color, top: el.getBoundingClientRect().top, bottom: el.getBoundingClientRect().bottom })));
|
||||
expect(new Set(shortcutRows.map(row => row.color)).size).toBe(8);
|
||||
expect(await shortcuts.evaluateAll(elements => elements.every(el => el.scrollHeight <= el.clientHeight))).toBe(true);
|
||||
expect(shortcutRows.every((row, index) => index === 0 || row.top >= shortcutRows[index - 1].bottom)).toBe(true);
|
||||
await shortcuts.first().focus();
|
||||
await expect(shortcuts.first()).toHaveCSS('outline-style', 'solid');
|
||||
await expect(shortcuts.first()).toHaveCSS('cursor', 'pointer');
|
||||
await shortcuts.first().hover();
|
||||
await expect(shortcuts.first()).toHaveCSS('color', 'rgb(48, 70, 49)');
|
||||
await expect(shortcuts.first()).toHaveCSS('text-decoration-color', 'rgb(48, 70, 49)');
|
||||
await expect(shortcuts.first()).toHaveCSS('color', 'rgb(40, 79, 123)');
|
||||
await expect(shortcuts.first()).toHaveCSS('text-decoration-color', 'rgb(40, 79, 123)');
|
||||
await expect(shortcuts.first()).toHaveCSS('transform', 'none');
|
||||
await page.mouse.down();
|
||||
await expect(shortcuts.first()).toHaveCSS('color', 'rgb(36, 55, 39)');
|
||||
await expect(shortcuts.first()).toHaveCSS('color', 'rgb(32, 63, 99)');
|
||||
await expect(shortcuts.first()).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)');
|
||||
await expect(shortcuts.first()).toHaveCSS('transform', 'none');
|
||||
await page.mouse.move(0, 0);
|
||||
|
||||
Reference in New Issue
Block a user