Skip to content

moneyhub/qa-technical-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Playwright Technical Challenge

Welcome to the Playwright technical challenge!

Objective: Your task is to review the existing Playwright test suite for https://practicesoftwaretesting.com, identify and fix issues within the tests and Page Objects and implement missing tests.

Website Under Test: https://practicesoftwaretesting.com

Tasks: Part 1: Bug Fixing & Code Problems Familiarise yourself with the Page Objects in the pages directory and the tests in the tests directory.

  • Review tests/login.spec.ts and its corresponding pages/login.page.ts. There's an issue preventing login functionality tests from passing consistently. Identify and fix it (the bug might be in the spec file or the Page Object).

  • In tests/products.spec.ts and potentially pages/products.page.ts or pages/productDetails.page.ts, the test Add product to favorites and verify is failing. Identify and fix it.

Part 2 by using Cursor: Missing Tests & Page Object Enhancements

  • In pages/products.page.ts:

    • Implement the method filterByCategory(categoryName: string).
    • Implement a method getDisplayedProductNames(): Promise<string[]> or verifyProductsBelongToCategory(categoryName: string).
  • In tests/products.spec.ts:

    • Using the new methods in ProductsPage, implement the test should filter products by category. This test should:
      • Navigate to the product listing page.
      • Use the ProductsPage to select a product category (e.g., "Drills").
      • Use the ProductsPage to verify that only products belonging to that category are displayed.
  • In pages/cart.page.ts (or create if placeholder):

    • Add necessary locators for cart items (name, price, quantity, remove button).
    • Implement methods like getCartItemDetails(productName: string): Promise<{name: string, price: string, quantity: string}>, removeItem(productName: string).
    • Implement getCartItemCount(): Promise<number> and isCartEmpty(): Promise<boolean>.
  • In tests/cart.spec.ts (or create if placeholder):

    • Implement a test should add a product to the cart and verify cart contents using methods from ProductDetailsPage (for adding to cart) and CartPage (for verification).
    • Implement a test should increase product quantity in cart using CartPage methods.
    • Implement a test should remove a product from the cart using CartPage methods. (Bonus)

Evaluation Criteria:

  • Correctness of bug fixes (in tests or Page Objects).
  • Completeness and correctness of new tests and Page Object methods.
  • Adherence to POM principles.
  • Effectiveness of performance issue identification and proposed solutions.
  • Code quality, readability, and use of Playwright best practices.

Good luck!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors