Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release(required): Amplify JS release #12670

Merged
merged 15 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
136 changes: 60 additions & 76 deletions .github/canary-config/canary-all.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
minimal_browser_list: &minimal_browser_list
- chrome
- firefox

extended_browser_list: &extended_browser_list
- chrome
- firefox
- edge

tests:
# DATASTORE
- test_name: integ_datastore_auth-owner-based-default
Expand All @@ -15,56 +6,56 @@ tests:
category: datastore
sample_name: owner-based-default
spec: owner-based-default
browser: *minimal_browser_list
browser: [chrome, firefox]
- test_name: integ_react_datastore
desc: 'React DataStore'
framework: react
category: datastore
sample_name: [many-to-many]
spec: many-to-many
browser: *minimal_browser_list
browser: [chrome, firefox]
- test_name: integ_react_datastore_multi_auth_one_rule
desc: 'React DataStore Multi-Auth - One Rule'
framework: react
category: datastore
sample_name: [multi-auth]
spec: multi-auth-one-rule
browser: *minimal_browser_list
browser: [chrome, firefox]
- test_name: integ_react_datastore_multi_auth_three_plus_rules
desc: 'React DataStore Multi-Auth - Three Plus Rules'
framework: react
category: datastore
sample_name: [multi-auth]
spec: multi-auth-three-plus-rules
browser: *minimal_browser_list
browser: [chrome, firefox]
- test_name: integ_react_datastore_subs_disabled
desc: 'DataStore - Subs Disabled'
framework: react
category: datastore
sample_name: [subs-disabled]
spec: subs-disabled
browser: *minimal_browser_list
browser: [chrome, firefox]
- test_name: integ_react_datastore_consecutive_saves
desc: 'DataStore - Subs Disabled'
framework: react
category: datastore
sample_name: [consecutive-saves]
spec: consecutive-saves
browser: *minimal_browser_list
browser: [chrome, firefox]
- test_name: integ_react_datastore_schema_drift
desc: 'DataStore - Schema Drift'
framework: react
category: datastore
sample_name: [schema-drift]
spec: schema-drift
browser: *minimal_browser_list
browser: [chrome, firefox]
- test_name: integ_react_datastore_background_process_manager
desc: 'DataStore - Background Process Manager'
framework: react
category: datastore
sample_name: [v2/background-process-manager]
spec: background-process-manager
browser: *extended_browser_list
browser: [chrome, edge, firefox]
# TODO: remove when updated CPK + related models tests are added
# - test_name: integ_react_datastore_related_models
# desc: 'DataStore - Related Models'
Expand All @@ -90,14 +81,14 @@ tests:
category: datastore
sample_name: [selective-sync-v5]
spec: selective-sync-v5
browser: *minimal_browser_list
browser: [chrome, firefox]
- test_name: integ_react_datastore_docs_examples
desc: 'DataStore - Docs Examples'
framework: react
category: datastore
sample_name: [v2/amplify-docs-examples]
spec: amplify-docs-examples
browser: *minimal_browser_list
browser: [chrome, firefox]
timeout_minutes: 45
retry_count: 10
- test_name: integ_react_datastore_websocket_disruption
Expand All @@ -106,21 +97,22 @@ tests:
category: datastore
sample_name: [websocket-disruption]
spec: websocket-disruption
browser: *minimal_browser_list
- test_name: integ_next_datastore_owner_auth
desc: 'next owner auth'
framework: next
category: datastore
sample_name: [owner-based-default]
spec: next-owner-based-default
browser: *minimal_browser_list
browser: [chrome, firefox]
# can un comment when ever fixed
# - test_name: integ_next_datastore_owner_auth
# desc: 'next owner auth'
# framework: next
# category: datastore
# sample_name: [owner-based-default]
# spec: next-owner-based-default
# browser: [chrome, firefox]
- test_name: integ_next_datastore_13_js
desc: 'DataStore - Nextjs 13 build with SWC - JS app'
framework: next
category: datastore
sample_name: [next-13-js]
spec: nextjs-13
browser: *minimal_browser_list
browser: [chrome, firefox]
timeout_minutes: 45
retry_count: 10
- test_name: integ_rollup_datastore_basic_crud
Expand Down Expand Up @@ -161,43 +153,49 @@ tests:
browser: [chrome]

