{"id":25621148,"url":"https://github.com/princebhatia1996/playwright-test","last_synced_at":"2026-05-26T14:30:20.984Z","repository":{"id":271662965,"uuid":"913749064","full_name":"princebhatia1996/Playwright-test","owner":"princebhatia1996","description":"Playwright test","archived":false,"fork":false,"pushed_at":"2025-01-20T01:22:00.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T02:31:42.967Z","etag":null,"topics":["pageobjectmodel","playwright-typescript"],"latest_commit_sha":null,"homepage":"","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/princebhatia1996.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":"2025-01-08T09:27:56.000Z","updated_at":"2025-01-20T01:22:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"103fbde7-59f0-4e22-a53b-a63b7d51f658","html_url":"https://github.com/princebhatia1996/Playwright-test","commit_stats":null,"previous_names":["princebhatia1996/playwright-test"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princebhatia1996%2FPlaywright-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princebhatia1996%2FPlaywright-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princebhatia1996%2FPlaywright-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princebhatia1996%2FPlaywright-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/princebhatia1996","download_url":"https://codeload.github.com/princebhatia1996/Playwright-test/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240149232,"owners_count":19755716,"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":["pageobjectmodel","playwright-typescript"],"created_at":"2025-02-22T08:34:24.276Z","updated_at":"2026-05-26T14:30:16.922Z","avatar_url":"https://github.com/princebhatia1996.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My Playwright Project\n\n- This project is a sample setup for using Playwright with TypeScript.\n- It has API and E2E UI tests that follow the page object model pattern.\n\n## Project Structure\n\n```\nmy-playwright-project\n├── .gitignore                # Git ignore file\n├── .vscode/                  # VSCode settings\n├── bookingId.txt             # File to store booking ID\n├── helpers/                  # Helper functions for tests\n│   ├── authHelper.ts         # Authentication helper\n│   └── bookingHelper.ts      # Booking helper\n├── package.json              # npm configuration\n├── playwright.config.ts      # Playwright configuration\n├── README.md                 # Project documentation\n├── test-results/             # Directory for test results\n│   └── test-results.json     # JSON file for test results\n├── tests/                    # Directory for test cases\n│   ├── api/                  # API tests\n│   │   ├── booking-auth.post.spec.ts  # Test for booking authentication\n│   │   ├── booking.get.spec.ts        # Test for getting booking\n│   │   └── booking.post.spec.ts       # Test for creating booking\n│   ├── e2e/                       # End-to-end tests\n│   │   ├── swag-labs.cart.spec.ts # Test for Swag Labs cart functionality\n│   │   └── swag-labs.login.spec.ts# Test for Swag Labs login functionality\n│   ├── lib/                       # Library for base test setup\n│   │   └── base-test.ts           # Base test setup\n│   └── pom/                       # Page Object Model classes\n│       ├── cart.ts                # Cart page class\n│       ├── checkout.ts            # Checkout page class\n│       ├── inventory.ts           # Inventory page class\n│       └── login.ts               # Login page class\n├── tsconfig.json             # TypeScript configuration\n```\n\n## Setup Instructions\n\n1. **Clone the repository:**\n\n   ```\n   git clone https://github.com/princebhatia1996/Playwright-test.git\n   ```\n\n2. **Install dependencies:**\n\n   ```\n   npm install\n   ```\n\n3. **Run the tests:**\n\n   ```\n   For API tests: npm run test:api\n   For E2E tests: npm run test:e2e\n   ```\n\n   - If you need to run tests separately I suggest downloading the VS code extension for playwright or use the scripts in the `Package.json` file\n\n## Websites Used\n\n- For section 1 - UI component I have used the website https://www.saucedemo.com/\n\n- For section 2 - API component I have used the website https://restful-booker.herokuapp.com/apidoc/index.html#api-Booking-GetBooking\n\n1. Add new tests under `/tests` folder\n2. Add new page object classes under `/pages` folder, register the new pages in `/lib/base-test.ts`\n3. Add any ultilities or helpers under `/lib` folder\n4. The model we are following is the Playwright page object model for the UI tests recommendations [https://playwright.dev/docs/pom](https://playwright.dev/docs/pom)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprincebhatia1996%2Fplaywright-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprincebhatia1996%2Fplaywright-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprincebhatia1996%2Fplaywright-test/lists"}