[AAE-10594] Run unit tests in headless mode (#8141)

* AAE-10594 - changed karma configs to run unit tests in headless mode

* AAE-10594 - removed commets

* [AAE-10594] fixed failing test
This commit is contained in:
Nikita Maliarchuk 2023-02-17 12:08:16 +01:00 committed by GitHub
parent 2062d4744c
commit 058cd9e01c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 10 additions and 8 deletions

View File

@ -50,7 +50,7 @@ module.exports = function (config) {
colors: true, colors: true,
logLevel: config.LOG_INFO, logLevel: config.LOG_INFO,
autoWatch: true, autoWatch: true,
browsers: ['Chrome'], browsers: ['ChromeHeadless'],
singleRun: false singleRun: false
}); });
}; };

View File

@ -82,7 +82,7 @@ module.exports = function (config) {
colors: true, colors: true,
logLevel: config.LOG_INFO, logLevel: config.LOG_INFO,
autoWatch: true, autoWatch: true,
browsers: ['Chrome'], browsers: ['ChromeHeadless'],
singleRun: true singleRun: true
}); });
}; };

View File

@ -101,7 +101,7 @@ module.exports = function (config) {
colors: true, colors: true,
logLevel: config.LOG_INFO, logLevel: config.LOG_INFO,
autoWatch: true, autoWatch: true,
browsers: ['Chrome'], browsers: ['ChromeHeadless'],
singleRun: true singleRun: true
}); });
process.env.TZ = 'UTC'; process.env.TZ = 'UTC';

View File

@ -69,7 +69,9 @@ describe('ClipboardService', () => {
}); });
it('should notify copy to clipboard with message', () => { it('should notify copy to clipboard with message', () => {
spyOn(navigator.clipboard, 'writeText');
spyOn(notificationService, 'openSnackMessage'); spyOn(notificationService, 'openSnackMessage');
inputElement.value = 'some text'; inputElement.value = 'some text';
clipboardService.copyToClipboard(inputElement, 'success'); clipboardService.copyToClipboard(inputElement, 'success');

View File

@ -25,7 +25,7 @@ module.exports = function (config) {
colors: true, colors: true,
logLevel: config.LOG_INFO, logLevel: config.LOG_INFO,
autoWatch: true, autoWatch: true,
browsers: [/*'Chrome',*/ 'ChromeHeadless'], browsers: ['ChromeHeadless'],
customLaunchers: { customLaunchers: {
ChromeHeadless: { ChromeHeadless: {
base: 'Chrome', base: 'Chrome',

View File

@ -83,7 +83,7 @@ module.exports = function (config) {
colors: true, colors: true,
logLevel: config.LOG_INFO, logLevel: config.LOG_INFO,
autoWatch: true, autoWatch: true,
browsers: ['Chrome'], browsers: ['ChromeHeadless'],
singleRun: true singleRun: true
}); });
}; };

View File

@ -81,7 +81,7 @@ module.exports = function (config) {
colors: true, colors: true,
logLevel: config.LOG_INFO, logLevel: config.LOG_INFO,
autoWatch: true, autoWatch: true,
browsers: ['Chrome'], browsers: ['ChromeHeadless'],
singleRun: true singleRun: true
}); });
process.env.TZ = 'UTC'; process.env.TZ = 'UTC';

View File

@ -77,7 +77,7 @@ module.exports = function (config) {
colors: true, colors: true,
logLevel: config.LOG_INFO, logLevel: config.LOG_INFO,
autoWatch: true, autoWatch: true,
browsers: ['Chrome'], browsers: ['ChromeHeadless'],
singleRun: true singleRun: true
}); });
process.env.TZ = 'UTC'; process.env.TZ = 'UTC';

View File

@ -24,7 +24,7 @@ module.exports = function (config) {
colors: true, colors: true,
logLevel: config.LOG_INFO, logLevel: config.LOG_INFO,
autoWatch: true, autoWatch: true,
browsers: ['Chrome'], browsers: ['ChromeHeadless'],
singleRun: true singleRun: true
}); });
}; };