fix(runtime): support native user interactions
req: examples/005 req: form/002 req: convention/004 req: dx/008
This commit is contained in:
@@ -59,59 +59,28 @@ async fn browser_drives_typed_product_end_to_end() -> WebDriverResult<()> {
|
||||
.await?;
|
||||
wait_for_text(&driver, &slot_selector(ui::control_center::slots::notice.id().id), "Push simulated").await?;
|
||||
|
||||
driver
|
||||
.execute(
|
||||
r#"
|
||||
document.querySelector("input[name='title']").value = "Browser verified issue";
|
||||
document.querySelector("input[name='impact']").value = "8";
|
||||
document.querySelector("select[name='lane']").value = "product";
|
||||
"#,
|
||||
Vec::new(),
|
||||
)
|
||||
.await?;
|
||||
driver
|
||||
.execute(
|
||||
&format!(
|
||||
r#"
|
||||
return fetch("/", {{
|
||||
method: "POST",
|
||||
headers: {{ "Content-Type": "application/x-www-form-urlencoded" }},
|
||||
body: "__h={}&title=Browser+verified+issue&lane=product&impact=8"
|
||||
}})
|
||||
.then((response) => response.arrayBuffer())
|
||||
.then((buffer) => {{ window.slhx.applyBatch(buffer, document.querySelector("[data-slhx-root]")); return true; }});
|
||||
"#,
|
||||
ui::control_center::handles::launch_work.id().id
|
||||
),
|
||||
Vec::new(),
|
||||
)
|
||||
.await?;
|
||||
|
||||
wait_for_text(&driver, "body", "Browser verified issue").await?;
|
||||
assert_text(&driver, "width:88%").await?;
|
||||
|
||||
drag_card_to_lane(&driver, 4, "runtime").await?;
|
||||
wait_for_text(&driver, ".lane[data-lane='runtime'] .work-card[data-key='4']", "Active").await?;
|
||||
drag_card_to_lane(&driver, 2, "product").await?;
|
||||
wait_for_text(&driver, ".lane[data-lane='product'] .work-card[data-key='2']", "Shipped").await?;
|
||||
wait_for_text(&driver, &slot_selector(ui::control_center::slots::notice.id().id), "Drag-and-drop move persisted").await?;
|
||||
|
||||
driver
|
||||
.find(By::Css(&card_button_selector(ui::control_center::handles::spotlight_work.id().id, 4)))
|
||||
.find(By::Css(&card_button_selector(ui::control_center::handles::spotlight_work.id().id, 2)))
|
||||
.await?
|
||||
.click()
|
||||
.await?;
|
||||
wait_for_text(
|
||||
&driver,
|
||||
&slot_selector(ui::control_center::slots::inspector.id().id),
|
||||
"Browser verified issue · lane=Runtime · stage=Active · impact=8",
|
||||
"Stream typed presence · lane=Product · stage=Shipped · impact=7",
|
||||
)
|
||||
.await?;
|
||||
|
||||
driver
|
||||
.find(By::Css(&card_button_selector(ui::control_center::handles::advance_work.id().id, 4)))
|
||||
.find(By::Css(&card_button_selector(ui::control_center::handles::advance_work.id().id, 3)))
|
||||
.await?
|
||||
.click()
|
||||
.await?;
|
||||
wait_for_text(&driver, ".lane[data-lane='product'] .work-card[data-key='4']", "Shipped").await?;
|
||||
wait_for_text(&driver, ".lane[data-lane='product'] .work-card[data-key='3']", "Active").await?;
|
||||
|
||||
driver
|
||||
.find(By::Css(&handle_selector(ui::control_center::handles::simulate_push.id().id)))
|
||||
|
||||
Reference in New Issue
Block a user