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

vasu-playwright-cli

v1.7.1

Published

Playwright TypeScript CLI to initialize/update with sample Playwright tests, framework setup and utilities

Downloads

197

Readme

Playwright TypeScript CLI

| GitHub stars | Last Commit | Pull Requests | NPM Package | | [email protected] | | :-------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------: |

About

playwright-ts-cli is a powerful command-line tool designed to initialize and update projects with the Playwright TypeScript template. It simplifies the process of setting up a new project with specific configurations, dependencies, and structure, allowing developers to kickstart their Playwright testing with ease.

Features

  • Initialize Project: Quickly scaffold a new project with predefined Playwright TypeScript configurations, dependencies, and structure.
  • Update Project: Seamlessly update existing projects with the latest files and configurations from the Playwright TypeScript template.
  • Compatibility: Works with the vasu-playwright-utils library, offering additional utilities and functionalities.

Prerequisites

Ensure you have the following software installed on your machine:

  • npm (v8.0.0 or later): Package manager for JavaScript, used to install and manage software packages.
    • To verify your current version, use the command npm -v.
    • If npm isn't installed, follow the npm installation guide.
  • Node.js (v16.0.0 or later): JavaScript runtime built on Chrome's V8 JavaScript engine, allowing the execution of JavaScript server-side.
    • To verify your current version, use the command node -v.
  • Git: Distributed version control system used to track changes in source code during software development.
    • To check if Git is installed, run the command git --version.
    • If Git isn't installed, download and install it from the official Git website.

Installation

1. Install Node.js

Before installing the CLI, make sure to have Node.js installed on your system. Here are two ways to install Node.js:

  1. Using Official Website:

  2. Using Command Line (nvm):

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
    source ~/.nvm/nvm.sh
    nvm install --lts

2. Create a Playwright Test Directory

mkdir playwright-e2e-tests
cd playwright-e2e-tests

3. Install vasu-playwright-cli

npm i -D vasu-playwright-cli

Usage

Initialize a New Project

Navigate to the desired directory and run:

npx vasu-playwright-cli init

This command will set up a new project with ready to use Playwright TypeScript framework, including:

  • Setup the Playwright TypeScript framework template with sample tests.
  • Create a new package.json file with all the necessary dependencies.
  • Initializing a new Git repository if neither the current nor parent directory is a Git repository.
  • Installing all the npm packages including the playwright utils library which contains playwright helper methods.

Update an Existing Project with future updates

Navigate to the project directory and run:

npx vasu-playwright-cli update

This command will update specific files or directories within the project, aligning them with the latest updates to the Playwright TypeScript template.

Update Playwright Library

Keep your Playwright library up to date with the latest playwright utilities which contain the helper methods that are updated regularly:

npm i -D vasu-playwright-utils@latest

Running Tests

To make sure the project framework is working as expected, you can run the following command to run the sample tests:

npm run test:chromium-headed -- sauce-demo-all-pass.spec.ts

View the report with:

npx playwright show-report

Issues and Feedback

If you encounter any issues or have feedback, please Raise an Issue on GitHub.

Contributing

We welcome contributions! Feel free to submit a Pull Request on GitHub.

License

This project is licensed under the MIT License. See the LICENSE file for details.