diff --git a/.angular-cli.json b/.angular-cli.json index 123ea851d..6c3e56a34 100644 --- a/.angular-cli.json +++ b/.angular-cli.json @@ -29,10 +29,6 @@ } }, "lint": [ - { - "project": "src/tsconfig.app.json", - "exclude": "**/node_modules/**" - }, { "project": "src/tsconfig.spec.json", "exclude": "**/node_modules/**" diff --git a/e2e/screenshots.ts b/e2e/screenshots.ts index 5d6126f1e..ef44ec76c 100644 --- a/e2e/screenshots.ts +++ b/e2e/screenshots.ts @@ -7,21 +7,10 @@ export async function takeScreenshot(name: string) { mkdirSync(dir); } const config = await browser.getProcessedConfig(); - const instance = config['capabilities']['chromeOptions']; - const deviceName = instance['mobileEmulation'] - ? instance['mobileEmulation']['deviceName'].replace(/\s+/g, '') - : await nameFromWindowSize(); + const deviceName = config['capabilities']['name']; const pngData = await browser.takeScreenshot(); const path = `${dir}/${deviceName}_${name}`; writeFile(path, pngData, { encoding: 'base64' }, () => { console.log(`File written: ${path}`); }); } - -async function nameFromWindowSize() { - const size = await browser.driver - .manage() - .window() - .getSize(); - return `${size.width}x${size.height}`; -} diff --git a/karma.conf.js b/karma.conf.js index 917f809ad..aec55b743 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -38,8 +38,8 @@ module.exports = function(config) { colors: true, logLevel: config.LOG_INFO, autoWatch: true, - browsers: ['ChromeNoSandbox'], - // browsers: ['ChromeNoSandboxHeadless'], + // browsers: ['ChromeNoSandbox'], + browsers: ['ChromeNoSandboxHeadless'], singleRun: false, junitReporter: { outputDir: process.env.JUNIT_REPORT_PATH, @@ -48,12 +48,10 @@ module.exports = function(config) { }, customLaunchers: { ChromeNoSandbox: { - base: 'Chrome', - flags: ['--no-sandbox'] + base: 'Chrome' }, ChromeNoSandboxHeadless: { - base: 'ChromeHeadless', - flags: ['--no-sandbox'] + base: 'ChromeHeadless' } } }); diff --git a/protractor.conf.js b/protractor.conf.js index c5a9004ce..ee84694f4 100644 --- a/protractor.conf.js +++ b/protractor.conf.js @@ -4,6 +4,7 @@ exports.config = { // Available deviceNames for mobileEmulation: https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Source/devtools/front_end/emulated_devices/module.json multiCapabilities: [ { + name: '1024x720', browserName: 'chrome', chromeOptions: { args: [ @@ -15,6 +16,7 @@ exports.config = { } }, { + name: '800x600', browserName: 'chrome', chromeOptions: { args: [ @@ -26,6 +28,7 @@ exports.config = { } }, { + name: '1920x1080', browserName: 'chrome', chromeOptions: { args: [ @@ -37,6 +40,7 @@ exports.config = { } }, { + name: 'iPhoneX', browserName: 'chrome', chromeOptions: { mobileEmulation: { @@ -46,6 +50,7 @@ exports.config = { } }, { + name: 'iPhone8', browserName: 'chrome', chromeOptions: { mobileEmulation: { @@ -55,6 +60,7 @@ exports.config = { } }, { + name: 'iPad', browserName: 'chrome', chromeOptions: { mobileEmulation: { @@ -64,6 +70,7 @@ exports.config = { } }, { + name: 'iPadPro', browserName: 'chrome', chromeOptions: { mobileEmulation: { @@ -73,6 +80,7 @@ exports.config = { } }, { + name: 'Nexus6P', browserName: 'chrome', chromeOptions: { mobileEmulation: { @@ -82,6 +90,7 @@ exports.config = { } }, { + name: 'Nexus5X', browserName: 'chrome', chromeOptions: { mobileEmulation: {