Skip to content

Commit

Permalink
chore: enable mfa integ tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jjarvisp committed Sep 6, 2024
1 parent c1c7a5e commit 456df39
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .github/integ-config/integ-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -877,3 +877,39 @@ tests:
sample_name: auth-gql-storage
yarn_script: ci:node-env-test
node_versions: ['18.x', '20.x', '22.x']
- test_name: integ_next_mfa_req_email
desc: 'mfa required with email sign in attribute'
framework: next
category: auth
sample_name: [mfa]
spec: mfa-req-email
browser: [chrome]
env:
NEXT_PUBLIC_BACKEND_CONFIG: mfa-req-email
- test_name: integ_next_mfa_req_phone
desc: 'mfa required with phone sign in attribute'
framework: next
category: auth
sample_name: [mfa]
spec: mfa-req-phone
browser: [chrome]
env:
NEXT_PUBLIC_BACKEND_CONFIG: mfa-req-phone
- test_name: integ_next_mfa_opt_email
desc: 'mfa optional with email sign in attribute'
framework: next
category: auth
sample_name: [mfa]
spec: mfa-opt-email
browser: [chrome]
env:
NEXT_PUBLIC_BACKEND_CONFIG: mfa-opt-email
- test_name: integ_next_mfa_opt_phone
desc: 'mfa optional with phone sign in attribute'
framework: next
category: auth
sample_name: [mfa]
spec: mfa-opt-phone
browser: [chrome]
env:
NEXT_PUBLIC_BACKEND_CONFIG: mfa-opt-phone
11 changes: 9 additions & 2 deletions .github/workflows/callable-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ on:
node_versions:
required: false
type: string
env:
required: false
type: string

env:
AMPLIFY_DIR: /home/runner/work/amplify-js/amplify-js/amplify-js
Expand Down Expand Up @@ -91,6 +94,7 @@ jobs:
E2E_RETRY_COUNT: ${{ inputs.retry_count }}
E2E_TEST_NAME: ${{ inputs.test_name }}
E2E_YARN_SCRIPT: ${{ inputs.yarn_script }}
E2E_ENV: ${{ inputs.env }}
run: |
if [ -z "$E2E_YARN_SCRIPT" ]; then
../amplify-js/scripts/retry-yarn-script.sh -s \
Expand All @@ -102,7 +106,8 @@ jobs:
$E2E_BROWSER \
dev \
$E2E_BACKEND \
$E2E_AMPLIFY_JS_DIR" \
$E2E_AMPLIFY_JS_DIR \
--env $(echo $E2E_ENV | jq -r 'tostring')" \
$E2E_YARN_SCRIPT \
-n $E2E_RETRY_COUNT
else
Expand All @@ -122,6 +127,7 @@ jobs:
E2E_RETRY_COUNT: ${{ inputs.retry_count }}
E2E_TEST_NAME: ${{ inputs.test_name }}
E2E_YARN_SCRIPT: ${{ inputs.yarn_script }}
E2E_ENV: ${{ inputs.env }}
run: |
if [ -z "$E2E_YARN_SCRIPT" ]; then
../amplify-js/scripts/retry-yarn-script.sh -s \
Expand All @@ -133,7 +139,8 @@ jobs:
$E2E_BROWSER \
prod \
$E2E_BACKEND \
$E2E_AMPLIFY_JS_DIR" \
$E2E_AMPLIFY_JS_DIR \
--env $(echo $E2E_ENV | jq -r 'tostring')" \
$E2E_YARN_SCRIPT \
-n $E2E_RETRY_COUNT
else
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/callable-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
retry_count: ${{ matrix.integ-config.retry_count || 3 }}
yarn_script: ${{ matrix.integ-config.yarn_script || '' }}
node_versions: ${{ toJSON(matrix.integ-config.node_versions) || '[""]' }}
env: ${{ matrix.integ-config.env && toJSON(matrix.integ-config.env) || '{}' }}

# e2e-test-runner-headless:
# name: E2E test runnner_headless
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-integ-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:
on:
push:
branches:
- replace-with-your-branch
- test/email-mfa-integ

jobs:
e2e:
Expand Down

0 comments on commit 456df39

Please sign in to comment.