# INTERACTIONS
- test_name: integ_react_interactions_react_interactions
desc: 'React Interactions'
framework: react
category: interactions
sample_name: [chatbot-component]
spec: chatbot-component
browser: *minimal_browser_list
# - test_name: integ_react_interactions_react_interactions
# desc: 'React Interactions'
# framework: react
# category: interactions
# sample_name: [chatbot-component]
# spec: chatbot-component
# browser: *minimal_browser_list
- test_name: integ_react_interactions_chatbot_v1
desc: 'Chatbot V1'
framework: react
category: interactions
sample_name: [lex-test-component]
spec: chatbot-v1
browser: *minimal_browser_list
- test_name: integ_angular_interactions
desc: 'Angular Interactions'
framework: angular
category: interactions
sample_name: [chatbot-component]
spec: chatbot-component
browser: *minimal_browser_list
- test_name: integ_vue_interactions_vue_2_interactions
desc: 'Vue 2 Interactions'
framework: vue
browser: [chrome, firefox]
- test_name: integ_react_interactions_chatbot_v2
desc: 'Chatbot V2'
framework: react
category: interactions
sample_name: [chatbot-component]
spec: chatbot-component
browser: [chrome]

# PREDICTIONS
sample_name: [lex-test-component]
spec: chatbot-v2
browser: [chrome, firefox]
# - test_name: integ_angular_interactions
# desc: 'Angular Interactions'
# framework: angular
# category: interactions
# sample_name: [chatbot-component]
# spec: chatbot-component
# browser: *minimal_browser_list
# - test_name: integ_vue_interactions_vue_2_interactions
# desc: 'Vue 2 Interactions'
# framework: vue
# category: interactions
# sample_name: [chatbot-component]
# spec: chatbot-component
# browser: [chrome]
# PREDICTIONS
- test_name: integ_react_predictions
desc: 'React Predictions'
framework: react
category: predictions
sample_name: [multi-user-translation]
spec: multiuser-translation
browser: *minimal_browser_list
browser: [chrome, firefox]

# PUBSUB
- test_name: integ_react_iot_reconnect
Expand All @@ -224,21 +222,21 @@ tests:
category: storage
sample_name: [storageApp]
spec: storage
browser: *minimal_browser_list
browser: [chrome, firefox]
- test_name: integ_react_storage_multipart_progress
desc: 'React Storage Multi-Part Upload with Progress'
framework: react
category: storage
sample_name: [multi-part-upload-with-progress]
spec: multi-part-upload-with-progress
browser: *minimal_browser_list
browser: [chrome, firefox]
- test_name: integ_react_storage_copy
desc: 'React Storage Copy'
framework: react
category: storage
sample_name: [multi-part-copy]
spec: multi-part-copy
browser: *minimal_browser_list
browser: [chrome, firefox]

# API
- test_name: integ_react_graphql_api
Expand All @@ -247,63 +245,49 @@ tests:
category: api
sample_name: [graphql]
spec: graphql
browser: *minimal_browser_list
browser: [chrome, firefox]

