diff --git a/.eslintrc.local.json b/.eslintrc.local.json new file mode 100644 index 0000000000..9f9f1eeb7e --- /dev/null +++ b/.eslintrc.local.json @@ -0,0 +1,48 @@ +{ + "plugins": [ + "jsdoc" + ], + "rules": { + "jsdoc/check-access": 1, // Recommended + "jsdoc/check-alignment": 1, // Recommended + "jsdoc/check-indentation": 1, + "jsdoc/check-line-alignment": 1, + "jsdoc/check-param-names": 1, // Recommended + "jsdoc/check-property-names": 1, // Recommended + "jsdoc/check-syntax": 1, + "jsdoc/check-tag-names": 1, // Recommended + "jsdoc/check-types": 1, // Recommended + "jsdoc/check-values": 1, // Recommended + "jsdoc/empty-tags": 1, // Recommended + "jsdoc/implements-on-classes": 1, // Recommended + "jsdoc/multiline-blocks": 1, // Recommended + // "jsdoc/newline-after-description": 1, // Deprecated + "jsdoc/no-bad-blocks": 1, + "jsdoc/no-defaults": 1, + "jsdoc/no-multi-asterisks": 1, // Recommended + "jsdoc/no-undefined-types": 1, // Recommended + "jsdoc/require-asterisk-prefix": 1, + "jsdoc/require-description": 1, + "jsdoc/require-file-overview": 0, + "jsdoc/require-hyphen-before-param-description": 1, + "jsdoc/require-jsdoc": 1, // Recommended + "jsdoc/require-param": 1, // Recommended + "jsdoc/require-param-description": 1, // Recommended + "jsdoc/require-param-name": 1, // Recommended + "jsdoc/require-param-type": 1, // Recommended + "jsdoc/require-property": 1, // Recommended + "jsdoc/require-property-description": 1, // Recommended + "jsdoc/require-property-name": 1, // Recommended + "jsdoc/require-property-type": 1, // Recommended + "jsdoc/require-returns": 1, // Recommended + "jsdoc/require-returns-check": 1, // Recommended + "jsdoc/require-returns-description": 1, // Recommended + "jsdoc/require-returns-type": 1, // Recommended + "jsdoc/require-throws": 0, + "jsdoc/require-yields": 1, // Recommended + "jsdoc/require-yields-check": 1, // Recommended + "jsdoc/sort-tags": 1, + "jsdoc/tag-lines": 0, // Recommended + "jsdoc/valid-types": 1 // Recommended + } +} diff --git a/.gitignore b/.gitignore index 2861593388..cf1f612ae9 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,11 @@ sh/build-database-test.sh # Ignore local temporary files temp/ +# Ignore local eslint soft-links +client/.eslintrc.json +server/.eslintrc.json +test/.eslintrc.json + # ignore documentation bad files docs/_site/ docs/.sass-cache/ @@ -53,7 +58,12 @@ docs/.sass-cache/ client/upload/ test/*/report +test/*/report-stock migration-*.sql yarn-error.log *.log +/test-results +/playwright-report +/playwright/.cache +/tests-examples diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index ca2cfe105c..33e1bd3937 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -55,12 +55,15 @@ blocks: - checkout - 'echo "Testing node:$NODEJS_VERSION on mysql:$MYSQL_VERSION"' - yarn --ignore-engines + - npx playwright install - 'yarn build:db' - yarn build - 'yarn test:server-unit' - 'yarn test:client-unit' - 'yarn test:integration' - 'yarn test:integration:stock' + - 'yarn test:e2e-stock' + - 'yarn test:e2e' matrix: - env_var: MYSQL_VERSION values: diff --git a/client/src/i18n/en/form.json b/client/src/i18n/en/form.json index 9f21eafe3a..01ac1e951b 100644 --- a/client/src/i18n/en/form.json +++ b/client/src/i18n/en/form.json @@ -574,6 +574,7 @@ "IS_TURNOVER": "Is turnover?", "IS_WAREHOUSE": "Is warehouse?", "ITEMS" : "Items", + "JOB_FUNCTION" : "Job Function", "LABEL": "Label", "LANGUAGE": "Language", "LAST_ENTRY_DATE": "Last Entry Date", @@ -625,7 +626,7 @@ "NB_CHILD": "Number of Dependents", "NB_CHILDREN": "Number of Children", "NB_MONTH": "Number of Months", - "NB_SPOUSE": "spouse count", + "NB_SPOUSE": "Spouse Count", "NET_SALARY": "Net Salary", "NEW_EXCHANGE_RATE": "New Exchange Rate", "NO_DEBTOR_GROUPS": "No debtor groups", @@ -873,9 +874,9 @@ "USE_SIMPLIFIED_CARD": "Use simple patient identity", "USE": "Use", "VALIDATED": "Validated", - "VALIDATED_BY": "Validated by", + "VALIDATED_BY": "Validated by", "VALIDATION": "Validation", - "VALIDATION_DATE": "Validation date", + "VALIDATION_DATE": "Validation date", "VALUE": "Value", "VALUE_IN_STOCK": "Value in stock", "VARIABLE_CHARGE": "Variable cost", @@ -946,7 +947,7 @@ "IN_PROGRESS":"In Progress", "PARTIALLY":"Partially delivered", "PARTIAL_SURPLUSES" : "Partial with surpluses", - "VALIDATED" : "Validated" + "VALIDATED" : "Validated" } }, "LEGENDS": { diff --git a/client/src/i18n/en/payroll.json b/client/src/i18n/en/payroll.json index b6d13dd301..3497a39ed3 100644 --- a/client/src/i18n/en/payroll.json +++ b/client/src/i18n/en/payroll.json @@ -1,6 +1,6 @@ { "PAYROLL_STATUS": { - "CONFIGURED": "configured", + "CONFIGURED": "Configured", "PAID" : "Paid", "PARTIALLY_PAID" : "Partially paid", "WAITING_FOR_CONFIGURATION" : "Waiting for configuration", diff --git a/client/src/i18n/fr/form.json b/client/src/i18n/fr/form.json index d1e145abf5..de89735df9 100644 --- a/client/src/i18n/fr/form.json +++ b/client/src/i18n/fr/form.json @@ -577,6 +577,7 @@ "IS_TURNOVER": "est ce le chiffre d'affaire?", "IS_WAREHOUSE": "Entrepôt ?", "ITEMS" : "Items", + "JOB_FUNCTION" : "Fontion professional", "LABEL": "Désignation", "LANGUAGE": "Langue", "LAST_ENTRY_DATE": "Date de la dernière entrée", @@ -876,7 +877,7 @@ "VALIDATED": "Validé", "VALIDATED_BY": "Validé par", "VALIDATION": "Validation", - "VALIDATION_DATE": "Date de la validation", + "VALIDATION_DATE": "Date de la validation", "VALUE": "Valeur", "VALUE_IN_STOCK": "Valeur en stock", "VARIABLE_CHARGE": "Charge variable", diff --git a/client/src/js/components/bhFonctionSelect.js b/client/src/js/components/bhFonctionSelect.js index 448464d29f..3bd10e2ca4 100644 --- a/client/src/js/components/bhFonctionSelect.js +++ b/client/src/js/components/bhFonctionSelect.js @@ -21,7 +21,7 @@ FonctionSelectController.$inject = [ function FonctionSelectController(functions, Notify) { const $ctrl = this; $ctrl.$onInit = function onInit() { - $ctrl.label = $ctrl.label || 'FORM.LABELS.PROFESSION'; + $ctrl.label = $ctrl.label || 'FORM.LABELS.JOB_FUNCTION'; functions.read() .then(fct => { diff --git a/client/src/js/components/bhStockExitType.js b/client/src/js/components/bhStockExitType.js index e425740858..e04f7bf3a8 100644 --- a/client/src/js/components/bhStockExitType.js +++ b/client/src/js/components/bhStockExitType.js @@ -2,7 +2,7 @@ const stockExitTypeTmpl = `
+ * const row = await gridUtils.getRow( 'myGrid', 0); //or internally + *
+ * const row = await gridUtils.selectRow( 'myGrid', 0 ); + *
+ * gridTestUtils.expectCellValueMatch('myGrid', 0, 2, 'CellValue'); + *