Skip to content

Commit

Permalink
test: building two independent test apps
Browse files Browse the repository at this point in the history
This adds an "example-plugin-app" and also gives "example" its own package.json and build files.  It separates out the test apps from the library in their parent directory, making them more independent.
  • Loading branch information
davidjoy committed Oct 26, 2021
1 parent 41cecaf commit 13e1eb0
Show file tree
Hide file tree
Showing 33 changed files with 34,212 additions and 96 deletions.
25 changes: 25 additions & 0 deletions example-plugin-app/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
EXAMPLE_VAR=Example Value
ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload
BASE_URL=http://localhost:8081
CREDENTIALS_BASE_URL=http://localhost:18150
CSRF_TOKEN_API_PATH=/csrf/api/v1/token
DISCOVERY_API_BASE_URL=http://localhost:18381
PUBLISHER_BASE_URL=http://localhost:18400
ECOMMERCE_BASE_URL=http://localhost:18130
LANGUAGE_PREFERENCE_COOKIE_NAME=openedx-language-preference
LMS_BASE_URL=http://localhost:18000
LOGIN_URL=http://localhost:18000/login
LOGOUT_URL=http://localhost:18000/logout
STUDIO_BASE_URL=http://localhost:18010
MARKETING_SITE_BASE_URL=http://localhost:18000
ORDER_HISTORY_URL=http://localhost:1996/orders
REFRESH_ACCESS_TOKEN_ENDPOINT=http://localhost:18000/login_refresh
SEGMENT_KEY=''
SITE_NAME=localhost
USER_INFO_COOKIE_NAME=edx-user-info
LOGO_URL=https://edx-cdn.org/v3/default/logo.svg
LOGO_TRADEMARK_URL=https://edx-cdn.org/v3/default/logo-trademark.svg
LOGO_WHITE_URL=https://edx-cdn.org/v3/default/logo-white.svg
FAVICON_URL=https://edx-cdn.org/v3/default/favicon.ico
IGNORED_ERROR_REGEX=
PORT=8081
24 changes: 24 additions & 0 deletions example-plugin-app/.env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
EXAMPLE_VAR=Example Value
ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload
BASE_URL=http://localhost:8081
CREDENTIALS_BASE_URL=http://localhost:18150
CSRF_TOKEN_API_PATH=/csrf/api/v1/token
DISCOVERY_API_BASE_URL=http://localhost:18381
PUBLISHER_BASE_URL=http://localhost:18400
ECOMMERCE_BASE_URL=http://localhost:18130
LANGUAGE_PREFERENCE_COOKIE_NAME=openedx-language-preference
LMS_BASE_URL=http://localhost:18000
LOGIN_URL=http://localhost:18000/login
LOGOUT_URL=http://localhost:18000/logout
STUDIO_BASE_URL=http://localhost:18010
MARKETING_SITE_BASE_URL=http://localhost:18000
ORDER_HISTORY_URL=http://localhost:1996/orders
REFRESH_ACCESS_TOKEN_ENDPOINT=http://localhost:18000/login_refresh
SEGMENT_KEY=''
SITE_NAME=localhost
USER_INFO_COOKIE_NAME=edx-user-info
LOGO_URL=https://edx-cdn.org/v3/default/logo.svg
LOGO_TRADEMARK_URL=https://edx-cdn.org/v3/default/logo-trademark.svg
LOGO_WHITE_URL=https://edx-cdn.org/v3/default/logo-white.svg
FAVICON_URL=https://edx-cdn.org/v3/default/favicon.ico
IGNORED_ERROR_REGEX=
6 changes: 6 additions & 0 deletions example-plugin-app/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.idea
coverage
dist
docs
node_modules
src/analytics/segment.js
29 changes: 29 additions & 0 deletions example-plugin-app/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const { getBaseConfig } = require('@edx/frontend-build');

const config = getBaseConfig('eslint');

config.rules = {
'import/no-extraneous-dependencies': ['error', {
'devDependencies': [
'**/*.config.js',
'**/*.test.jsx',
'**/*.test.js',
'example/*',
],
}],
'import/extensions': ['error', {
ignore: ['@edx/frontend-platform*'],
}],
'import/no-unresolved': ['error', {
ignore: ['@edx/frontend-platform*'],
}],
'jsx-a11y/anchor-is-valid': ['error', {
components: ['Link'],
specialLink: [],
specialLink: ['to'],
aspects: ['noHref', 'invalidHref', 'preferButton'],
}],
'react/react-in-jsx-scope': ['error'],
};

module.exports = config;
Loading

0 comments on commit 13e1eb0

Please sign in to comment.