npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nightwatch-api-steps

v0.10.1

Published

Generic steps that can be used with nightwatch-api

Downloads

147

Readme

Nightwatch API steps

npm version Build Status github

Library that contains multi purporse cucumber steps for nightwatch testing.

Use it for your nightwatch tests that are based on nightwatch api.

Installation

Install it with the following command:

npm install nightwatch-api-steps

Usage

To add it to your nightwatch api nightwatch api configuration, follow these steps:

  • Add these lines to your nightwatch.json file:
  "custom_commands_path": [
    ...
    "node_modules/nightwatch-api-steps/commands"
  ],
  • In your cucumber run command, append this parameter: --require node_modules/nightwatch-api-steps/step-definitions/

Steps

| Step | What it does | Usage | Alternatives | |-------------------------------------------------------------------|---|---|---| | I go to :path | Goes to an specific path | I go to "/user/login" | I am at :path; I am on :path , I visit :path | | I go to homepage | Goes to homepage, defined in base_url | I go to homepage | I am at :path; I am on :path , I visit :path | | I should see :text | Check that the current page contains a text | I should see "Page title" | | | I should see :text | Check that the current page does not contains contains a text | I should not see "Cookies banner" | | | I wait :seconds seconds | Wait for seconds. | I wait 5 seconds | | | The url should contain :text | Check the url contains some specific text | The url should contain "/contact" | | | I click :text | Click a element with a specific text. | I click "Who we are" | I follow :text | | I should see the link :text | Assert there exists a link with a specific text. | I should see the link "Shop" | | | I should not see the link :text | Assert there not exists a link with a specific text. | I should not see the link "Shop" | | | I should see :text in the table row | Assert there exists a table row with a specific text. | I should see "Status" in the table row | | | I should not see :text in the table row | Assert there not exists a table row with a specific text. | I should not see "Status" in the table row | | | I select :option from :selector | Select a specific option from a input. | I select "10€" from "Price" | | | I check :option | Check a specific option from a checkbox. | I check "I accept terms and conditions." | | | I uncheck :option | Uncheck a specific option from a checkbox. | I uncheck "I want to receive commercial emails from Company." | | | I select radio button :option | Check a radio button. | I select radio button "Female" | | I fill in :label with :value | Fill an input with any value. | I fill in "Name" with "John" | | I attach the file :filename to :input | Attach a file to a | I attach the file "pool_profile_picture.png" to "Profile" | | | I take a screenshot | Takes an screenshot | I take a screenshot | | | | I take a screenshot with name :filename | Take a screenshot, and save it with a specific name | I take a screenshot with name "products_page.png" | | | I view the site on a :device device | Resize the window to the dimensions of the specified device | I view the site on a "Iphone X" device | | | I should see the button :text | Assert a button with the specified content is visible. | I should see the button "Pay now" | | | I should not see the button :text | Assert a button with the specified content is not visible. | I should not see the button "Cancel" | | | I press the button | Press a button. | I press the button "Pay now" | | | the checkbox :checkbox should be checked | Assert a specific checkbox is checked | the checkbox "I accept terms and conditions" should be checked | the checkbox :checkbox is checked | | | the checkbox :checkbox should not be checked | Assert a specific checkbox is not checked | the checkbox "I want to receive commercial emails from Company." should not be checked | the checkbox :checkbox is unchecked | | | the :label field should contain :string | Assert a input with a specific label contains a specific value | the "Name" field should contain "John" | | | the :label field should not contain :string | Assert a input with a specific label does not ontains a specific value | the "Name" field should not contain "Doe" | | | I wait for AJAX to finish | Wait a current XHR http request finishes | I wait for AJAX to finish | | | I wait for AJAX to finish at least :seconds seconds | Wait a current XHR http request finishes during a specific number of seconds | I wait for AJAX to finish at least 5 seconds | | | I wait for :path AJAX request to finish | Wait a XHR done to a specific URL finishes | I wait for "https://example.com/ajax" AJAX request to finish | | | I wait for :path AJAX request to finish at least :seconds seconds | Wait a current XHR http request to a specific path finishes during a specific number of seconds | I wait for "https://example.com/ajax" AJAX request to finish at least 5 seconds | |

Sponsored by Metadrop.