{"id":28323287,"url":"https://github.com/adequatica/ui-testing","last_synced_at":"2025-06-23T22:30:40.772Z","repository":{"id":65558405,"uuid":"522275041","full_name":"adequatica/ui-testing","owner":"adequatica","description":"Testing UI with TypeScript and Playwright","archived":false,"fork":false,"pushed_at":"2025-05-31T05:11:55.000Z","size":86,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T23:50:36.230Z","etag":null,"topics":["playwright","testing"],"latest_commit_sha":null,"homepage":"https://adequatica.medium.com/list/playwright-use-cases-6f542f3df5bc","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adequatica.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-08-07T17:10:38.000Z","updated_at":"2025-05-31T05:11:58.000Z","dependencies_parsed_at":"2023-11-23T21:20:58.052Z","dependency_job_id":"339e71a1-a281-4f1b-b0dc-2628001edd92","html_url":"https://github.com/adequatica/ui-testing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adequatica/ui-testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adequatica%2Fui-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adequatica%2Fui-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adequatica%2Fui-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adequatica%2Fui-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adequatica","download_url":"https://codeload.github.com/adequatica/ui-testing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adequatica%2Fui-testing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261567006,"owners_count":23178074,"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","testing"],"created_at":"2025-05-25T15:11:20.158Z","updated_at":"2025-06-23T22:30:40.767Z","avatar_url":"https://github.com/adequatica.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UI Testing with TypeScript and Playwright\n\n[![Run Playwright Tests](https://github.com/adequatica/ui-testing/actions/workflows/run-playwright-tests.yaml/badge.svg?branch=main)](https://github.com/adequatica/ui-testing/actions/workflows/run-playwright-tests.yaml)\n\n## Stack\n\nA basic set of packages to test UI with TypeScript:\n\n- [Playwright](https://playwright.dev) — testing framework;\n- [Prettier](https://prettier.io) — code formatter;\n- [ESLint](https://eslint.org/) — code linter.\n\nExample website for testing as a default `baseURL`: [CERN](https://home.cern), unless otherwise specified.\n\n## How to Use\n\n1. Clone repository\n2. Install dependencies: `npm install`\n3. Install dependencies for testing framework: `npm run test:install-deps`\n4. Run tests: `npm test`\n\n### CLI Options\n\n- Different tested host could be passed to tests through .env variable:\n\n```\nBASE_URL=https://home.cern npm test\n```\n\n- Run tests [filtered by tag](https://playwright.dev/docs/test-annotations#tag-tests):\n\n```\nnpm test -- --grep @mobile\n```\n\n- Run a single test (for example: `switch-language.spec.ts`):\n\n```\nnpm test tests/switch-language.spec.ts\n```\n\nOr:\n\n```\nnpm test -- --grep language\n```\n\n- Run tests in [debug mode](https://playwright.dev/docs/debug#pwdebug):\n\n```\nnpm test -- --debug --grep language\n```\n\nOr through the custom command:\n\n```\nnpm run test:debug -- --grep language\n```\n\n## Examples of Test Cases\n\nAll tests are synthetic and written in different «styles» and approaches with the intent to demonstrate various cases from the articles [Hidden Gems of Playwright](https://adequatica.medium.com/hidden-gems-of-playwright-68fcf8896bcb) and [Part 2](https://adequatica.medium.com/hidden-gems-of-playwright-part-2-ca3e38a5954a), unless otherwise specified:\n\n- `atlas-postcard-price.spec.ts` — example of [Automation Testing with Playwright MCP Server](https://adequatica.medium.com/generative-automation-testing-with-playwright-mcp-server-45e9b8f6f92a);\n- `keyboard-navigation-on-tab.spec.ts` — example of [Automated Accessibility Testing of Keyboard Navigation on Tab](https://adequatica.medium.com/automated-accessibility-testing-of-keyboard-navigation-on-tab-89d30087c111);\n- `mobile-toolbar-about-overlay-use.spec.ts` — has an example of rewriting config through [test.use()](https://playwright.dev/docs/api/class-test#test-use) with a [boxed step](https://playwright.dev/docs/release-notes#hide-implementation-details-box-test-steps);\n- `mobile-toolbar-newcontext.spec.ts` — has an example of redefining the [browser context](https://playwright.dev/docs/api/class-browsercontext) with a [boxed step](https://playwright.dev/docs/release-notes#hide-implementation-details-box-test-steps);\n- `open-sign-in.spec.ts` — has an example of [expect.toPass](https://playwright.dev/docs/test-assertions#expecttopass) assertion;\n- `sushi-swap-contract-testing.spec.ts` — example of [API Contract Testing](https://adequatica.medium.com/api-contract-testing-on-frontend-with-playwright-4509b74b3008) with [Zod](https://zod.dev/) schema validation;\n- `sushi-swap-custom-matcher.spec.ts` — example of usage [custom matchers](https://playwright.dev/docs/test-assertions#add-custom-matchers-using-expectextend) for [Zod](https://zod.dev/) schema validation;\n- `switch-language.spec.ts` — has an example of [test.fixme()](https://playwright.dev/docs/api/class-test#test-fixme-2) method;\n- `toolbar-throught-describe.spec.ts` — has an example of [test.describe.configure()](https://playwright.dev/docs/api/class-test#test-describe-configure) method;\n- `toolbar-throught-step.spec.ts` — has examples of [test.slow()](https://playwright.dev/docs/api/class-test#test-slow-1), [test.step()](https://playwright.dev/docs/api/class-test#test-step) and [expect.soft()](https://playwright.dev/docs/test-assertions#soft-assertions) methods.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadequatica%2Fui-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadequatica%2Fui-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadequatica%2Fui-testing/lists"}