feat(manager): UI review pass 3 (fees tabs, products panes, floor editor, permissions search, pricing heads)
- Online orders → Settings: the fee tabs breathe (inset strip); a rule's buttons and switch centred together. - Products: categories and list as panes that scroll on their own, headers and footers stay; the list sunken with white rows; the category search is the shared SearchInput. Product editor: "Make main" text instead of a star, the left tabs share the width. - Floor editor: no "+" next to a corner; − / fit width / whole plan / +; "Edit the floor's shape" → "Save shape" (saves the shape and size at once); sizes in grid cells by half cells (steppers; typing snapped every keystroke before), resize handles on every unrotated table and thing, half-cell snapping. - MediaField: the picture's name under the buttons, Remove red on hover. - Staff permissions: a search box at the top. - Prep zone name hint fixed. Offers & pricing: title first, then tabs; every tab has its head with the New button at the top right. - Tests: floor cells, e2e (cell steppers, no + near a corner, Save shape, permission search, products panes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+23
-1
@@ -427,6 +427,11 @@ try {
|
||||
r.check('editor: grouped by module (Ordering, Kitchen display, Core…), cancel is off for a waiter',
|
||||
await page.getByTestId('perm-group-ordering').count() === 1 && await page.getByTestId('perm-group-core').count() === 1 &&
|
||||
await cancelRow.getAttribute('data-on') === 'false' && (await cancelRow.textContent()).includes('Cancel items already sent'))
|
||||
// 2026-11-21: the search at the top finds a permission
|
||||
await page.getByTestId('perm-search').fill('cancel items')
|
||||
r.check('editor: the search keeps only the matching permissions',
|
||||
await cancelRow.count() === 1 && await page.getByTestId('perm-group-core').count() === 0)
|
||||
await page.getByTestId('perm-search').fill('')
|
||||
await cancelRow.getByRole('switch').click()
|
||||
await page.getByRole('button', { name: 'Save 1 change' }).click()
|
||||
await editor.waitFor({ state: 'detached', timeout: 8000 }).catch(() => {})
|
||||
@@ -1120,8 +1125,21 @@ try {
|
||||
await page.mouse.move(tb.x + tb.width / 2 + 75, tb.y + tb.height / 2, { steps: 5 })
|
||||
await page.mouse.move(tb.x + tb.width / 2 + 150, tb.y + tb.height / 2 + 60, { steps: 5 })
|
||||
await page.mouse.up()
|
||||
// 2026-11-21: sizes in grid cells: "+" on the width adds half a cell
|
||||
await page.locator(`[data-testid="floor-canvas"] [data-testid="floor-table"][data-table="${secondId}"]`).click()
|
||||
const widthOf = () => page.getByTestId('floor-width').locator('.x-stepper__value').textContent()
|
||||
const w0 = await widthOf()
|
||||
await page.getByTestId('floor-width').locator('button').last().click()
|
||||
const w1 = await widthOf()
|
||||
r.check('floor: a table\'s width grows by half a grid cell', parseFloat(w1.replace(',', '.')) - parseFloat(w0.replace(',', '.')) === 0.5, `${w0} → ${w1}`)
|
||||
await page.keyboard.press('Escape')
|
||||
// an irregular floor: a corner more, pulled in
|
||||
await page.getByTestId('floor-shape-mode').click()
|
||||
// 2026-11-21: right beside a corner there is no "+" (the corner's bubble removes it)
|
||||
const c0 = await page.getByTestId('floor-corner').nth(1).boundingBox()
|
||||
await page.mouse.move(c0.x + c0.width / 2, c0.y + c0.height / 2 + 14, { steps: 2 })
|
||||
await sleep(100)
|
||||
r.check('floor: no "+" right beside a corner', await page.getByTestId('floor-edge-add').count() === 0)
|
||||
// 2026-11-20: a "+" shows on the edge under the pointer; pressing there adds a corner and drags it
|
||||
const c1 = await page.getByTestId('floor-corner').nth(1).boundingBox()
|
||||
const c2 = await page.getByTestId('floor-corner').nth(2).boundingBox()
|
||||
@@ -1134,7 +1152,11 @@ try {
|
||||
await page.mouse.move(mid.x - 120, mid.y + 10, { steps: 6 })
|
||||
await page.mouse.up()
|
||||
r.check('floor: pressing on the edge added a corner (5)', await page.getByTestId('floor-corner').count() === 5)
|
||||
await page.getByTestId('floor-shape-mode').click()
|
||||
// "Save shape" saves the shape at once and leaves the shape mode
|
||||
await page.getByTestId('floor-shape-save').click()
|
||||
await page.getByTestId('floor-shape-mode').waitFor({ timeout: 5000 })
|
||||
const shaped = (await api('GET', '/api/floor-plans', { token: boss })).plans.find(x => x.name === 'E2E ground floor')
|
||||
r.check('floor: "Save shape" saved the five-corner floor', shaped?.outline?.length === 5, JSON.stringify(shaped?.outline))
|
||||
await page.screenshot({ path: path.join(OUT, 'manager-floor-editor.png') })
|
||||
await page.getByTestId('floor-save').click()
|
||||
let saved = null
|
||||
|
||||
@@ -65,8 +65,10 @@ try {
|
||||
const body = document.querySelector('main .x-page__body')
|
||||
const main = document.querySelector('main')
|
||||
if (!body || !main) return null
|
||||
const b = body.getBoundingClientRect(); const a = main.getBoundingClientRect()
|
||||
const scroll = body.closest('.x-page__scroll')
|
||||
// the area: the scroller without its scrollbar's room (kept on every page, 2026-11-21)
|
||||
const b = body.getBoundingClientRect(); const s = scroll.getBoundingClientRect()
|
||||
const a = { left: s.left, right: s.left + scroll.clientWidth, width: scroll.clientWidth }
|
||||
// a form page (settings) is centred at its own width
|
||||
const form = body.classList.contains('x-page__body--form')
|
||||
return { form, left: b.left - a.left, right: a.right - b.right, width: b.width, area: a.width, cap: Math.max(1280, innerHeight * 16 / 9),
|
||||
@@ -80,6 +82,19 @@ try {
|
||||
}
|
||||
r.check(`${screen.id}: every page fills its area up to 16:9, centred, and scrolls`, bad.length === 0, bad.join('\n'))
|
||||
|
||||
// Products (2026-11-21): the page doesn't scroll, its two panes do, each on its own
|
||||
await page.goto(`${APP}/management/products`)
|
||||
await page.getByTestId('products-panel').waitFor()
|
||||
const panes = await page.evaluate(() => {
|
||||
const scroll = document.querySelector('main .x-page__scroll')
|
||||
const bodies = [...document.querySelectorAll('main .x-pane__body')].map(e => getComputedStyle(e).overflowY)
|
||||
const tree = document.querySelector('[data-testid="category-tree"]').getBoundingClientRect()
|
||||
const list = document.querySelector('[data-testid="products-panel"]').getBoundingClientRect()
|
||||
return { page: getComputedStyle(scroll).overflowY, bodies, sameTop: Math.abs(tree.top - list.top) < 1, fits: list.bottom <= innerHeight + 1 }
|
||||
})
|
||||
r.check(`${screen.id}: products: two panes that scroll on their own, the page fixed`,
|
||||
panes.page === 'hidden' && panes.bodies.length === 2 && panes.bodies.every(o => o === 'auto') && panes.sameTop && panes.fits, JSON.stringify(panes))
|
||||
|
||||
if (screen.id === '1080p') {
|
||||
// the shared dropdown: multi-select, same height as the search box
|
||||
await page.goto(`${APP}/financials/expenses`)
|
||||
|
||||
Reference in New Issue
Block a user