45cef11630
Architecture Lint / Architecture boundaries do not regress (push) Has been cancelled
Backend Tests / Plan external runner allocation (push) Has been cancelled
Backend Tests / Detect relevant changes (push) Has been cancelled
E2E Tests / Plan external runner allocation (push) Has been cancelled
Frontend Tests / Plan external runner allocation (push) Has been cancelled
Lint Action Pinning / All action refs are SHA-pinned (push) Has been cancelled
Lint Harness Files / Harness files pass lint (push) Has been cancelled
Backend Tests / Backend Static Checks (push) Has been cancelled
Backend Tests / Backend Tests (1/2) (push) Has been cancelled
Backend Tests / Backend Tests (2/2) (push) Has been cancelled
Backend Tests / Backend (ambient integration env) (push) Has been cancelled
Backend Tests / Run Backend Tests (push) Has been cancelled
Backend Tests / Backend Postgres (push) Has been cancelled
Backend Tests / Backend Postgres 18 (push) Has been cancelled
Backend Tests / Backend (windows) (push) Has been cancelled
E2E Tests / Detect relevant changes (push) Has been cancelled
E2E Tests / Build (push) Has been cancelled
E2E Tests / E2E Shard ${{ matrix.shard }}/14 (push) Has been cancelled
E2E Tests / Resolve Playwright runtime image (push) Has been cancelled
E2E Tests / E2E Containers Shard 1/6 (push) Has been cancelled
E2E Tests / E2E Containers Shard 2/6 (push) Has been cancelled
E2E Tests / E2E Containers Shard 3/6 (push) Has been cancelled
E2E Tests / E2E Containers Shard 4/6 (push) Has been cancelled
E2E Tests / E2E Containers Shard 5/6 (push) Has been cancelled
E2E Tests / E2E Containers Shard 6/6 (push) Has been cancelled
E2E Tests / Kubernetes Compatibility (v1.34.8) (push) Has been cancelled
E2E Tests / Kubernetes Compatibility (v1.36.1) (push) Has been cancelled
E2E Tests / Desktop E2E Smoke (push) Has been cancelled
E2E Tests / Merge E2E Reports (push) Has been cancelled
E2E Tests / E2E Tests Passed (push) Has been cancelled
Frontend Tests / Detect relevant changes (push) Has been cancelled
Frontend Tests / Run Frontend Lint, Tests, and Build (push) Has been cancelled
Frontend Tests / Frontend Tests Passed (push) Has been cancelled
51 lines
1.8 KiB
TypeScript
51 lines
1.8 KiB
TypeScript
import { test, expect } from "../../fixtures/test-base";
|
|
import { SessionPage } from "../../pages/session-page";
|
|
import { seedTaskTreeActivityScenario } from "./sidebar-task-tree-activity-sort-helpers";
|
|
|
|
// @covers AC-UI-SIDEBAR-LAST-ACTIVITY-SORT-002.1, .2, .5, .6
|
|
test("phone task drawer ranks a parent by its active child and navigates to that child", async ({
|
|
testPage,
|
|
apiClient,
|
|
seedData,
|
|
}) => {
|
|
const { parent, child, peer, navigationTaskId } = await seedTaskTreeActivityScenario(
|
|
apiClient,
|
|
seedData,
|
|
"Phone tree sort",
|
|
);
|
|
await testPage.goto(`/t/${navigationTaskId}`);
|
|
const session = new SessionPage(testPage);
|
|
await session.waitForLoad();
|
|
|
|
await testPage.getByTestId("mobile-task-picker-trigger").tap();
|
|
const sheet = testPage.getByRole("dialog", { name: "Tasks" });
|
|
await expect(sheet).toBeVisible();
|
|
|
|
const treeAndPeerIds = [parent.id, peer.id];
|
|
await expect
|
|
.poll(async () => {
|
|
const rows = await sheet
|
|
.locator("[data-task-row-id]")
|
|
.evaluateAll((elements) =>
|
|
elements.map((element) => element.getAttribute("data-task-row-id")),
|
|
);
|
|
return rows.filter((id): id is string => id !== null && treeAndPeerIds.includes(id));
|
|
})
|
|
.toEqual([parent.id, peer.id]);
|
|
|
|
const parentTime = await sheet
|
|
.locator(`[data-task-row-id="${parent.id}"]`)
|
|
.getByTestId("sidebar-task-time")
|
|
.getAttribute("data-time-value");
|
|
const childTime = await sheet
|
|
.locator(`[data-task-row-id="${child.id}"]`)
|
|
.getByTestId("sidebar-task-time")
|
|
.getAttribute("data-time-value");
|
|
expect(parentTime).toBeTruthy();
|
|
expect(childTime).toBeTruthy();
|
|
expect(Date.parse(childTime!)).toBeGreaterThan(Date.parse(parentTime!));
|
|
|
|
await sheet.locator(`[data-task-row-id="${child.id}"]`).tap();
|
|
await expect(testPage).toHaveURL((url) => url.pathname === `/t/${child.id}`);
|
|
});
|