Skip to content

2.0.12

Latest

Choose a tag to compare

@Natshah Natshah released this 17 Nov 03:50
1eeb752

What changed since 2.0.11

Found by reading the book Automated Functional Testing Recipes in full against what webship-js does, and fixed, each with a test that failed first. 57 pull requests; CI green in Chromium, Firefox and WebKit; every step pack dry-runs with 0 undefined and 0 ambiguous steps on this release.

What a suite may notice

  • I should not see reads the page the way I should see does: it ignores letter case, no longer reads <script> and <style> text, and waits up to 5 seconds for the text to go. eventually I should see reads the page the same way (#398).
  • the response header "X" should be "Y" compares the whole value: should be "application/json" now fails against application/json; charset=utf-8 (#461).
  • The API base URL is reset for every scenario, and a relative one is joined to the launch URL (#450).
  • there should be no JavaScript errors counts errors only, not warnings (#453).
  • The numeric YAML steps compare numbers only; a quoted number is text (#442).
  • The field state step fails on a state word it does not know (#416).
  • A wait longer than the step timeout runs its full length (#459).
  • A project step whose wording adds, opens, deletes, saves, logs in or otherwise changes the page is followed by the settle (#317).
  • Under a fake clock the smart waits keep real time, and the pending-timers wait says at once that it cannot see the page's timers (#487).
  • WEBSHIP_SELECTORS_BREAKPOINTS is merged into the configured breakpoints instead of replacing them, and default: true sets the @desktop size (#407).
  • Restoring an auth state, or starting and stopping a video, keeps the viewport, the smart waits, the error capture and the cookies (#433, #444).
  • Video file names follow the pattern, with a lower-case status and the recording's start time (#444).
  • The first row of the API header and body tables is sent (#458).

Fixed

  • #424 One text matcher for I should see, I should not see and eventually I should see, with hints that are true (#398).
  • #402 A cucumber.js without minWaitTime runs and ends (#401).
  • #403 The end-of-run HTML report is built once, from the JSON report the run wrote, also with parallel workers (#400).
  • #408, #395 The failure screenshot is attached to the failed step in the JSON report, and only a failed step leaves one (#406, #394).
  • #418 What the accessibility print steps print reaches the report (#417).
  • #399, #411, #491, #493, #436, #454 Forms: fill a field with an empty value; a select list, multi-value field, checkbox, radio button or field found by its label, legend, name, id or value; only the inputs of the named datetime field; a field that cannot be filled says why within 5 seconds (#397, #409, #478, #488, #431, #443).
  • #492 Switch into a nested iframe, and find elements and text inside an iframe as on the page (#484).
  • #464 An in-modal step that finds no modal says "No modal is open" (#462).
  • #414 One breakpoint registry for every step and tag that names a viewport size (#407).
  • #494 A step that opens a new browser context keeps the smart waits, the viewport and the error and request capture (#433).
  • #495 Video recording leaves no orphan file, prints the final path and names every video by the pattern (#444).
  • #498 The smart waits keep real time under a fake clock (#487).
  • #463, #473, #485 The settle gives its last probe the rest of its budget; a wait runs the time the scenario gives it; a project step that changes the page is followed by the settle, and the AJAX wait reads in lower case (#447, #459, #317).
  • #432, #410, #503, #437, #502 Selectors: a selector file found by its name in filesPath or by its path from the project root; the header row of a selectors table is a header; a step given a registry name it does not read says so; I should see a "…" element given a selector says so; the offset setting no step read is removed (#413, #405, #486, #425, #483).
  • #438, #481 A storage or cookie value may hold an escaped double quote; local and session storage say plainly that they need a page of the site (#434, #475).
  • #440, #448 The XML namespace steps read every namespace declaration; the numeric YAML steps compare numbers only (#439, #442).
  • #404, #457, #460, #465, #468, #470 API: "should contain" and "should not contain" read the response the same way; a form data value with "=" is sent whole; the first row of the header and body tables is sent; the base URL is reset per scenario; a header compared whole; a JSON Pointer as well as a dot path (#396, #455, #458, #450, #461, #467).
  • #441, #446, #451 A sorted table column is compared as numbers, dates or text the way a reader orders it; two texts inside one element are compared and the text-order step fails plainly; an element reaching the top of the viewport is waited for up to 5 seconds (#426, #427, #428).
  • #452, #456 "JavaScript errors should not match" handles the errors it tolerates; "there should be no JavaScript errors" counts errors only (#449, #453).
  • #419 The field state step checks the state it names (#416).
  • #472 A named screenshot "homepage.png" is saved as homepage.png, not homepage.png.png (#471).
  • #482 A file a step names is read from the project's tests/assets (#480).
  • #479 A dry run prints no "- skipped" line for every hook and step (#476).
  • #415 The scaffold replaces a Nightwatch test script from 1.x and keeps custom.js under --force (#412).
  • #499 A scenario tagged @touch taps for real, and a tap without touch says it clicked (#489).

Added

  • #469 API steps that check a response header is there or is not (#466).
  • #477 Save a JSON property of an API response as a placeholder, and export the API state (#474).
  • #497 PlaywrightWorld is exported: a project extends the World of webship-js and settles its own steps with this.smartSettle() (#496).
  • WEBSHIP_VIDEO_SIZE sets the video size (#444).

Changed

  • #445 The shipped CI configurations are up to date, and every one keeps the report (#435).
  • #505 Every step definition carries five examples, and the examples check asks for them (#504).
  • #500, #422, #429, #430 Docs: the hooks run in the order they are registered; what SLOW_MO does; a run passes on an expired or self-signed certificate; a custom step starting with an unquoted "I click" collides with the bare-name click (#490, #420, #423, #421).
  • #507 The CI page, CLAUDE.md and AGENTS.md list every check and today's step counts (#506).

Install: npm install --save-dev webship-js@2.0.12, then npx init-webship-js for a new project.