Skip to content

Commit 4dd2a15

Browse files
committed
style(website): add blank lines around lists (according to MD032)
Refs: https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md032.md
1 parent 74bb3d4 commit 4dd2a15

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/docs/handbook/web-testing/page-element-query-language.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and **reducing test maintenance costs** across your organisation.
1212

1313
Serenity/JS Page Element Query Language uses **3 simple, composable abstractions** based on Screenplay [questions](/handbook/design/screenplay-pattern/#questions)
1414
that help you identify and interact with web elements of interest:
15+
1516
- **[`PageElement`](/api/web/class/PageElement)** - models a **single web element**,
1617
- **[`PageElements`](/api/web/class/PageElements)** - models a **collection of web elements**,
1718
- **[`By`](/api/web/class/By)** - represents **portable locators** used by your browser to identify web elements of interest.
@@ -60,6 +61,7 @@ export const basketTotal = () => // <- Function representing a do
6061
```
6162

6263
To define a page element:
64+
6365
- Create a [function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions) named after the **domain concept** represented by the UI widget, such as `basketTotal`.
6466
- Make the function return a [`PageElement`](/api/web/class/PageElement#located), configured to locate the element using one of the built-in [`By` selectors](/api/web/class/By).
6567
- Give your page element a **human-readable description** to be used when [reporting interactions](/handbook/reporting/) with the element.
@@ -310,6 +312,7 @@ To help you understand how to use this abstraction, remember the shopping basket
310312

311313
Similarly to how you model a [single page element](/handbook/web-testing/page-element-query-language/#working-with-individual-page-elements),
312314
to model a **collection of page elements**:
315+
313316
- Create a function that captures the name of the concept they represent, like `basketItems`.
314317
- Make the function return a [PageElements](/api/web/class/PageElements/#located) object.
315318
- Define a custom description to be used for reporting purposes.
@@ -597,6 +600,7 @@ you might want to fetch a table row, perform some transformation on each cell,
597600
then return the result as a JSON object so that it's easier to work with.
598601

599602
An equivalent of doing that in our example would be to:
603+
600604
- retrieve the name and price of each basket item,
601605
- clean up the data,
602606
- transform it into a JSON object,
@@ -677,6 +681,7 @@ While Serenity/JS [expectations](/api/core/class/Expectation) are most commonly
677681
when used with the [`PageElements#where`](/api/web/class/PageElements#where) API they offer a great and reusable alternative to complex CSS selectors and XPath expressions.
678682

679683
In this section, I'll show you how to:
684+
680685
- query page elements to find those that meet your expectations,
681686
- find an interactive element based on some property of its sibling,
682687
- iterate over selected elements to perform a common task.
@@ -819,6 +824,7 @@ await actorCalled('Alice').attemptsTo(
819824
### Finding a sibling element
820825

821826
To find a sibling element, e.g. to find a destroy button for an item whose label contains a certain text:
827+
822828
- find the container element whose descendant element meets your conditions,
823829
- locate the sibling element within that container element.
824830

@@ -847,6 +853,7 @@ use the [`List#forEach`](/api/core/class/List#forEach) API to
847853
perform a sequence of interactions with each element of the collection.
848854

849855
For example, to toggle every item that hasn't been bought yet:
856+
850857
- filter the list to find elements that meet the expectation,
851858
- iterate over the found elements to click on the toggle button of each element.
852859

0 commit comments

Comments
 (0)