Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Latest commit

 

History

History
49 lines (40 loc) · 1.41 KB

README.md

File metadata and controls

49 lines (40 loc) · 1.41 KB

AeroGear Browser Tests

How to run the tests

# Login with oc client
oc login <AUTH_URL> --token <TOKEN>
# Username & Password you can use to login to MDC/OpenShift via oAuth Proxy
export OPENSHIFT_USERNAME=<REPLACE_ME>
export OPENSHIFT_PASSWORD=<REPLACE_ME>
npm test

If you want to see the tests executed in a browser, export this variable:

export HEADLESS=false

Debug tests in VS Code

  1. Open to the Debug tab in the Activity Bar (Ctrl + Shift + D)

  2. Click on the gear icon (open launch.json) in the top right corner of the tab

  3. In the launch.json configuration file add the following configuration to the configurations section.

    The below configuration assume that you have opened the whole test-suite repo using VS Code, if you have only opened the browser subdirectory remove browsers/ from program and remove the cwd line.

    You can also choose a different name

    {
      "configurations": [
        {
          "type": "node",
          "request": "launch",
          "name": "test:browser",
          "program": "${workspaceFolder}/browser/node_modules/.bin/mocha",
          "cwd": "${workspaceFolder}/browser",
          "env": {
            "OPENSHIFT_URL": "REPLACE_ME",
            "HEADLESS": "false",
            "MDC_URL": "REPLACE_ME",
            "OPENSHIFT_USERNAME": "REPLACE_ME",
            "OPENSHIFT_PASSWORD": "REPLACE_ME"
          }
        }
      ]
    }