Skip to content

Commit

Permalink
add e2e back
Browse files Browse the repository at this point in the history
  • Loading branch information
rikukissa committed Dec 16, 2024
1 parent 30b930a commit 4ebb3f0
Show file tree
Hide file tree
Showing 73 changed files with 63,224 additions and 0 deletions.
Binary file added e2e/assets/528KB-random.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added e2e/assets/5MB-random.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions e2e/codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
overwrite: true
schema:
- https://gateway.farajaland-dev.opencrvs.org/graphql:
headers:
Authorization: 'Bearer ${TOKEN}'
# documents:
# - 'e2e/**/*.ts'
# - '!e2e/**/*.spec.ts'
# - '!e2e/gateway.ts'
generates:
e2e/gateway.ts:
plugins:
- add:
content: '/* DO NOT EDIT! This file is auto-generated by yarn data-generator:generate-types - see `codegen.yml` */'
- 'typescript'
- 'typescript-operations'

e2e/graphql.schema.json:
plugins:
- 'introspection'
39 changes: 39 additions & 0 deletions e2e/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
export const DOMAIN = process.env.DOMAIN || 'farajaland-dev.opencrvs.org'
export const LOGIN_URL = 'https://login.' + DOMAIN
export const AUTH_URL = 'https://auth.' + DOMAIN
export const CLIENT_URL = 'https://register.' + DOMAIN
export const GATEWAY_HOST = 'https://gateway.' + DOMAIN

/*
* This timeout is to ensure that all previous actions have been completed
* including filling inputs and that the changed values have been reflected
* also to the Redux state. 500ms is selected as a safe value.
*/
export const SAFE_INPUT_CHANGE_TIMEOUT_MS = 500

/*
* This timeout ensures that
* the declaration in outbox is sent to backend
* and outbox is now empty
*/
export const SAFE_OUTBOX_TIMEOUT_MS = 30 * 1000
const TEST_USER_PASSWORD = 'test'

export const CREDENTIALS = {
FIELD_AGENT: {
USERNAME: 'k.bwalya',
PASSWORD: TEST_USER_PASSWORD
},
REGISTRATION_AGENT: {
USERNAME: 'f.katongo',
PASSWORD: TEST_USER_PASSWORD
},
LOCAL_REGISTRAR: {
USERNAME: 'k.mweene',
PASSWORD: TEST_USER_PASSWORD
},
NATIONAL_REGISTRAR: {
USERNAME: 'j.musonda',
PASSWORD: TEST_USER_PASSWORD
}
}
Loading

0 comments on commit 4ebb3f0

Please sign in to comment.