From 8f11e2277bec25083ce3e1a5db4dab7cf0e1c8bb Mon Sep 17 00:00:00 2001 From: najeeb1023 Date: Sun, 23 Jun 2024 21:43:44 +0200 Subject: [PATCH] version fixed. --- .github/workflows/release.yaml | 2 +- README.md | 46 ++++++++++++++++++++++++++++++++++ config/cucumber.js | 2 +- package.json | 2 +- src/test/hooks/hooks.ts | 2 -- 5 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 README.md diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fa26839..caad08e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,4 +1,4 @@ -name: v3.3.0. +name: v3.4.2. on: push diff --git a/README.md b/README.md new file mode 100644 index 0000000..546d304 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# Magento WebApp Test Automation Framework + +[![v3.4.2.](https://github.com/najeeb1023/magento-webapp/actions/workflows/release.yaml/badge.svg)](https://github.com/najeeb1023/magento-webapp/actions/workflows/release.yaml) +![License](https://img.shields.io/badge/license-MIT-green) + +## Overview + +This repository contains a test automation framework for the Luma web application using Playwright and Cucumber. The framework is designed with Page Object Model (POM) and Facade design patterns to ensure maintainability and scalability. + +## Features + +- **Playwright Integration**: Fast and reliable end-to-end testing. +- **Cucumber Support**: BDD testing approach with Gherkin syntax. +- **POM Design Pattern**: Enhances test maintenance and reusability. +- **Facade Design Pattern**: Simplifies complex interactions with a unified interface. +- **CI/CD Integration**: Seamless integration with CI pipelines. + +## Project Structure + +├── .github/workflows # GitHub Actions workflows +├── config # Configuration files +├── logger # Custom logging utilities +├── src/test # Test scripts and page objects +├── package.json # Project dependencies and scripts +├── playwright.config.ts # Playwright configuration +├── tsconfig.json # TypeScript configuration + +## Getting Started + +### Prerequisites + +- Node.js (v14 or higher) +- npm or yarn + +### Installation + +1. Clone the repository: + git clone https://github.com/najeeb1023/magento-webapp.git + +2. Install dependencies: + npm i + +3. To run the project: + cucumber:luma - To run all the test scenarios. + cucumber:luma:tags - Add your scenario tag in the end using -> @tag. + cucumber:luma:debug - After attatching the debugger you can easily debug the desired scenario. \ No newline at end of file diff --git a/config/cucumber.js b/config/cucumber.js index 850a83f..f557ddb 100644 --- a/config/cucumber.js +++ b/config/cucumber.js @@ -1,4 +1,4 @@ -const { DEFAULT_THEME } = require("@cucumber/pretty-formatter"); // pretty formatter removed. +const { DEFAULT_THEME } = require("@cucumber/pretty-formatter"); module.exports = { diff --git a/package.json b/package.json index 9c65eec..93ce2e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "magento-webapp", - "version": "v3.3.0", + "version": "v3.4.2", "main": "index.js", "scripts": { "cucumber:luma": "cucumber-js --config=config/cucumber.js", diff --git a/src/test/hooks/hooks.ts b/src/test/hooks/hooks.ts index 0ca080c..065a934 100644 --- a/src/test/hooks/hooks.ts +++ b/src/test/hooks/hooks.ts @@ -9,7 +9,6 @@ let context: BrowserContext; BeforeAll(async function () { pageFixture.logger = createCustomLogger(); - pageFixture.logger.info('----------------- New Test Run -----------------' + "\n"); browser = await chromium.launch(config); }); @@ -17,7 +16,6 @@ Before(async function () { context = await browser.newContext({viewport: null}); const page = await context.newPage(); pageFixture.page = page; - // pageFixture.logger = createCustomLogger(); }); After(async function ({ pickle, result }) {