Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: align Angular setup and improve tests #313

Merged
merged 7 commits into from
Nov 25, 2024
Merged
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ reports

# dependencies
node_modules
src

# profiling files
chrome-profiler-events*.json
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# onecx-theme-ui

OneCX Theme Mgmt UI
OneCX Theme
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumWarning": "1mb",
"maximumError": "3mb"
},
{
Expand Down
48 changes: 17 additions & 31 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
// https://karma-runner.github.io/6.4/config/configuration-file.html

module.exports = function (config) {
config.set({
Expand All @@ -14,26 +14,26 @@ module.exports = function (config) {
require('karma-sonarqube-unit-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
port: 9876,
colors: true,
autoWatch: true,
singleRun: false,
restartOnFileChange: true,
browserConsoleLogOptions: { level: 'debug', format: '%b %T: %m', terminal: true },
// export CHROME_BIN=<path to binary>
browsers: ['Chrome'],
customLaunchers: {
Chrome: { base: 'ChromeHeadless', flags: ['--no-sandbox', '--disable-web-security'] }
},
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
random: false
},
// https://jasmine.github.io/api/edge/Configuration.html
jasmine: { random: false },
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
reporters: ['progress', 'coverage', 'sonarqubeUnit'],
preprocessors: { 'src/**/*.js': ['coverage'] },
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
sonarqubeReporter: {
basePath: 'src/app', // test files folder
filePattern: '**/*.spec.ts', // test files glob pattern
encoding: 'utf-8', // test files encoding
outputFolder: 'sonar', // report destination
legacyMode: false, // report for Sonarqube < 6.2 (disabled)
reportName: 'sonarqube_report.xml'
suppressAll: true // remove duplicated traces
},
sonarQubeUnitReporter: {
sonarQubeVersion: 'LATEST',
Expand All @@ -47,20 +47,6 @@ module.exports = function (config) {
dir: 'reports',
subdir: 'coverage', // common name instaed browser-specific
reporters: [{ type: 'text-summary' }, { type: 'lcov' }]
},
reporters: ['progress', 'kjhtml', 'coverage', 'sonarqubeUnit'],
preprocessors: { 'src/**/*.js': ['coverage'] },
port: 9876,
colors: true,
autoWatch: true,
singleRun: false,
restartOnFileChange: true,
browsers: ['HeadlessChrome'],
customLaunchers: {
HeadlessChrome: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
}
})
}
Loading
Loading