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

ics-e2e

v1.12.8

Published

e2e test library based on selenium-webdriver

Downloads

4

Readme

E2E Runner

Installation

npm install -g ics-e2e

Configuration file config.yml

url: http://someurl.com       # URL to tested application
path: some/root               # Path to e2e home directory (<HOME>); current directory is used if omitted
extender: mdt.js              # extender module for application (optional)
browser:                      # browser settings
  name: chrome                # chrome / edge / firefox / ie
  device:					  # mobile emulation
    name: iPhone 6            # mobile device name
  window:
    width: 1200
    height: 900
screenshot:
  enabled: true               # save screenshots
  percentage: 0               # allowed mismatch between reference and current screenshot (test will be failed if number is higher)
  wait: MS                    # wait before saving screenshot (milliseconds)
  ref: true 				  # create reference screenshots mode
reportServer:                             
  port:                       # port, used by report server (default 8013)

Operation

Configuration file config.yml must exists in directory where app is executed

  • all tests from <HOME>/tests are executed
e2e
  • only specified script is executed (relative path to <HOME>/tests)
e2e <filename.yaml>
  • interactive mode, user can execute commands using console
e2e -i
  • execute script and watch for changes in it
e2e -w <filename.yml>

e2e -v

- execute script and generage result report

Test creation

  • create file testname.yml or testname.yaml in test directory (<HOME>/tests)
  • file structure
<settings>

<commands>

Settings

 config:              # (optional)
   path: pos/brand    # relative URL path to the path in config.yaml
   readonly: true     # mock.restore will be executed after test suite execution; false is default
   xxx: yyy
   ...			          # all params except path and readonly will be passed in query string

Commands

Parameters with space(s) must be enclosed in quotes.

  • click selector
  • dblclick selector
  • input selector sequence sequence can contain special keys in curly braces, e.g.: "{control}a{delete}". SHIFT, CONTROL, ALT have state and are in pushed state:
    • key is encountered again in sequence
    • {null} encountered
    • end of sequence
  • type sequence
  • swipe x,y speed
  • sleep time
  • clear selector
  • exists? selector
  • value? selector value
  • with selector
  • reload reload
  • pause
  • screenshot name
  • mock action param1 param2 ...

Special selectors

  • @Name - is an alias for [code=Name]

Examples:

- click "div.actions @clear-filters" # the same as "div.actions [code=clear-filters]"
- click "a@form-opener"              # the same as "a[code=form-opener]"

Special keys

  • {help}
  • {back_space}
  • {tab}
  • {enter}
  • {shift}
  • {control}
  • {alt}
  • {escape}
  • {space}
  • {page_up}
  • {page_down}
  • {end}
  • {home}
  • {arrow_left}, {left}
  • {arrow_right}, {right}
  • {arrow_down}, {down}
  • {arrow_up}, {up}
  • {insert}
  • {delete}
  • {numpadX}, X is 0 to 9
  • {fX}, X is 1 to 12
  • {add}
  • {multiply}
  • {subtract}
  • {divide}

Include

Tests can be included in another test using command #include "path/to.yaml". It can be done in any line of a test.

Example: File controls_test.yaml contains

- click @Open
#include "controls/input.yaml"
#include "controls/datepicker.yaml"
#include "controls/textarea.yaml"
#include "controls/checkbox.yaml"
- click @Close

All included tests will be executed in order of appearance

Examples

config:
  path: pos/brand
  login: system
skip intro:                                   // step name, screenshot is saved after each step
  - click a.btn-skip                          // click element a.btn-skip
cart:
  - input input.login [email protected]           // type text in input field
  - input input.password 222
  - click a.sign-in
  - input input[name='House'] "777{enter}"    // type '777' and press ENTER
  - clear input.login                         // clear input field 
  - dblClick @Row							                // double click on element [code='Row']
  - type "some string"                        // type text in current field

intro:
  - swipe .intro -200,0 500                  // swipe left 200 pixels with speed 500 px/sec
  - sleep 500                                // sleep for 500 ms
  - click a.btn-skip
  - exists? a.btn-skip                       // check that element exists
  - pause                                    // pause execution, user can execute any command from console
                                             // type "resume" to continue
  - value? input.login user2mail.ru          // check that value of the field is user2mail.ru

#include "path/to.yaml"                      // include path/to.yaml
order:
  - mock login system                        // exec mock.login('system') (mock must be defined in tested app)
  - with .very-long-selector                 // parent selector is set and is valid to the end of current step
  - click .btn1                              // ".very-long-selector .btn1"
  - click .btn2                              // ".very-long-selector .btn2"
  - reload                                   // reload page