Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] New steps - verify selected, verify not selected #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/browser.smash
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,18 @@
await not$(element, undefined, VERIFY_TIMEOUT, true);
}

* Verify {{element}} is selected {
// Applies only to inputs of type checkbox, radio buttons and options in a select element
const el = (await $(element));
expect(await el.isSelected()).to.equal(true);
}

* Verify {{element}} is not selected {
// Will always pass if element is not selectable
const el = (await $(element));
expect(await el.isSelected()).to.equal(false);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You do not manage the time out if it does not find it as for this code:

* Verify {{element}} is not visible {
        await not$(element, undefined, VERIFY_TIMEOUT, true);
}

}

// ***************************************
// Wait until
// ***************************************
Expand Down