{"id":24382960,"url":"https://github.com/brunobzs/playwright-test-automation","last_synced_at":"2025-04-19T08:03:38.327Z","repository":{"id":267871055,"uuid":"901047044","full_name":"brunobzs/playwright-test-automation","owner":"brunobzs","description":"Test automation project developed with Playwright and TypeScript","archived":false,"fork":false,"pushed_at":"2025-02-23T13:31:17.000Z","size":39,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-23T14:29:57.501Z","etag":null,"topics":["ci-cd","playwright","playwright-typescript","qa","qa-automation","test-automation","testing-tools","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/brunobzs.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":"2024-12-10T00:11:53.000Z","updated_at":"2025-02-23T13:31:20.000Z","dependencies_parsed_at":"2025-01-07T23:27:58.443Z","dependency_job_id":"4a41e1f6-d746-4a43-9520-f613290d46ec","html_url":"https://github.com/brunobzs/playwright-test-automation","commit_stats":null,"previous_names":["brunobzs/playwright-automation-tests","brunobzs/playwright-test-automation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brunobzs%2Fplaywright-test-automation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brunobzs%2Fplaywright-test-automation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brunobzs%2Fplaywright-test-automation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brunobzs%2Fplaywright-test-automation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brunobzs","download_url":"https://codeload.github.com/brunobzs/playwright-test-automation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243258503,"owners_count":20262300,"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":["ci-cd","playwright","playwright-typescript","qa","qa-automation","test-automation","testing-tools","typescript"],"created_at":"2025-01-19T10:11:12.208Z","updated_at":"2025-03-12T17:18:27.678Z","avatar_url":"https://github.com/brunobzs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Test Automation with Playwright and TypeScript\n\nThis repository contains a test automation project developed with **Playwright** and **TypeScript**. The goal of this project is to validate the functionalities of an [e-commerce](https://magento.softwaretestingboard.com/), ensuring that the main user journeys work as expected.\n\n## 🛠️ About the Project\n\nThis project was created to perform automated tests on an e-commerce, including:\n\n- Authentication (Login and Registration).\n- Product Search.\n- Product Details Page.\n\n## 🚀 Technologies Used\n\n- [Playwright](https://playwright.dev/) - Framework for end-to-end testing.\n- [TypeScript](https://www.typescriptlang.org/) - JavaScript superset for static typing.\n\n## 📦 Installation and Configuration\n\nFollow the steps below to install and configure the project:\n\n1. **Install as dependencies**:\n\nMake sure [Node.js](https://nodejs.org/) is installed.\n\n```bash\nnpm install\n```\n\n2. **Install the Playwright browsers**:\n\n```bash\nnpx playwright install\n```\n\n3. **Environment Configuration**:\n\n- If necessary, edit the `playwright.config.ts` file to adjust the URLs and other project-specific settings.\n\n- Create an `.env` file for environment variables, such as credentials or endpoint URLs.\n\n4. **Run the tests**:\n\n- To open the Playwright interface:\n\n```bash\nnpx playwright test --ui\n```\n\n- To run the tests in headless mode:\n\n```bash\nnpx playwright test\n```\n\n## 📁 Project Structure\n\n```\n├── tests                  # Test files\n├── page-objects           # Interface elements using page objects (POM)\n├── playwright.config.ts   # PLaywright configuration\n├── package.json           # Dependencies of the project\n├── tsconfig.json          # TypeScript Configuration\n└── README.md              # Project Documentation\n```\n\n## 🧪 How to Add New Tests\n\n1. Create a new file in the `test` folder with the name of the functionality that will be tested (ex: `carrinho.spec.ts`).\n2. Use the best practices of Playwright and TypeScript to implement the test.\n3. Run the tests to validate that the new file is working correctly.\n\n## 🤝 Contribution\n\nFeel free to contribute to this project! To do so:\n\n1. Fork the repository.\n2. Create a new branch for your feature or fix:\n\n```bash\ngit checkout -b my-feature\n```\n\n3. Commit your changes and push them to the repository.\n\n4. Open a Pull Request explaining your changes.\n\n---\n\nIf you have any questions or suggestions, feel free to contact me.\n\n# Case Tests\n\n## 1. Authentication (Login and Registration)\n### 1.1 Login with valid credentials  \n**Precondition:** The user is on the login page.  \n**Steps:**  \n1. Enter a valid email address.  \n2. Enter a valid password.  \n3. Click \"Log in\".\n\n**Expected result:** The user is redirected to the home page/successfully logged in.\n   \n### 1.2 Login with invalid credentials\n**Precondition:** The user is on the login page.  \n**Steps:**  \n1. Enter an invalid email address or an incorrect password.\n2. Click \"Log in\".\n\n**Expected result:** An error message such as \"Invalid credentials\" is displayed.\n   \n### 1.3 Registering a new user\n**Precondition:** The user is on the registration page.  \n**Steps:**\n1. Fill in the registration fields with valid data (name, email, password).\n2. Click \"Register\".\n   \n**Expected Result:** The account is successfully created and the user is redirected to the welcome page.\n\n## 2. Product Search\n### 2.1 Search by valid keyword\n**Precondition:** The user is on the home page.  \n**Steps:**\n1. Enter a product keyword in the search field. \n2. Click the \"Search\" button.\n   \n**Expected Result:** A list of relevant products is displayed.\n### 2.2 Search with no results\n**Precondition:** The user is on the home page.  \n**Steps:**  \n1. Enter an invalid or non-existent keyword.\n2. Click the \"Search\" button.  \n\n**Expected Result:** A \"No results found\" message is displayed.\n## 3. Product Details Page\n### 3.1 View product details\n**Precondition:** The user is on a list of products.  \n**Steps:**\n1. Click on a specific product.\n   \n**Expected Result:** The product details page is loaded with title, price, images, and description.\n### 3.2 Add a product to the cart\n**Precondition:** The user is on the product details page.  \n**Steps:**\n1. Click \"Add to Cart\".\n\n**Expected result:** The product is successfully added to the cart and a visual feedback is shown (e.g. \"Product added\" notification).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrunobzs%2Fplaywright-test-automation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrunobzs%2Fplaywright-test-automation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrunobzs%2Fplaywright-test-automation/lists"}