feat: the menu snapshot carries a price per sales point; pulled orders keep the cloud's sales point and table (platform-v2 3S, S.2)
- services/cloud_sync.menu_snapshot(db) (split out of the push, tested): sold_at + prices per customer-app sales point from the pricing engine; digital_price = the QR menu's. - store_online_orders: sales_point from the cloud (older clouds: from the type), takeaway orders typed takeaway, the QR menu's table in front of the customer's note. - manager e2e: waits for the live connection (html[data-live]) instead of a fixed 1.5 s, and for the server to record "read" (two timing races seen in a full run). - Tests: +2 in test_sales_points.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -483,7 +483,7 @@ try {
|
||||
await page.getByTestId('notif-count').waitFor({ state: 'detached', timeout: 5000 }).catch(() => {})
|
||||
r.check('bell: "mark all as read" clears the count', await page.getByTestId('notif-count').count() === 0)
|
||||
await bell.click() // close
|
||||
await sleep(1500) // the live socket is up (opened with the shell)
|
||||
await page.waitForSelector('html[data-live="ready"]', { timeout: 10_000 }).catch(() => {}) // the live socket is up
|
||||
await supportLogin(backend.url)
|
||||
await page.getByTestId('notif-count').waitFor({ timeout: 8000 }).catch(() => {})
|
||||
r.check('bell: a new one arrives live (no reload): count 1 and a toast',
|
||||
@@ -492,8 +492,13 @@ try {
|
||||
const unreadItem = panel.locator('[data-read="false"]').first()
|
||||
await unreadItem.click()
|
||||
await page.waitForFunction(() => !document.querySelector('[data-testid="notif-count"]'), null, { timeout: 5000 }).catch(() => {})
|
||||
r.check('bell: opening it marks it read', await page.getByTestId('notif-count').count() === 0 &&
|
||||
(await api('GET', '/api/platform/notifications', { token: boss })).unread === 0)
|
||||
let notifAfter = await api('GET', '/api/platform/notifications', { token: boss })
|
||||
for (let i = 0; i < 30 && notifAfter.unread !== 0; i++) { // the count clears at once; the server hears it a moment later
|
||||
await sleep(100)
|
||||
notifAfter = await api('GET', '/api/platform/notifications', { token: boss })
|
||||
}
|
||||
r.check('bell: opening it marks it read', await page.getByTestId('notif-count').count() === 0 && notifAfter.unread === 0,
|
||||
JSON.stringify({ shown: await page.getByTestId('notif-count').textContent().catch(() => null), unread: notifAfter.unread }))
|
||||
await page.screenshot({ path: path.join(OUT, 'manager-notifications.png') })
|
||||
await page.keyboard.press('Escape')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user