fix ui view

This commit is contained in:
javad committed 2026-09-17 09:41:15 +03:30
1 parent 863ca89485
commit 83f4d7c728
9 files changed
+182 -17

No files matched your search

+11 -3
View File
@@ -136,9 +136,17 @@ def test_e2e_subject_stays_empty_for_manual_and_search_routing_until_user_types(
subject_input = page.locator("[data-ticket-subject]")
page.locator(".ticket-manual-routing summary").click()
expect(form.unit).to_be_visible()
unit_box = form.unit.bounding_box()
category_box = form.category.bounding_box()
assert unit_box and category_box
boxes = page.locator("[data-routing-selectors]").evaluate(
"""root => {
const unit = root.querySelector('[data-ticket-unit]').getBoundingClientRect();
const category = root.querySelector('[data-ticket-category]').getBoundingClientRect();
return {
unit: {x: unit.x, y: unit.y, width: unit.width},
category: {x: category.x, y: category.y, width: category.width},
};
}"""
)
unit_box, category_box = boxes["unit"], boxes["category"]
assert abs(unit_box["y"] - category_box["y"]) < 2
assert unit_box["x"] + unit_box["width"] <= category_box["x"] or category_box["x"] + category_box["width"] <= unit_box["x"]
expect(subject_input).to_have_value("")