mirror of
https://github.com/Sea-Haven-Industries/meal-order-manager.git
synced 2026-09-30 11:13:12 +00:00
test(form): stabilize mobile admin assertions (#93)
Some checks are pending
Deploy / deploy (push) Waiting to run
Some checks are pending
Deploy / deploy (push) Waiting to run
This commit is contained in:
parent
bcf255b17f
commit
7e73bd2bfe
1 changed files with 8 additions and 3 deletions
|
|
@ -799,6 +799,9 @@ class TestGenerateFormPlaywright:
|
|||
assert "hostile@example.com" in card.inner_text()
|
||||
assert "Chicken Bowl ×1" in card.inner_text() # noqa: RUF001
|
||||
assert "$12.00" in card.inner_text()
|
||||
submitted_time = card.locator(".admin-card-time")
|
||||
assert submitted_time.is_visible()
|
||||
assert submitted_time.inner_text() == "Jul 30, 10:15 AM"
|
||||
assert page.evaluate(
|
||||
"() => document.documentElement.scrollWidth === "
|
||||
"document.documentElement.clientWidth"
|
||||
|
|
@ -827,10 +830,12 @@ class TestGenerateFormPlaywright:
|
|||
'.admin-order-card [data-meal-name="Luis\\\' Lomo Saltado"][data-delta="1"]'
|
||||
).click()
|
||||
page.locator('.admin-order-card [data-admin-action="save-edit"]').click()
|
||||
page.wait_for_function(
|
||||
"() => document.querySelector('.admin-order-card')"
|
||||
'?.textContent.includes("Luis\' Lomo Saltado ×2")' # noqa: RUF001
|
||||
saved_card = page.locator(
|
||||
".admin-order-card",
|
||||
has_text="Luis' Lomo Saltado ×2", # noqa: RUF001
|
||||
)
|
||||
saved_card.wait_for(state="visible")
|
||||
assert "Luis' Lomo Saltado ×2" in saved_card.inner_text() # noqa: RUF001
|
||||
assert state["orders"][0]["employee_name"] == hostile_name
|
||||
assert state["orders"][0]["total"] == 41.0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue