{"id":26034185,"url":"https://github.com/manishjain1610/brighthorizonassignment","last_synced_at":"2026-04-29T14:34:05.550Z","repository":{"id":281023978,"uuid":"942112923","full_name":"manishjain1610/BrightHorizonAssignment","owner":"manishjain1610","description":"This repository contains a Playwright UI test written in TypeScript and is configured to run tests in different environments such as QA and Production. It uses Winston Logger for logging. I have not used Allure Reports or Lighthouse for simplicity but they can easily be added if needed.","archived":false,"fork":false,"pushed_at":"2025-03-06T15:16:01.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T15:38:54.879Z","etag":null,"topics":["html-report","playwright","typescript","winston-logger"],"latest_commit_sha":null,"homepage":"https://www.brighthorizons.com/","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/manishjain1610.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-03-03T15:39:53.000Z","updated_at":"2025-03-06T15:16:04.000Z","dependencies_parsed_at":"2025-03-06T15:38:57.928Z","dependency_job_id":"21c02dbe-04a2-4f78-bd69-9871c62f8ef5","html_url":"https://github.com/manishjain1610/BrightHorizonAssignment","commit_stats":null,"previous_names":["manishjain1610/brighthorizonassignment"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manishjain1610%2FBrightHorizonAssignment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manishjain1610%2FBrightHorizonAssignment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manishjain1610%2FBrightHorizonAssignment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manishjain1610%2FBrightHorizonAssignment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manishjain1610","download_url":"https://codeload.github.com/manishjain1610/BrightHorizonAssignment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242315116,"owners_count":20107588,"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":["html-report","playwright","typescript","winston-logger"],"created_at":"2025-03-07T01:57:35.322Z","updated_at":"2026-04-29T14:34:05.544Z","avatar_url":"https://github.com/manishjain1610.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Playwright Bright Horization Scenario Demo\n\n[![Playwright UI Tests for Bright Horizons](https://github.com/manishjain1610/BrightHorizonAssignment/actions/workflows/playwright-ci.yml/badge.svg)](https://github.com/manishjain1610/BrightHorizonAssignment/actions/workflows/playwright-ci.yml)\n\nThis repository contains a Playwright UI test written in TypeScript and is configured to run tests in different environments such as QA and Production.\n\n## Table of Contents\n\n- [Installation](#installation)\n  - [Install Node.js and npm](#install-nodejs-and-npm)\n  - [Install Playwright](#install-playwright)\n  - [Install Visual Studio Code](#install-visual-studio-code)\n  - [Install Project Dependencies](#install-project-dependencies)\n- [Project Structure](#project-structure)\n  - [Configuration Files](#configuration)\n- [Running Tests](#running-tests)\n  - [Running Tests in Different Environments](#running-tests-in-different-environments)\n  - [Running Headless Tests](#running-headless-tests)\n  - [Running Tests Sequentially](#running-tests-sequentially)\n- [Best Practices Used](#best-practices-used)\n- [CI Integration](#ci-integration)\n- [EMail Report](#email-report)\n\n## Installation\n\n### Install Node.js and npm\n\n1. **Download and Install Node.js**: Visit [nodejs.org](https://nodejs.org/) and download the LTS version of Node.js. The npm package manager is included with Node.js.\n\n2. **Verify Installation**: After installing Node.js, you can verify the installation by running the following commands in your terminal:\n\n   ```bash\n   node -v\n   npm -v\n   ```\n\n### Install Playwright\n\n1. **Install Playwright**: Run the following command to install Playwright and its dependencies:\n\n   ```bash\n   npm install @playwright/test\n   ```\n\n2. **Install Browsers**: Run the following command to install the required browsers:\n\n   ```bash\n   npx playwright install\n   ```\n\n### Install Visual Studio Code\n\n1. **Download and Install VSCode**: Visit [code.visualstudio.com](https://code.visualstudio.com/) and download the latest version of Visual Studio Code.\n\n### Install Project Dependencies\n\n1. **Clone the Repository**: Clone this repository to your local machine:\n\n   ```bash\n   git clone https://github.com/manishjain1610/BrightHorizonAssignment.git\n   ```\n\n2. **Install Dependencies**: Navigate to the project directory and run the following command to install the project dependencies:\n\n   ```bash\n   npm install\n   ```\n\n## Project Structure\n\n```plaintext\nBrightHorizonAssignment/\n├── node_modules/\n├── playwright-report/\n├── src/\n│   ├── pages/\n│   │   ├── BackupCarePage.ts\n│   │   ├── BasePage.ts\n│   │   ├── CenterLocatorPage.ts\n│   │   ├── HomePage.ts\n│   │ \t└── ResourceSearchPage.ts\n│   ├── tests/\n│   │   ├── config/\n│   │   │   └── app.config.ts\n│   │   ├── resources/\n│   │   │   ├── prod/\n│   │   │   │   └── testdata.json\n│   │   │   └── qa/\n│   │   │       └── testdata.json\n│   │   ├── backUpCare.spec.ts\n│   │   ├── centerSearch.spec.ts\n│   │   └── resourceSearch.spec.ts\n│   └── utils/\n│       ├── WinstonLogger.ts\n|       └──EMailReports.ts\n├── test-results/\n├── .gitignore\n|── .eslintrc.json\n|── .prettierrc\n├── package-lock.json\n├── package.json\n├── playwright.config.ts\n├── globalTeardown.ts\n└── README.md\n```\n\n### Configuration\n\n- **package.json**: Defines the scripts and dependencies for the project.\n- **playwright.config.ts**: Configuration file for Playwright tests.\n\n## Running Tests\n\n### Running Tests in Different Environments\n\n- **QA Environment**:\n\n  ```bash\n  npm run test-qa\n  ```\n\n- **Production Environment**:\n\n  ```bash\n  npm run test-prod\n  ```\n\n### Running Headless Tests\n\n- **QA Environment (Headless)**:\n\n  ```bash\n  npm run headless-test-qa\n  ```\n\n- **Production Environment (Headless)**:\n\n  ```bash\n  npm run headless-test-prod\n  ```\n### Running Tests Sequentially\n\n- **QA Environment**:\n\n  ```bash\n  npm run test-qa-Sequentially\n  ```\n\n## Best Practices Used\n\n- **Page Object Model Design Pattern:** Ensures the test code is maintainable and scalable by separating page logic and test scenarios.\n- **Multiple Environment Support:** Supports QA and PROD environments with separate test data.\n- **Automatic Retrying Mechanism:** Increases test resilience by automatically retrying failed test cases, reducing false negatives, and ensuring more stable results.\n- **CI Integration:** Implements GitHub CI workflows to automatically run tests on changes to the master branch and pull requests, ensuring code quality and early detection of issues.\n\n## CI Integration\nThe project uses GitHub Actions for continuous integration. The workflow configuration is located in `.github/workflows/playwright-ci.yml`.\n\n## EMail Report\nThe suite automatically emails the test report after execution but email settings need to be configured. I am using my personal email id \u0026 password from github secrets but other users may store their email settings (EMAIL_USER, EMAIL_PASS, SMTP_HOST, SMTP_PORT) in local .env file and use it. Please ensure that email service allows SMTP third-party access. I used zohomail for my own use.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanishjain1610%2Fbrighthorizonassignment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanishjain1610%2Fbrighthorizonassignment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanishjain1610%2Fbrighthorizonassignment/lists"}