{"id":15433658,"url":"https://github.com/mskelton/vscode-playwright-test-snippets","last_synced_at":"2025-03-28T06:12:10.900Z","repository":{"id":101287619,"uuid":"473615352","full_name":"mskelton/vscode-playwright-test-snippets","owner":"mskelton","description":"Useful snippets for the Playwright test runner.","archived":false,"fork":false,"pushed_at":"2022-03-28T16:02:41.000Z","size":173,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-18T08:17:49.489Z","etag":null,"topics":["playwright","playwright-test","vscode","vscode-snippets"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=mskelton.playwright-test-snippets","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mskelton.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-24T13:21:21.000Z","updated_at":"2024-03-28T12:46:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"96fe318d-c805-484a-ac4e-080886e68401","html_url":"https://github.com/mskelton/vscode-playwright-test-snippets","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"494668eef3c37a1a27316766cd77b9e5ea003503"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mskelton%2Fvscode-playwright-test-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mskelton%2Fvscode-playwright-test-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mskelton%2Fvscode-playwright-test-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mskelton%2Fvscode-playwright-test-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mskelton","download_url":"https://codeload.github.com/mskelton/vscode-playwright-test-snippets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245978277,"owners_count":20703678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["playwright","playwright-test","vscode","vscode-snippets"],"created_at":"2024-10-01T18:34:56.309Z","updated_at":"2025-03-28T06:12:10.879Z","avatar_url":"https://github.com/mskelton.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Playwright Snippets\n\n![Build status](https://github.com/mskelton/vscode-playwright-test-snippets/workflows/Release/badge.svg?branch=main)\n[![Extension version](https://img.shields.io/vscode-marketplace/v/mskelton.playwright-test-snippets.svg)](https://marketplace.visualstudio.com/items?itemName=mskelton.playwright-test-snippets)\n[![Extension installs](https://img.shields.io/vscode-marketplace/i/mskelton.playwright-test-snippets.svg)](https://marketplace.visualstudio.com/items?itemName=mskelton.playwright-test-snippets)\n[![Semantic release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n[Playwright test](https://playwright.dev) snippets for VS Code.\n\n## Snippets\n\nThe following snippets are provided by this package. If you have ideas of other snippets that would be helpful, please [open an issue](https://github.com/mskelton/vscode-playwright-test-snippets/issues/new).\n\n### Test blocks\n\n#### `pw-describe`\n\n```ts\ntest.describe('$1', () =\u003e {\n  $0\n})\n```\n\n#### `pw-test`\n\n```ts\ntest('$1', async ({ page }) =\u003e {\n  $0\n})\n```\n\n#### `pw-beforeEach`\n\n```ts\ntest.beforeEach(async ({ page }) =\u003e {\n  $0\n})\n```\n\n#### `pw-afterEach`\n\n```ts\ntest.afterEach(async ({ page }) =\u003e {\n  $0\n})\n```\n\n#### `pw-beforeAll`\n\n```ts\ntest.beforeAll(async ({ browser }) =\u003e {\n  $0\n})\n```\n\n#### `pw-afterAll`\n\n```ts\ntest.afterAll(async ({ browser }) =\u003e {\n  $0\n})\n```\n\n#### `pw-step`\n\n```ts\nawait test.step('$1', async () =\u003e {\n  $0\n})\n```\n\n#### `pw-use`\n\n```ts\ntest.use({ $0 })\n```\n\n### Lariat\n\n[Lariat](https://github.com/Widen/lariat) is a Playwright page object framework that simplifies page object construction. We've included some useful Lariat snippets as part of this extension.\n\n#### `pw-collection`\n\n```ts\nimport Collection from 'lariat'\n\nexport class MyPage extends Collection {\n  $0\n}\n```\n\n#### `pw-page-object`\n\n```ts\nimport { Page } from '@playwright/test'\nimport Collection from 'lariat'\n\nexport class MyPage extends Collection {\n  constructor(page: Page) {\n    super(page.locator('$1'))\n  }\n\n  $0\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmskelton%2Fvscode-playwright-test-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmskelton%2Fvscode-playwright-test-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmskelton%2Fvscode-playwright-test-snippets/lists"}