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

keathley / wallaby / 1112 / 10
85%
master: 85%

Build:
DEFAULT BRANCH: master
Ran 03 Feb 2019 08:08PM UTC
Files 34
Run time 1s
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

03 Feb 2019 07:51PM UTC coverage: 38.057% (-2.9%) from 40.946%
WALLABY_DRIVER=selenium WALLABY_SELENIUM_VERSION=3

push

travis-ci

keathley
Add functions for query options (#411)

Description
============

Adds functions `visible/2`, `selected/2`, `text/2`, `count/2`, and
`at/2` for query options to compose queries.

```elixir
 # Previously
query =
  Query.css(
    ".select-options",
    visible: true,
    selected: true,
    text: "Select Option 2",
    count: 1,
    at: 0
  )

 # Now we can do the following
query =
  Query.css(".select-options")
  |> Query.visible(true)
  |> Query.selected(true)
  |> Query.text("Select Option 2")
  |> Query.count(1)
  |> Query.at(0)
```

Note on `Query.text/2`
---------------------

We decided to go ahead an leave the two versions of `Query.text/2` for
now, even though they perform different actions. One version creates a
query of `method: :text` and the other adds the `text` condition to an
existing query.

Note on docs
------------

I decided _not_ to use doc tests for the examples introduced. I decided
against doc tests because the important aspect of the example was
getting lost amongst so much data. For example, one of the examples for
`text/2` was trying to show that a `Query.text("Submit", count: 1)`
would create a query struct with `method: :text`, `selector: "Submit`,
and `count: 1`. But it felt like the important information got lost
when displayed like this,

```elixir
iex> Wallaby.Query.text("Submit", count: 1)
%Wallaby.Query{method: :text, selector: "Submit", html_validation: nil,
conditions: [text: nil, visible: true, selected: :any, minimum: nil, at:
0, count: 1], result: nil}
```

333 of 875 relevant lines covered (38.06%)

9799.39 hits per line

Source Files on job 1112.10 (WALLABY_DRIVER=selenium WALLABY_SELENIUM_VERSION=3)
  • Tree
  • List 0
  • Changed 15
  • Source Changed 9
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1089
  • Travis Job 1112.10
  • b5c4fdf1 on github
  • Prev Job for WALLABY_DRIVER=selenium WALLABY_SELENIUM_VERSION=3 on master (#1104.11)
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

© 2025 Coveralls, Inc