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

cypress_automation_steps_package

v2.1.1

Published

- If you are using Cypress and BDD (Behavior Driven Development) methodology, can use my already step_definitions.

Downloads

335

Readme

Why Import To My Project ?

  • If you are using Cypress and BDD (Behavior Driven Development) methodology, can use my already step_definitions.

How To Create Project Structure ?

  • /cypress:
    • /e2e
      • /features: All Tests
  • /support
    • /apps
      • /applications.json: you can define all URLs inside automations here
    • /pages
      • /.json: You can define your pages here according to page object oriented logic.
    • /step_definitions
      • /.js: You can define all your step_definitons that you want to add extra here, also import "cypress_automation_steps_package" should be added here
    • /users
      • /.json: You can define all your users here

How To Import My Project ?

  • You have to call "npm i cypress_automation_steps_package" in command line

  • You have to add "node*modules/cypress_automation_steps_package/step_definitions/**/_.js" in area cypress-cucumber-preprocessor in package.json file

  • The last of, set to (import "cypress_automation_steps_package") in any step_definitions.js

Step Definitions

I open browser window with {int},{int} ;

  • Opens the browser window with the specified width and height. @param {int} width - The width of the browser window in pixels; @param {int} height - The height of the browser window in pixels.

I open {string} page ;

  • The interface of the parameric address will be displayed. -The address must be defined in cypress/support/apps/applications.json and its name in the json must be added parametrically.

I see {string} page ;

  • It is used paramerically to mean that I saw the given page, and its function means that the defined elements on the relevant page can now be accessed. -cypress/support/pages/.json

I wait {int} seconds ;

  • If there is a wait in the test scenario, this step can be used.

I am registered with {string} ;

  • If user information is included in the application, the information in the following format is kept in -cypress/support/users/.json, the relevant step is used in the step and the json name is given parametrically, then "the username" and "the password" are entered in the process. You can access user information by typing . { "username": "username information", "password":"password information" }

I generate a random string of length {int} saved as the {string} ;

  • After calling this step, it parametrically produces a string expression with the length we give it and then saves this value as "the ....." and you can use it later.
  • Example:
  • I generate a random string of length 10 saved as the "test1"
  • I type to "usernameTextbox" with "the test1" value
  • As can be seen from above, "the test1" is a random string expression consisting of 10 characters.

I generate a random email saved as the {string} ;

  • Creates a random gmail

I generate a random tax number saved as the {string} ;

  • Creates a random tax number

I generate a random numeric value with {int} digits saved as the {string} ;

  • After calling this step, it parametrically produces a numeric expression with the length we give it and then saves this value as "the ....." and you can use it later.
  • Example:
  • I generete a random numeric value with 6 digits saved as the "password"
  • I type to "usernameTextbox" with "the password" value
  • As can be seen above, "the password" is a random numeric expression consisting of 6 characters.

I generate a random integer value with {int} digits saved as the {string} ;

  • Creates a random integer value

I generate date saved as the {string} ;

  • Creates and saves current history

I save {string} text as the {string} ;

  • We give an element as the first parameter, and the second variable can be considered as the variable name we want to save. We can write any value we want.

  • For example :

  • I save "login button" text as the "automation"

  • After this step, we can now save the text of the login button element by saying "the automation".


I save {string} element value as the {string} ;

  • Saves the value of an element

I click {string} ;

  • The clicking process is performed and the relevant element must first be defined in the following format in -cypress/support/pages/.json. Then you can click the login button by clicking <I click "loginButton">.
  • NOTE: The point that should not be forgotten is that the relevant page must be viewed before this step. I see page.
  • {
  • "usernameTextbox": "#email",
  • "passwordTextbox": "#password",
  • "loginButton": "#login-btn",
  • "verifyButton":"#sms-verification-btn",
  • "Reset Password Link":".sc-lbVpMG > span"
  • }

I click {string} text ;

  • You can click on any text you view on the screen. An xpath is created with the text entered parametrically and the first element found in the relevant xpath is clicked.
  • Example xpath : (//*[.='text'])[1]

I double click {string} ;

  • Double click is done

I set the {string} of {string} checkbox ;

  • An element of checkbox is check.First parameters is can be 'check or uncheck' @example - I set the "check" of "x checkbox" checkbox

I see {string} element ;

  • The parametrically given elementKey is searched within the default time on the relevant page.

I see {string} element with {int} seconds ;

  • The parametrically given elementKey is searched within the parametric period on the relevant page.

I do not see {string} element ;

  • The parametrically given elementKey should not be visible on the relevant page within the default period.

I verify {string} button of status {string} ;

  • The parametrically given button should be parametrically status, Status parameter is can be 'enabled or disabled' @example - I verify "x button" button of status "enabled"

I verify {string} element text is equal text {string} ;

  • It is checked that the text value of the parametrically given elementKey matches the text parameter. @example - I verify "element_key" element text is equal text "element_text"

I verify {string} element value is equal text {string} ;

  • It is checked that the value of the parametrically given elementKey matches the text parameter.. @example - I verify "element_key" value text is equal text "element_text"

I verify {string} element text include of {string} ;

  • A parametrically given expression, a control within a parametrically given element. @example - I verify "element_key" element text include of "any text"

I verify {string} element text not include of {string} ;

  • A parametrically given expression, a control within a parametrically given element. @example - I verify "element_key" element text not include of "any text"

I verify {string} element value with {string} ;

  • Control of parametrically given expression and parametrically given element in @value, @Example - I verify "login input textbox" element value with "[email protected]"

I verify {string} equals {string} ;

  • Compares 2 different previously saved values @example - I verify "the saved any value" value text is equal text "the saved second value"

I clear {string} element ;

  • Clears the content of an input element @example - I clear "elementKey" element

I go page {int} ;

  • Allows you to go back and forth on the page you are on @example - I go page -1

I will click {string} and open new tab ;

  • Allows the element you click to open in the current tab. @example - I will click "elementKey" and open new tab

If exist click to {string} ;

  • If the element you specify exists, it clicks, otherwise it does not throw an error. @example - If exist click to "elementKey"

I type to {string} with {string} value ;

  • It allows the value to be entered in the given elementKey, Also 2nd parameter can get @example - When I type to "elementKey" with "username" value

I type to {string} with {string} value with {int} delay ;

  • While it allows the value to be entered within the given elementKey, in parallel with the delay, it makes it more realistic and allows slower value entry., Also 2nd parameter can get @example - When I type to "elementKey" with "username" value with 100 delay