-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from EyeSeeTea/test/branch
add skeleton app for testing
- Loading branch information
Showing
94 changed files
with
14,755 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
> 0.5% | ||
last 2 versions | ||
Firefox ESR | ||
ie 11 | ||
not dead |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
BROWSER=false | ||
VITE_PORT=8081 | ||
|
||
VITE_DHIS2_BASE_URL=https://dev.eyeseetea.com/play | ||
VITE_DHIS2_AUTH='admin:district' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GENERATE_SOURCEMAP=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/**/*.d.ts | ||
/src/locales |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"extends": [ | ||
"react-app", | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:testing-library/react" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"ignorePatterns": ["src/**/snapshots/*.ts"], | ||
"rules": { | ||
"no-console": ["warn", { "allow": ["debug", "warn", "error"] }], | ||
"prefer-const": "warn", | ||
"@typescript-eslint/camelcase": "off", | ||
"@typescript-eslint/explicit-function-return-type": ["off"], | ||
"@typescript-eslint/no-this-alias": ["off"], | ||
"@typescript-eslint/no-unnecessary-type-constraint": ["off"], | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ | ||
"argsIgnorePattern": "^_", | ||
"varsIgnorePattern": "^_", | ||
"caughtErrorsIgnorePattern": "^_" | ||
} | ||
], | ||
"@typescript-eslint/no-unused-expressions": ["warn"], | ||
"react/prop-types": "off", | ||
"react/display-name": "off", | ||
"react/react-in-jsx-scope": "off", | ||
"no-unused-expressions": "off", | ||
"no-useless-concat": "off", | ||
"no-useless-constructor": "off", | ||
"no-unexpected-multiline": "off", | ||
"default-case": "off", | ||
"array-callback-return": "off", | ||
"@typescript-eslint/no-use-before-define": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-empty-interface": "off", | ||
"@typescript-eslint/ban-ts-ignore": "off", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/indent": "off", | ||
"@typescript-eslint/member-delimiter-style": "off", | ||
"@typescript-eslint/type-annotation-spacing": "off", | ||
"@typescript-eslint/no-misused-promises": "warn", | ||
"no-use-before-define": "off", | ||
"no-debugger": "warn", | ||
"no-extra-semi": "off", | ||
"no-mixed-spaces-and-tabs": "off", | ||
"no-useless-rename": "off", | ||
"react-hooks/rules-of-hooks": "warn", | ||
"react-hooks/exhaustive-deps": "warn", | ||
"testing-library/await-async-query": "error", | ||
"testing-library/no-await-sync-query": "error", | ||
"testing-library/prefer-screen-queries": "off", | ||
"testing-library/no-debugging-utils": "off", | ||
"testing-library/no-dom-import": "off", | ||
"no-relative-import-paths/no-relative-import-paths": [ | ||
"error", | ||
{ "allowSameFolder": true, "rootDir": "src", "prefix": "$" } | ||
] | ||
}, | ||
"plugins": ["@typescript-eslint", "react-hooks", "no-relative-import-paths", "unused-imports"], | ||
"env": {}, | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"settings": { | ||
"react": { | ||
"pragma": "React", | ||
"version": "16.6.0" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
function changed { | ||
git diff --name-only HEAD@{1} HEAD | grep "^$1" > /dev/null 2>&1 | ||
} | ||
|
||
if changed 'yarn.lock'; then | ||
echo "Lockfile changes detected. Installing updates..." | ||
yarn install | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
### :pushpin: References | ||
|
||
- **Issue:** Closes #? | ||
|
||
### :memo: Implementation | ||
|
||
### :video_camera: Screenshots/Screen capture | ||
|
||
### :fire: Notes to the tester |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
manifest.webapp | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
*.sublime-project | ||
*.sublime-workspace | ||
*.code-workspace | ||
*.zip | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
src/locales/ | ||
src/react-app.d.ts | ||
src/react-app-env.d.ts | ||
bak | ||
.eslintcache | ||
|
||
# cypress | ||
cypress/screenshots/ | ||
cypress/videos/ | ||
cypress/fixtures/ | ||
|
||
# IntelliJ | ||
.idea/* | ||
|
||
docs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
./.githooks/dep-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn prettify && yarn lint && yarn update-po |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v18.14.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
build | ||
node_modules | ||
*.min.js | ||
*.min.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** @format */ | ||
|
||
module.exports = { | ||
printWidth: 100, | ||
tabWidth: 4, | ||
useTabs: false, | ||
semi: true, | ||
singleQuote: false, | ||
trailingComma: "es5", | ||
bracketSpacing: true, | ||
jsxBracketSameLine: false, | ||
arrowParens: "avoid", | ||
rangeStart: 0, | ||
rangeEnd: Infinity, | ||
proseWrap: "preserve", | ||
requirePragma: false, | ||
insertPragma: false, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
language: node_js | ||
node_js: | ||
- 12.13.0 | ||
dist: bionic | ||
cache: | ||
directories: | ||
- "$HOME/.cache" | ||
before_install: | ||
- echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||
# Install python dependencies | ||
- sudo apt-get update | ||
- sudo apt-get install python3 python python3-setuptools docker.io docker-compose | ||
# Install d2-docker | ||
- git clone https://github.com/EyeSeeTea/d2-docker.git | ||
- cd d2-docker/ | ||
- sudo python3 setup.py install | ||
- d2-docker --help | ||
# Hack to not be prompted in the terminal | ||
- sudo apt-get remove golang-docker-credential-helpers | ||
# Start docker service | ||
- sudo systemctl unmask docker.service | ||
- sudo systemctl unmask docker.socket | ||
- sudo systemctl start docker.service | ||
# Login to docker | ||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
# Start docker service | ||
- d2-docker start eyeseetea/dhis2-data:2.30-sierra-leone -d --port 8080 | ||
install: | ||
- yarn install --frozen-lockfile | ||
- yarn cy:verify | ||
- yarn build | ||
script: | ||
- PORT=8081 REACT_APP_DHIS2_BASE_URL=http://localhost:8080 REACT_APP_CYPRESS=true yarn start & | ||
- yarn wait-on http-get://localhost:8081 | ||
- yarn wait-on http-get://localhost:8080 | ||
- CYPRESS_EXTERNAL_API=http://localhost:8080 CYPRESS_ROOT_URL=http://localhost:8081 yarn cy:e2e:run --record --key $CYPRESS_KEY | ||
- kill $(jobs -p) || true | ||
addons: | ||
apt: | ||
packages: | ||
- libgconf-2-4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript.preferences.importModuleSpecifier": "non-relative" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: ["@babel/typescript", ["babel-preset-react-app", { runtime: "automatic" }]], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Turns file imports into dummy objects | ||
|
||
module.exports = "test-file-stub"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Turns style imports into empty objects | ||
|
||
module.exports = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export function getD2Stub() { | ||
return { | ||
system: { | ||
systemInfo: {}, | ||
}, | ||
currentUser: {}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { TextDecoder, TextEncoder } from "util"; | ||
|
||
global.console = { | ||
error: console.error, | ||
info: console.info, | ||
log: jest.fn(), | ||
warn: jest.fn(), | ||
debug: jest.fn(), | ||
}; | ||
|
||
// Polyfill for encoding which isn't present globally in jsdom | ||
global.TextEncoder = TextEncoder; | ||
global.TextDecoder = TextDecoder; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: i18next-conv\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=utf-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1)\n" | ||
"POT-Creation-Date: 2024-06-26T10:58:19.149Z\n" | ||
"PO-Revision-Date: 2024-06-26T10:58:19.149Z\n" | ||
|
||
msgid "Add" | ||
msgstr "" | ||
|
||
msgid "List" | ||
msgstr "" | ||
|
||
msgid "Back" | ||
msgstr "" | ||
|
||
msgid "Help" | ||
msgstr "" | ||
|
||
msgid "Hello {{name}}" | ||
msgstr "" | ||
|
||
msgid "Detail page" | ||
msgstr "" | ||
|
||
msgid "Section" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: i18next-conv\n" | ||
"POT-Creation-Date: 2024-06-26T10:58:19.149Z\n" | ||
"PO-Revision-Date: 2018-10-25T09:02:35.143Z\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1)\n" | ||
|
||
msgid "Add" | ||
msgstr "Añadir" | ||
|
||
msgid "List" | ||
msgstr "Listar" | ||
|
||
msgid "Back" | ||
msgstr "Volver" | ||
|
||
msgid "Help" | ||
msgstr "Ayuda" | ||
|
||
msgid "Hello {{name}}" | ||
msgstr "Hola {{name}}" | ||
|
||
msgid "Detail page" | ||
msgstr "" | ||
|
||
msgid "Section" | ||
msgstr "Sección" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/favicon.ico" /> | ||
|
||
<link type="text/css" rel="stylesheet" href="/includes/material-design-icons/material-icons.css" /> | ||
<link type="text/css" rel="stylesheet" href="/includes/roboto-font.css" /> | ||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" /> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> | ||
<meta name="theme-color" content="#000000" /> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + React + TS</title> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/webapp/main.tsx"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.