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

platform-ui-automation

v0.0.6

Published

UI Test Automation Framework for Web Platform

Downloads

8

Readme

Platform-UI

Test Automation Framework with special supports for Franklin websites.

See the demo project

Install

npm install platform-ui-automation --save-dev

Create Test Scenarios

  • Create an E2E test directory. e.g. test\ or test\mywebsite\
  • Create cucumber script files in the subdirectory features\
  • The supporting JavaScript functions can be in any subdirectories.
  • Create a file name profiles.yml in the E2E test directory. For example,
prod: 
  baseUrl: https://www.webplatform4.com

stage:
  baseUrl: https://www.stage.webplatform4.com

Run

If the E2E test directory is named test

npx run test

Use -p to run tests in a different environment profile. e.g.

npx run test -p stage

Playwright is used as the automation framework so the supported browsers are the same. Use -b to specify the browser.

Use with Franklin Website

The branch name can be resolved automatically and use in profiles.yml

dev: 
  baseUrl: http://localhost:3000

preview: 
  baseUrl: https://${branch}--www--webplatformautomation.hlx.page

live: 
  baseUrl: https://${branch}--www--webplatformautomation.hlx.live

prod: 
  baseUrl: https://www.webplatform4.com

Common Steps

| Step Definition Regex| |-- | | ^I go to this page$ | | ^I go to "([^"])" | | ^I wait for (\d+) seconds$ | | ^I resize the browser window to (\d+)x(\d+)$ | | ^I (input|enter) "([^"])" into the element "([^"])"$ | | ^I (should|wait to) see "([^"])" in the address bar$ | | ^I (should|wait to) see the address bar contains "([^"])"$ | | ^I (should|wait to) see "([^"])" in the page content$ |

Use Test Scripts in Content

If the page under test is example and the test script is in example-test.

npx run test -g example

Command Line Options

| Option | Alias | Description | | -- | -- | -- | | --profile | -p | Environment profile | | --tags | -t | Scenario tags for selection of tests | | --browser | -b | Browser choice from Playwright's supported browsers | | --headless | -h | Use the headless mode | | --pages | -g | Get test scenarios from the page's test page. To test multiple pages, use a comma to separate values. | | --features | -f | Get test scenarios from the features's test page. To test multiple features, use a comma to separate values. |

Step Definition Library

Installed NPM modules with the name starting with "platform-ui-lib-" will be loaded as a step definition library. For example, you can build an NPM package with the name "platform-ui-lib-mywebsite" and it has the step definitioins in the lib folder. The path will be added to Cucumber's require paths. See this demo project

Page Object Support

See the sample page objects in this demo project