Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/monorepo-validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ jobs:

test:
name: Test
env:
# junit test report used by test-summary/action to add test summary
CREATE_JUNIT_TEST_REPORT: true
needs: [lint]
runs-on: ${{ fromJSON(vars.RUNNER) }}
timeout-minutes: 15
Expand All @@ -72,3 +75,25 @@ jobs:
cache-dependency-path: '**/pnpm-lock.yaml'
- run: pnpm install --offline
- run: pnpm test
- name: Generate test summary
if: always()
uses: ctrf-io/github-test-reporter@v1
with:
report-path: "**/test-reports/junit.xml"
use-suite-name: true
github-report: true
integrations-config: |
{
"junit-to-ctrf": {
"enabled": true,
"action": "convert",
"options": {
"output": "./ctrf-reports/ctrf-report.json",
"toolname": "junit-to-ctrf",
"useSuiteName": false,
"env": {
"appName": "my-app"
}
}
}
}
22 changes: 22 additions & 0 deletions .github/workflows/test-e2e-desktop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,28 @@ jobs:
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
pnpm run desktop

- name: Generate test summary
if: always()
uses: ctrf-io/github-test-reporter@v1
with:
report-path: "**/test-reports/junit.xml"
github-report: true
integrations-config: |
{
"junit-to-ctrf": {
"enabled": true,
"action": "convert",
"options": {
"output": "./ctrf-reports/ctrf-report.json",
"toolname": "junit-to-ctrf",
"useSuiteName": false,
"env": {
"appName": "my-app"
}
}
}
}

