test(workflows): Add test workflow (#2309)
Add separate test.yml workflow for running e2e tests on Mifos sandbox.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
testRigor:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
MIFOS_TEST_SUITE_ID: ${{secrets.MIFOS_TEST_SUITE_ID}}
|
||||
MIFOS_AUTH_TOKEN: ${{secrets.MIFOS_AUTH_TOKEN}}
|
||||
LOCALHOST_URL: ${{secrets.LOCALHOST_URL}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js 22
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '22.9.0'
|
||||
|
||||
- name: Install testRigor Command Line
|
||||
run: |
|
||||
npm install -g --verbose testrigor-cli
|
||||
|
||||
- name: Run testRigor tests
|
||||
run: |
|
||||
echo "$MIFOS_TEST_SUITE_ID"
|
||||
chmod +x ./e2e/testRigor/run_testrigor_tests.sh && ./e2e/testRigor/run_testrigor_tests.sh
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
env
|
||||
|
||||
BRANCH_NAME="$(git rev-parse --abbrev-ref HEAD)"
|
||||
COMMIT_NAME="$(git rev-parse --verify HEAD)"
|
||||
@@ -14,4 +16,5 @@ TEST_CASES_PATH="e2e/testRigor/testcases/**/*.txt"
|
||||
RULES_PATH="e2e/testRigor/rules/**/*.txt"
|
||||
|
||||
# Command to run the tests using the testRigor CLI
|
||||
testrigor test-suite run "$MIFOS_TEST_SUITE_ID" --token "$MIFOS_AUTH_TOKEN" --localhost --url "$LOCALHOST_URL" --test-cases-path "$TEST_CASES_PATH" --rules-path "$RULES_PATH" --branch "$BRANCH_NAME" --commit "$COMMIT_NAME"
|
||||
testrigor test-suite run "$MIFOS_TEST_SUITE_ID" --token "$MIFOS_AUTH_TOKEN" --localhost --url "$LOCALHOST_URL" --test-cases-path "$TEST_CASES_PATH" --rules-path "$RULES_PATH" --branch "$BRANCH_NAME" --commit "$COMMIT_NAME"
|
||||
set +x
|
||||
@@ -1,6 +1,7 @@
|
||||
// Setting wrong credentials
|
||||
save value "wrong" as "username"
|
||||
save value "wrongpassword" as "password"
|
||||
validate-login-page
|
||||
login
|
||||
// validate invalid login message
|
||||
check that page contains "Invalid User Details. Please try again!"
|
||||
|
||||
Reference in New Issue
Block a user