diff --git a/karma.conf.js b/karma.conf.js index a6bcf8605a..fb3e7b84a3 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -55,6 +55,12 @@ module.exports = (config) => { outputFile : process.env.KARMA_FILENAME || 'test.xml', suite : 'BHIMA-Tests', useBrowserName : false, + nameFormatter : (browser, result) => { + return result.description; + }, + classNameFormatter : (browser, result) => { + return result.suite[0]; + }, }, // web server port diff --git a/playwright.config.js b/playwright.config.js index e59eed451f..3d7460b651 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -18,7 +18,7 @@ module.exports = defineConfig({ // testIgnore : process.env.E2E_DIR ? '' : /\/stock\/|\/account\//, /* Maximum time one test can run for. */ - timeout : 40 * 1000, // Need longer value for CI + timeout : 50 * 1000, // Need longer value for CI expect : { /** diff --git a/sh/test-e2e-account.sh b/sh/test-e2e-account.sh index 57a761561d..f08e824f5a 100755 --- a/sh/test-e2e-account.sh +++ b/sh/test-e2e-account.sh @@ -45,6 +45,9 @@ echo "[test] Running end-to-end account tests using playwright." cd .. E2E_DIR=account npx playwright test 2>&1 | tee ./results/end-to-end-account-report +# Adjust formatting for Jenkins +sed -i 's/.spec.js//g' "./results/end-to-end-account-results.xml" + # FYI: Use --workers=1 to limit number of workers # Clean up any left-over zombie node processes (if not CI) diff --git a/sh/test-e2e.sh b/sh/test-e2e.sh index 060e0772e4..ea8a3a339f 100755 --- a/sh/test-e2e.sh +++ b/sh/test-e2e.sh @@ -48,6 +48,9 @@ cd .. npx playwright test $TESTS 2>&1 | tee "./results/end-to-end-report-$TEST_NUM" +# Adjust formatting for Jenkins +sed -i 's/.spec.js//g' "./results/end-to-end-$TEST_NUM-results.xml" + # FYI: Use PWTEST_SKIP_TEST_OUTPUT=1 to skip interactive web debug at the end # FYI: Use --workers=1 to limit number of workers diff --git a/test/client-unit/components/bhCardList.spec.js b/test/client-unit/components/bhCardList.spec.js index 9893757699..1087561edf 100644 --- a/test/client-unit/components/bhCardList.spec.js +++ b/test/client-unit/components/bhCardList.spec.js @@ -1,6 +1,7 @@ /* eslint no-unused-expressions:off */ /* global inject expect */ describe('test/client-unit/components/bhCardList', () => { + let $compile; let $rootScope; let $templateCache; diff --git a/test/client-unit/components/bhFindPatient/controller.spec.js b/test/client-unit/components/bhFindPatient/controller.spec.js index e52443913d..91169f4beb 100644 --- a/test/client-unit/components/bhFindPatient/controller.spec.js +++ b/test/client-unit/components/bhFindPatient/controller.spec.js @@ -1,7 +1,7 @@ /* eslint no-unused-expressions:"off" */ /* global inject, expect, chai */ -describe.skip('bhFindPatient Controller Tests', ControllerTests); +describe.skip('test/client-unit/components/bhFindPatient Controller Tests', ControllerTests); /** * @todo - finish the DOM tests to compliment this controller test suite. diff --git a/test/client-unit/components/bhFindPatient/dom.spec.js b/test/client-unit/components/bhFindPatient/dom.spec.js index c9192038df..7d35beabfb 100644 --- a/test/client-unit/components/bhFindPatient/dom.spec.js +++ b/test/client-unit/components/bhFindPatient/dom.spec.js @@ -1,6 +1,6 @@ /* global inject, expect, chai */ -describe.skip('bhFindPatient DOM bindings', DomTests); +describe.skip('test/client-unit/components/bhFindPatient DOM bindings', DomTests); /** * @todo(@jniles) - finish this test suite. At the moment, it is incomplete and diff --git a/test/client-unit/directives/bhBlur.spec.js b/test/client-unit/directives/bhBlur.spec.js index e001a8e891..8e69c9f8f4 100644 --- a/test/client-unit/directives/bhBlur.spec.js +++ b/test/client-unit/directives/bhBlur.spec.js @@ -1,7 +1,7 @@ /* eslint no-unused-expressions:off, no-continue: off */ /* global inject, expect, chai */ -describe('test/client-unit/directives/(directive) bhBlur', () => { +describe('test/client-unit/directives/bhBlur directive', () => { let $compile; let $scope; let element; diff --git a/test/client-unit/directives/bhInteger.spec.js b/test/client-unit/directives/bhInteger.spec.js index 8ad0e1a3e7..558f488ed4 100644 --- a/test/client-unit/directives/bhInteger.spec.js +++ b/test/client-unit/directives/bhInteger.spec.js @@ -1,5 +1,5 @@ /* global inject, expect */ -describe('test/client-unit/directives/(directive) bhInteger', () => { +describe('test/client-unit/directives/bhInteger directive', () => { let $scope; let form; diff --git a/test/client-unit/directives/bhMaxInteger.spec.js b/test/client-unit/directives/bhMaxInteger.spec.js index 34aa963333..6151d5c496 100644 --- a/test/client-unit/directives/bhMaxInteger.spec.js +++ b/test/client-unit/directives/bhMaxInteger.spec.js @@ -1,5 +1,5 @@ /* global inject, expect */ -describe('test/client-unit/directives/(directive) bhMaxInteger', () => { +describe('test/client-unit/directives/bhMaxInteger directive', () => { let $scope; let form; diff --git a/test/client-unit/directives/bhSubmit.spec.js b/test/client-unit/directives/bhSubmit.spec.js index b3afc74b5c..c666175878 100644 --- a/test/client-unit/directives/bhSubmit.spec.js +++ b/test/client-unit/directives/bhSubmit.spec.js @@ -1,5 +1,5 @@ /* global inject, expect, chai */ -describe('test/client-unit/directives/(directive) bhSubmit', () => { +describe('test/client-unit/directives/bhSubmit directive', () => { let $scope; let element; let deferred; @@ -15,7 +15,7 @@ describe('test/client-unit/directives/(directive) bhSubmit', () => { }; })); - describe('when the directive is added to a form', () => { + context('when the directive is added to a form', () => { beforeEach(inject(($compile) => { element = angular.element(`