# AUTH
- test_name: integ_react_auth_1_react_authenticator
desc: 'React Authenticator'
framework: react
category: auth
sample_name: [amplify-authenticator]
spec: new-ui-authenticator
browser: *minimal_browser_list
- test_name: integ_react_auth_2_react_credentials_different_region
desc: 'React Credentials Different Region'
framework: react
category: auth
sample_name: [credentials-auth]
spec: credentials-auth
browser: *minimal_browser_list
browser: [chrome, firefox]
- test_name: integ_react_device_tracking
desc: 'cognito-device-tracking'
framework: react
category: auth
sample_name: [device-tracking]
spec: device-tracking
browser: *minimal_browser_list
browser: [chrome, firefox]
- test_name: integ_react_delete_user
desc: 'delete-user'
framework: react
category: auth
sample_name: [delete-user]
spec: delete-user
browser: *minimal_browser_list
browser: [chrome, firefox]
- test_name: integ_angular_auth_angular_authenticator
desc: 'Angular Authenticator'
framework: angular
category: auth
sample_name: [amplify-authenticator]
spec: ui-amplify-authenticator
browser: *minimal_browser_list
browser: [chrome, firefox]
- test_name: integ_javascript_auth
desc: 'JavaScript Auth CDN'
framework: javascript
category: auth
sample_name: [auth-cdn]
spec: auth-cdn
browser: *minimal_browser_list
browser: [chrome, firefox]
amplifyjs_dir: true
- test_name: integ_vue_auth_legacy_vue_authenticator
desc: 'Legacy Vue Authenticator'
framework: vue
category: auth
sample_name: [amplify-authenticator-legacy]
spec: authenticator
browser: *minimal_browser_list
- test_name: integ_next_auth_authenticator_and_ssr_page
desc: 'Authenticator and SSR page'
framework: next
category: auth
sample_name: [auth-ssr]
spec: auth-ssr
browser: *minimal_browser_list
browser: [chrome, edge]
21 changes: 21 additions & 0 deletions .github/dependency-review/dependecy-review-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
allow-licenses:
- 'Apache-2.0'
- 'BSL-1.0'
- 'BSD-1-Clause'
- 'BSD-2-Clause-FreeBSD'
- 'BSD-2-Clause'
- 'BSD-3-Clause-Attribution'
- 'BSD-3-Clause'
- 'CC-BY-3.0'
- 'CC-BY-4.0'
- 'curl'
- 'ISC'
- 'JSON'
- 'MIT'
- 'OpenSSL'
- 'PDDL-1.0'
- 'PostgreSQL'
- 'Python-2.0'
- 'Unlicense'
- 'WTFPL'
- 'Zlib'
2 changes: 1 addition & 1 deletion .github/workflows/callable-canary-e2e-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
sample_name: ${{ toJSON(matrix.canary-config.sample_name) || '[""]' }}
browser: ${{ toJSON(matrix.canary-config.browser) || '[""]' }}
timeout_minutes: ${{ matrix.canary-config.timeout_minutes || 35 }}
retry_count: ${{ matrix.canary-config.retry_count || 3 }}
retry_count: ${{ matrix.canary-config.retry_count || 3 }}
2 changes: 1 addition & 1 deletion .github/workflows/callable-canary-sampleapp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:

# Angular
- name: Install angular CLI
run: npm install -g @angular/cli
run: npm install -g @angular/cli@16.2.10
- name: Create angular application
run: npx -p @angular/cli ng new new-angular-app
working-directory: amplify-js-samples-staging/samples/angular/interactions
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/callable-dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ jobs:
uses: actions/checkout@e2a5a1afd5d7305b13671410c52a31819ab9fad9 # v4.0.0 https://github.com/actions/checkout/commit/e2a5a1afd5d7305b13671410c52a31819ab9fad9
- name: 'Dependency Review'
uses: actions/dependency-review-action@7bbfa034e752445ea40215fff1c3bf9597993d3f # v3.1.3 https://github.com/actions/dependency-review-action/commit/7bbfa034e752445ea40215fff1c3bf9597993d3f
with:
config-file: '.github/dependency-review/dependecy-review-config.yml'
24 changes: 24 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/** @type {import('jest').Config} */
module.exports = {
coveragePathIgnorePatterns: [
'/node_modules/',
'dist',
'__tests__',
],
setupFiles: ['../../jest.setup.js'],
testEnvironment: 'jsdom',
testRegex: '/__tests__/.*\\.(test|spec)\\.[jt]sx?$',
transform: {
'^.+\\.(js|jsx|ts|tsx)$': [
'ts-jest',
{
tsconfig: {
allowJs: true,
lib: ['dom', 'es2020'],
noImplicitAny: false,
types: ['jest', 'jsdom'],
},
},
],
},
};
13 changes: 13 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Suppress console messages printing during unit tests.
// Comment out log level as necessary (e.g. while debugging tests)
global.console = {
...console,
log: jest.fn(),
debug: jest.fn(),
info: jest.fn(),
warn: jest.fn(),
error: jest.fn(),
};

// React Native global
global['__DEV__'] = true;
Loading
Loading