test(techdemo): shorten generated resource paths
Import scoped generated handles and slots in techdemo tests so assertions read as local resources instead of fully-qualified generated paths. req: component/003 req: dx/006
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use slhx_techdemo::ui;
|
||||
use slhx_techdemo::ui::control_center::{handles, slots};
|
||||
use slhx_techdemo::ui::issue_card::handles as card_handles;
|
||||
use std::process::{Child, Command, Stdio};
|
||||
use std::time::{Duration, Instant};
|
||||
use thirtyfour::prelude::*;
|
||||
@@ -56,11 +57,11 @@ async fn browser_drives_typed_product_end_to_end() -> WebDriverResult<()> {
|
||||
wait_for_text(&driver, "#probe-island [data-island-readout]", "probe live").await?;
|
||||
|
||||
driver
|
||||
.find(By::Css(&handle_selector(ui::control_center::handles::simulate_push)))
|
||||
.find(By::Css(&handle_selector(handles::simulate_push)))
|
||||
.await?
|
||||
.click()
|
||||
.await?;
|
||||
wait_for_text(&driver, &slot_selector(ui::control_center::slots::notice), "Push simulated").await?;
|
||||
wait_for_text(&driver, &slot_selector(slots::notice), "Push simulated").await?;
|
||||
wait_for_text(&driver, "[data-island-readout]", "activity rows").await?;
|
||||
|
||||
driver.find(By::Css("button.primary-action")).await?.click().await?;
|
||||
@@ -69,41 +70,41 @@ async fn browser_drives_typed_product_end_to_end() -> WebDriverResult<()> {
|
||||
|
||||
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), "Drag-and-drop move persisted").await?;
|
||||
wait_for_text(&driver, &slot_selector(slots::notice), "Drag-and-drop move persisted").await?;
|
||||
|
||||
driver
|
||||
.find(By::Css(&card_button_selector(ui::issue_card::handles::spotlight_work, 2)))
|
||||
.find(By::Css(&card_button_selector(card_handles::spotlight_work, 2)))
|
||||
.await?
|
||||
.click()
|
||||
.await?;
|
||||
wait_for_text(
|
||||
&driver,
|
||||
&slot_selector(ui::control_center::slots::inspector),
|
||||
&slot_selector(slots::inspector),
|
||||
"Stream typed presence · lane=Product · stage=Shipped · impact=7",
|
||||
)
|
||||
.await?;
|
||||
|
||||
driver
|
||||
.find(By::Css(&card_button_selector(ui::issue_card::handles::advance_work, 3)))
|
||||
.find(By::Css(&card_button_selector(card_handles::advance_work, 3)))
|
||||
.await?
|
||||
.click()
|
||||
.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)))
|
||||
.find(By::Css(&handle_selector(handles::simulate_push)))
|
||||
.await?
|
||||
.click()
|
||||
.await?;
|
||||
wait_for_text(&driver, &slot_selector(ui::control_center::slots::live_feed), "SSE tick").await?;
|
||||
wait_for_text(&driver, &slot_selector(slots::live_feed), "SSE tick").await?;
|
||||
|
||||
driver.find(By::Css("a[href='/architecture']")).await?.click().await?;
|
||||
wait_for_text(&driver, &slot_selector(ui::control_center::slots::inspector), "Page swap").await?;
|
||||
wait_for_text(&driver, &slot_selector(slots::inspector), "Page swap").await?;
|
||||
wait_for_text(&driver, "[data-island-readout]", "activity rows").await?;
|
||||
assert!(driver.current_url().await?.as_str().ends_with("/architecture"));
|
||||
|
||||
driver.goto(&format!("http://{APP_ADDR}/")).await?;
|
||||
wait_for_text(&driver, &slot_selector(ui::control_center::slots::live_feed), "SSE tick").await?;
|
||||
wait_for_text(&driver, &slot_selector(slots::live_feed), "SSE tick").await?;
|
||||
|
||||
Ok::<(), WebDriverError>(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user