test(e2e): the QR menu's new look: allergens, the language switch; the order app's allergens (platform-v2 step 6.5)
run-all also runs the menu app's unit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -68,7 +68,8 @@ try {
|
||||
] },
|
||||
{ id: 2, name: 'Food', products: [
|
||||
{ id: 12, name: 'Souvlaki', digital_description: 'Pork, pita, tzatziki', base_price: 4, digital_price: 4, digital_available: true,
|
||||
sold_at: ['online_takeaway', 'online_delivery', 'online_preorder'], prices: { online_takeaway: 4, online_delivery: 4.2, online_preorder: 3.8 }, quick_options: [] },
|
||||
sold_at: ['online_takeaway', 'online_delivery', 'online_preorder'], prices: { online_takeaway: 4, online_delivery: 4.2, online_preorder: 3.8 }, quick_options: [],
|
||||
allergens: { gluten: 'contains', milk: 'may_contain' } },
|
||||
{ id: 13, name: 'Soup of the day', base_price: 6, digital_available: false, sold_at: ['online_delivery'], prices: { online_delivery: 6 }, quick_options: [] },
|
||||
] },
|
||||
],
|
||||
@@ -104,6 +105,8 @@ try {
|
||||
&& await page.getByTestId('service-takeaway').getAttribute('aria-checked') === 'true' && (await page.getByTestId('open-state').textContent()).includes('Open'))
|
||||
r.check('takeaway prices; the soup (delivery only) is not on the takeaway menu',
|
||||
(await product(11).getByTestId('price').textContent()).includes('2.50') && await product(13).count() === 0)
|
||||
r.check('6.5: a dish says what it contains and may contain', ((await product(12).getByTestId('allergens').textContent().catch(() => '')).replace(/\s+/g, ' ')).includes('Contains: Gluten')
|
||||
&& (await product(12).getByTestId('allergens').textContent()).includes('May contain: Milk'))
|
||||
await page.getByTestId('service-delivery').click()
|
||||
r.check('delivery prices; the soup shows as sold out', (await product(11).getByTestId('price').textContent()).includes('2.80')
|
||||
&& (await product(13).textContent()).includes('Sold out'))
|
||||
|
||||
Reference in New Issue
Block a user