luciole/should
Functions
pub fn be_greater_than(
prev: Chainable(a),
val: a,
) -> Chainable(a)
Create an assertion.
Calls the Cypress should function with this function name as the chainer.
For example: prev |> should.be_visible() will become prev.should('be.visible').
Yields the subject it was given, except for:
- have_prop: yields the value of the property
- have_attr: yields the value of the attribute
pub fn be_less_than(prev: Chainable(a), val: a) -> Chainable(a)
Create an assertion.
Calls the Cypress should function with this function name as the chainer.
For example: prev |> should.be_visible() will become prev.should('be.visible').
Yields the subject it was given, except for:
- have_prop: yields the value of the property
- have_attr: yields the value of the attribute
pub fn be_visible(prev: Chainable(a)) -> Chainable(a)
Create an assertion.
Calls the Cypress should function with this function name as the chainer.
For example: prev |> should.be_visible() will become prev.should('be.visible').
Yields the subject it was given, except for:
- have_prop: yields the value of the property
- have_attr: yields the value of the attribute
pub fn callback(
prev: Chainable(a),
next: fn(a) -> b,
) -> Chainable(a)
Allows to make multiple assertions on a subject. The return value of the callback function is ignored.
Yields the subject it was given.
pub fn contain(prev: Chainable(a), text: String) -> Chainable(a)
Create an assertion.
Calls the Cypress should function with this function name as the chainer.
For example: prev |> should.be_visible() will become prev.should('be.visible').
Yields the subject it was given, except for:
- have_prop: yields the value of the property
- have_attr: yields the value of the attribute
pub fn equal(prev: Chainable(a), val: a) -> Chainable(a)
Create an assertion.
Calls the Cypress should function with this function name as the chainer.
For example: prev |> should.be_visible() will become prev.should('be.visible').
Yields the subject it was given, except for:
- have_prop: yields the value of the property
- have_attr: yields the value of the attribute
pub fn have_attr(
prev: Chainable(a),
attr: String,
) -> Chainable(a)
Create an assertion.
Calls the Cypress should function with this function name as the chainer.
For example: prev |> should.be_visible() will become prev.should('be.visible').
Yields the subject it was given, except for:
- have_prop: yields the value of the property
- have_attr: yields the value of the attribute
pub fn have_class(
prev: Chainable(a),
class: String,
) -> Chainable(a)
Create an assertion.
Calls the Cypress should function with this function name as the chainer.
For example: prev |> should.be_visible() will become prev.should('be.visible').
Yields the subject it was given, except for:
- have_prop: yields the value of the property
- have_attr: yields the value of the attribute
pub fn have_length(
prev: Chainable(a),
length: Int,
) -> Chainable(a)
Create an assertion.
Calls the Cypress should function with this function name as the chainer.
For example: prev |> should.be_visible() will become prev.should('be.visible').
Yields the subject it was given, except for:
- have_prop: yields the value of the property
- have_attr: yields the value of the attribute
pub fn have_prop(
prev: Chainable(a),
prop: String,
) -> Chainable(a)
Create an assertion.
Calls the Cypress should function with this function name as the chainer.
For example: prev |> should.be_visible() will become prev.should('be.visible').
Yields the subject it was given, except for:
- have_prop: yields the value of the property
- have_attr: yields the value of the attribute
pub fn have_value(prev: Chainable(a), val: a) -> Chainable(a)
Create an assertion.
Calls the Cypress should function with this function name as the chainer.
For example: prev |> should.be_visible() will become prev.should('be.visible').
Yields the subject it was given, except for:
- have_prop: yields the value of the property
- have_attr: yields the value of the attribute