- name: Upload Playwright report
if: ${{ failure() }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
Expand Down
3 changes: 3 additions & 0 deletions addons/api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@

# broccoli-debug
/DEBUG/

# test reports
/test-reports/
2 changes: 2 additions & 0 deletions addons/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
"qunit": "^2.22.0",
"qunit-dom": "^3.2.1",
"sinon": "^19.0.2",
"testem-gitlab-reporter": "^1.0.0",
"testem-multi-reporter": "^1.2.0",
"webpack": "^5.95.0"
},
"peerDependencies": {
Expand Down
30 changes: 30 additions & 0 deletions addons/api/testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@
*/

'use strict';
const MultiReporter = require('testem-multi-reporter');
const JUnitReporter = require('testem-gitlab-reporter');
const fs = require('fs');

// eslint-disable-next-line n/no-extraneous-require, n/no-missing-require
const TAPReporter = require('testem/lib/reporters/tap_reporter');

const multiReporterConfig = {
reporters: [
{
ReporterClass: TAPReporter,
args: [false, null, { get: () => false }],
},
],
};

if (process.env.CREATE_JUNIT_TEST_REPORT === 'true') {
!fs.existsSync('./test-reports') && fs.mkdirSync('./test-reports');
multiReporterConfig.reporters.push({
ReporterClass: JUnitReporter,
args: [
false,
fs.createWriteStream('test-reports/junit.xml'),
{ get: () => false },
],
});
}

let reporter = new MultiReporter(multiReporterConfig);

module.exports = {
test_page: 'tests/index.html?hidepassed',
Expand Down Expand Up @@ -34,4 +63,5 @@ module.exports = {
Firefox: ['-headless', '--window-size=1440,900'],
},
parallel: process.env.EMBER_EXAM_SPLIT_COUNT || 1,
reporter,
};
1 change: 1 addition & 0 deletions addons/api/tests/unit/adapters/application-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module('Unit | Adapter | application', function (hooks) {
const adapter = this.owner.lookup('adapter:application');
assert.ok(adapter.namespace);
assert.strictEqual(adapter.namespace, config.api.namespace);
assert.true(false);
});

test('it generates correct URL prefixes', function (assert) {
Expand Down
1 change: 1 addition & 0 deletions addons/api/tests/unit/models/user-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ module('Unit | Model | user', function (hooks) {
});

test('it defaults `accounts_ids` to an empty array when model instance does not define it', function (assert) {
assert.true(false);
const store = this.owner.lookup('service:store');
store.push({
data: {
Expand Down
2 changes: 2 additions & 0 deletions addons/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
"stylelint": "^15.11.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-prettier": "^4.1.0",
"testem-gitlab-reporter": "^1.0.0",
"testem-multi-reporter": "^1.2.0",
"webpack": "^5.95.0"
},
"peerDependencies": {
Expand Down
30 changes: 30 additions & 0 deletions addons/auth/testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@
*/

'use strict';
const MultiReporter = require('testem-multi-reporter');
const JUnitReporter = require('testem-gitlab-reporter');
const fs = require('fs');

// eslint-disable-next-line n/no-extraneous-require, n/no-missing-require
const TAPReporter = require('testem/lib/reporters/tap_reporter');

const multiReporterConfig = {
reporters: [
{
ReporterClass: TAPReporter,
args: [false, null, { get: () => false }],
},
],
};

if (process.env.CREATE_JUNIT_TEST_REPORT === 'true') {
!fs.existsSync('./test-reports') && fs.mkdirSync('./test-reports');
multiReporterConfig.reporters.push({
ReporterClass: JUnitReporter,
args: [
false,
fs.createWriteStream('test-reports/junit.xml'),
{ get: () => false },
],
});
}

let reporter = new MultiReporter(multiReporterConfig);

module.exports = {
test_page: 'tests/index.html?hidepassed',
Expand Down Expand Up @@ -32,5 +61,6 @@ module.exports = {
].filter(Boolean),
},
Firefox: ['-headless', '--window-size=1440,900'],
reporter,
},
};
1 change: 1 addition & 0 deletions addons/auth/tests/unit/authenticators/oidc-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module('Unit | Authenticator | OIDC', function (hooks) {
});

test('`startAuthentication` initiates the authentication flow and returns the response', async function (assert) {
assert.true(false);
const authenticator = this.owner.lookup('authenticator:oidc');
server.post(authenticator.buildAuthEndpointURL(), () => [
200,
Expand Down
2 changes: 2 additions & 0 deletions addons/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@
"qunit-dom": "^3.2.1",
"rose": "workspace:*",
"sinon": "^19.0.2",
"testem-gitlab-reporter": "^1.0.0",
"testem-multi-reporter": "^1.2.0",
"webpack": "^5.95.0"
},
"engines": {
Expand Down
30 changes: 30 additions & 0 deletions addons/core/testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@
*/

'use strict';
const MultiReporter = require('testem-multi-reporter');
const JUnitReporter = require('testem-gitlab-reporter');
const fs = require('fs');

// eslint-disable-next-line n/no-extraneous-require, n/no-missing-require
const TAPReporter = require('testem/lib/reporters/tap_reporter');

const multiReporterConfig = {
reporters: [
{
ReporterClass: TAPReporter,
args: [false, null, { get: () => false }],
},
],
};

if (process.env.CREATE_JUNIT_TEST_REPORT === 'true') {
!fs.existsSync('./test-reports') && fs.mkdirSync('./test-reports');
multiReporterConfig.reporters.push({
ReporterClass: JUnitReporter,
args: [
false,
fs.createWriteStream('test-reports/junit.xml'),
{ get: () => false },
],
});
}

let reporter = new MultiReporter(multiReporterConfig);

module.exports = {
test_page: 'tests/index.html?hidepassed',
Expand Down Expand Up @@ -31,4 +60,5 @@ module.exports = {
].filter(Boolean),
},
},
reporter,
};
2 changes: 2 additions & 0 deletions addons/rose/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
"stylelint": "^15.11.0",
"stylelint-config-prettier-scss": "^0.0.1",
"stylelint-config-standard-scss": "^11.0.0",
"testem-gitlab-reporter": "^1.0.0",
"testem-multi-reporter": "^1.2.0",
"webpack": "^5.95.0"
},
"peerDependencies": {
Expand Down
32 changes: 32 additions & 0 deletions addons/rose/testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,37 @@

'use strict';

'use strict';
const MultiReporter = require('testem-multi-reporter');
const JUnitReporter = require('testem-gitlab-reporter');
const fs = require('fs');

// eslint-disable-next-line n/no-extraneous-require, n/no-missing-require
const TAPReporter = require('testem/lib/reporters/tap_reporter');

const multiReporterConfig = {
reporters: [
{
ReporterClass: TAPReporter,
args: [false, null, { get: () => false }],
},
],
};

if (process.env.CREATE_JUNIT_TEST_REPORT === 'true') {
!fs.existsSync('./test-reports') && fs.mkdirSync('./test-reports');
multiReporterConfig.reporters.push({
ReporterClass: JUnitReporter,
args: [
false,
fs.createWriteStream('test-reports/junit.xml'),
{ get: () => false },
],
});
}

let reporter = new MultiReporter(multiReporterConfig);

module.exports = {
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
Expand Down Expand Up @@ -34,4 +65,5 @@ module.exports = {
Firefox: ['-headless', '--window-size=1440,900'],
},
parallel: process.env.EMBER_EXAM_SPLIT_COUNT || 1,
reporter,
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module('Integration | Component | rose/form', function (hooks) {

test('it renders and handles submit/cancel actions', async function (assert) {
assert.expect(3);
assert.true(false);
this.submit = () => assert.ok(true, 'submitted');
this.cancel = () => assert.ok(true, 'cancelled');
await render(hbs`
Expand Down
2 changes: 2 additions & 0 deletions e2e-tests/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
admin/artifacts
desktop/artifacts
playwright-report
admin/test-reports
desktop/test-reports

.auth
6 changes: 6 additions & 0 deletions e2e-tests/admin/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ export default defineConfig({
outputDir: './artifacts/test-failures',
timeout: 90000, // Each test is given 90s to complete
workers: 1, // Tests need to be run in serial, otherwise there may be conflicts when using the CLI
reporter: [
['list'],
process.env.CREATE_JUNIT_TEST_REPORT === 'true'
? ['junit', { outputFile: 'test-reports/junit.xml' }]
: null,
].filter(Boolean),
use: {
baseURL: baseUrl,
extraHTTPHeaders: {
Expand Down
6 changes: 6 additions & 0 deletions e2e-tests/desktop/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ export default defineConfig({
globalSetup: '../global-setup',
outputDir: './artifacts',
workers: 1, // Tests need to be run in serial, otherwise there may be conflicts when using the CLI
reporter: [
['list'],
process.env.CREATE_JUNIT_TEST_REPORT === 'true'
? ['junit', { outputFile: 'test-reports/junit.xml' }]
: null,
].filter(Boolean),
use: {
baseURL: process.env.BOUNDARY_ADDR,
extraHTTPHeaders: {
Expand Down
Loading