• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

serenity-js / serenity-js / 5952710161
93%

Build:
DEFAULT BRANCH: main
Ran 23 Aug 2023 02:47PM UTC
Jobs 1
Files 546
Run time 13s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Aug 2023 02:30PM UTC coverage: 97.316% (-0.05%) from 97.361%
5952710161

push

github

web-flow
feat(web): chainable `PageElements` (#1864)

This change enables `PageElements` to offer more advanced chaining patterns
and DOES NOT require any modifications to the existing client code.

`PageElements` now allows for defining the container element at runtime, **separately** from defining the filtering chain. 

For example:

```typescript
const shoppingList = () =>
  PageElement.located(By.id('shopping-list'))
    .describedAs('shopping list');

await actor.attemptsTo(
  Ensure.that(
    Text.of(
      green(items())
        .first()
        .of(shoppingList())
    ),
    equals('lettuce'),
  )
)
```

`PageElements` now also allows for using pre-composed filter chains, like the one above, in `.where` clauses:

```typescript
const shoppingLists = () =>
  PageElement.located(By.css('.shopping-list'))
    .describedAs('shopping list');
    
// find the last of container items that contain a specific first child item
shoppingLists()
  .where(Text.of(green(items()).first(), equals('lettuce'))
  .last()
```

Thanks to @viper3400 for the code review and suggestions

3578 of 3745 branches covered (95.54%)

Branch coverage included in aggregate %.

444 of 444 new or added lines in 17 files covered. (100.0%)

32532 of 33361 relevant lines covered (97.52%)

621.14 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5952710161.1 23 Aug 2023 02:47PM UTC 0
97.32
GitHub Action Run
Source Files on build 5952710161
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #5952710161
  • 4d0c7eb9 on github
  • Prev Build on main (#5936737471)
  • Next Build on main (#5981351966)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc