🧪 Test Hub
testing: Demo target v3.0.0 · built-in demo site

DEMO-T11 TS Freight: quote in TypeScript (node engine)

Edit Load test Duplicate

The quote wizard and promo-code check written in TypeScript: runs under the TS engine's @playwright/test while the Python hub provides queue, history, schedules and charts. Requires the TS engine bundle at /opt/pw-ts.

demofreighttypescript DEMO-T11__freight_quote_typescript.spec.ts group: Freight in TypeScriptgroup: Python and TypeScript, side by side

Runs
8
Pass rate
88%
7 passed / 1 failed
Avg duration
4s
p95 4s
Estimate
4s
avg of last 10 judged runs
Flakiness
0.29
0 stable · 1 alternates
Current streak
3
passed

Last 8 results newest on the right — click a square to open that run

Duration per run point color = outcome; dashed = 7-run average; click a point to open the run

Step timing trends the same step compared across the last 8 runs — slowest steps first, one line each

How long it takes distribution of 8 runs — two humps mean two different behaviours hiding behind one average

fastest 4s · slowest 5s

Why this test failed grouped by message, last 90 days

timesmessagelast
1 1 of 1 test(s) failed: a domestic quote prices the promo code correct… Sep 25 open

Outcomes by target version

What this test does plain language, derived from the code

    No steps found.
Show the code
import { test, expect } from '@playwright/test';

// Acme Freight's quote wizard, in TypeScript, through the PYTHON hub: the
// same queue, history, charts and schedules as the Python tests, executed by
// the TS engine's @playwright/test at /opt/pw-ts. baseURL is the hub's
// target.url (the /demo/ root), so a RELATIVE goto -- no leading slash --
// lands on the demo site even when the hub lives under a URL prefix.
test('a domestic quote prices the promo code correctly', async ({ page }) => {
  await page.goto('freight/quote/?restart=1');

  await test.step('route', async () => {
    await page.getByLabel('From (city)').fill('Oakland');
    await page.getByLabel('To (city)').fill('Los Angeles');
    await page.getByRole('button', { name: 'Next: cargo' }).click();
  });

  await test.step('cargo', async () => {
    await page.getByLabel('Total weight (kg)').fill('80');
    await page.getByRole('button', { name: 'Next', exact: true }).click();
  });

  await test.step('service', async () => {
    await page.getByRole('radio', { name: 'Express' }).check();
    await page.getByRole('button', { name: 'Next: review' }).click();
  });

  await test.step('promo code', async () => {
    await page.getByLabel('Promo code').fill('SPRING10');
    await page.getByRole('button', { name: 'Apply' }).click();
    await expect(page.locator('#price-discount')).toBeVisible();
  });

  const amount = async (sel: string) => Number(await page.locator(sel).getAttribute('data-amount'));
  const subtotal = await amount('#price-subtotal');
  const discount = await amount('#price-discount');
  expect(discount, `SPRING10 should take 10% off $${subtotal}`).toBeCloseTo(subtotal * 0.10, 2);
  await expect(page.locator('#summary-service')).toHaveText('Express');
});

All runs

RunStatusQueuedDuration VersionTriggerBatch
#475 passed 2026-09-25 00:30:11 4s 3.0.0 group group: Python and TypeScript,…
#463 passed 2026-09-25 00:29:44 4s 3.0.0 group group: Freight in TypeScript
#429 passed 2026-09-25 00:23:39 4s 3.0.0 cli-adopted 7 tests (terminal)
#422 failed 2026-09-25 00:23:08 4s 2.1.0 cli-adopted 7 tests (terminal)
#415 passed 2026-09-25 00:22:38 4s 2.0.0 cli-adopted 7 tests (terminal)
#408 passed 2026-09-25 00:22:11 4s 1.1.0 cli-adopted 7 tests (terminal)
#401 passed 2026-09-25 00:21:43 4s 1.0.0 cli-adopted 7 tests (terminal)
#315 passed 2026-09-24 19:01:35 5s 3.0.0 cli-adopted DEMO-T11