Git Product home page Git Product logo

consoledot-e2e's Introduction

E2E tests for console.redhat.com

Playwright Tests

E2E tests for RedHat Console.

Build & Run

Tools:

Local requirements:

  • npm: 8.X
  • node: 16.X

Before running the tests you would need to provide a valid username and password to be used in the form of environment variables.

export ENV_TYPE=... # stage or production - depends on environment 
export USE_BETA=... # true/false to enable test run on Beta 
export TEST_USERNAME=...
export TEST_PASSWORD=...
export TEST_ADMIN_USERNAME=...
export TEST_ADMIN_PASSWORD=...
export TEST_2_USERNAME=...
export TEST_2_PASSWORD=...
export STARTING_PAGE=...

or drop a .env file in the root folder with a similar content:

USE_BETA=... # true/false to enable test run on Beta 
ENV_TYPE=... # stage or production - depends on environment
TEST_USERNAME=...
TEST_PASSWORD=...
TEST_ADMIN_USERNAME=...
TEST_ADMIN_PASSWORD=...
TEST_2_USERNAME=...
TEST_2_PASSWORD=...
STARTING_PAGE=...

Now you can run the tests:

npm install # Install all the needed Node dependencies
npx playwright install # Install all the Playwright dependencies and needed browsers
npx playwright test --project chromium # Executes the tests on a selected browser (`chromium` in this case)
npm test-chrome # package.json has prepared scripts so you don't need to call whole npx command
npm test-firefox

if you need to debug you can use the Playwright console and have a Playwright helper available in console by executing:

PWDEBUG=1 npx playwright test --project chromium --debug

For enabling slow mode 1s for debugging use

SLOW_MODE=1000 npx playwright test

For enabling error logging use

ENABLE_ERR_LOGGING=1 npx playwright test

Setup

This repository uses GitHub Actions as infrastructure to run the tests against publicly accessible services. The CI only runs on the main branch to avoid sharing secrets on branches and forks.

Security

The only sensitive data in this project is the username and password used to login. Those are stored in GitHub Encrypted Secrets.

consoledot-e2e's People

Contributors

andreatp avatar asanzgom avatar dhlavac avatar frawless avatar kornys avatar mmusil avatar riccardo-forina avatar rkubis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.