Giter Site home page Giter Site logo

mskelton / vscode-playwright-test-snippets Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 173 KB

Useful snippets for the Playwright test runner.

Home Page: https://marketplace.visualstudio.com/items?itemName=mskelton.playwright-test-snippets

License: ISC License

vscode vscode-snippets playwright playwright-test

vscode-playwright-test-snippets's Introduction

Playwright Snippets

Build status Extension version Extension installs Semantic release

Playwright test snippets for VS Code.

Snippets

The following snippets are provided by this package. If you have ideas of other snippets that would be helpful, please open an issue.

Test blocks

pw-describe

test.describe('$1', () => {
  $0
})

pw-test

test('$1', async ({ page }) => {
  $0
})

pw-beforeEach

test.beforeEach(async ({ page }) => {
  $0
})

pw-afterEach

test.afterEach(async ({ page }) => {
  $0
})

pw-beforeAll

test.beforeAll(async ({ browser }) => {
  $0
})

pw-afterAll

test.afterAll(async ({ browser }) => {
  $0
})

pw-step

await test.step('$1', async () => {
  $0
})

pw-use

test.use({ $0 })

Lariat

Lariat is a Playwright page object framework that simplifies page object construction. We've included some useful Lariat snippets as part of this extension.

pw-collection

import Collection from 'lariat'

export class MyPage extends Collection {
  $0
}

pw-page-object

import { Page } from '@playwright/test'
import Collection from 'lariat'

export class MyPage extends Collection {
  constructor(page: Page) {
    super(page.locator('$1'))
  }

  $0
}

vscode-playwright-test-snippets's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.