From ba0484ad3cf28733f205806d938860db0d2d41fb Mon Sep 17 00:00:00 2001 From: SETHULAKSHMI-PM Date: Tue, 9 Jul 2024 14:12:09 +0530 Subject: [PATCH] rename --- protractor.saucelabs.config.js | 49 ++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/protractor.saucelabs.config.js b/protractor.saucelabs.config.js index 77871f43..9d8f7791 100644 --- a/protractor.saucelabs.config.js +++ b/protractor.saucelabs.config.js @@ -1,11 +1,14 @@ /* eslint-env node */ -const webvitalMetrics = ['LCP', 'FID', 'CLS', 'INP', 'TTFB', 'FCP']; -const webvitalMetricsWithoutINP = webvitalMetrics.filter(metric => metric !== 'INP'); -const webvitalMetricsWithoutINPandFCP = webvitalMetrics.filter(metric => metric !== 'INP' && metric !== 'FCP'); -const webvitalMetricsWithoutFCP = webvitalMetrics.filter(metric => metric !== 'FCP'); -const testFCPmetrics = ['FCP']; -const testTTFBmetrics = ['TTFB']; -const fireFox_supporting_wv_metrices = ['LCP', 'FID', 'TTFB', 'FCP']; + +const webvitalMetrics = { + all: ['LCP', 'FID', 'CLS', 'INP', 'TTFB', 'FCP'], + noINP: ['LCP', 'FID', 'CLS', 'TTFB', 'FCP'], + noFCP: ['LCP', 'FID', 'CLS', 'INP', 'TTFB'], + noINP_FCP: ['LCP', 'FID', 'CLS', 'TTFB'], + onlyFCP: ['FCP'], + onlyTTFB: ['TTFB'], + firefox: ['LCP', 'FID', 'TTFB', 'FCP'] +}; exports.config = { // specs: ['test/e2e/**/*.spec.js'], @@ -19,28 +22,28 @@ exports.config = { // (e.g. Chrome, Edge, Opera, Samsung Internet). - https://github.com/GoogleChrome/web-vitals - multiCapabilities: [ newSaucelabsCapability('internet explorer', '11.103', ['Windows 10'], { includedMetrics: [] }), - newSaucelabsCapability('MicrosoftEdge', '14.14393', ['Windows 10'], { includedMetrics: testTTFBmetrics }), + newSaucelabsCapability('MicrosoftEdge', '14.14393', ['Windows 10'], { includedMetrics: webvitalMetrics.onlyTTFB }), newSaucelabsCapability('safari', '9.0', ['OS X 10.11'], { includedMetrics: [] }), newSaucelabsCapability('safari', '10.1', ['macOS 10.12'], { includedMetrics: [] }), - newSaucelabsCapability('safari', '11.0', ['macOS 10.12'], { includedMetrics: testTTFBmetrics }), - newSaucelabsCapability('safari', '11.1', ['macOS 10.13'], { includedMetrics: testTTFBmetrics }), - newSaucelabsCapability('firefox', '78.0', ['Windows 7'], { includedMetrics: testTTFBmetrics }), - newSaucelabsCapability('firefox', '58.0', ['Windows 11'], { includedMetrics: testTTFBmetrics }), - newSaucelabsCapability('chrome', '67.0', ['Windows 10'], { includedMetrics: testTTFBmetrics }), - newSaucelabsCapability('chrome', '54.0', ['OS X 10.11'], { includedMetrics: testTTFBmetrics }), - newSaucelabsCapability('chrome', '65.0', ['OS X 10.11'], { includedMetrics: testTTFBmetrics }), + newSaucelabsCapability('safari', '11.0', ['macOS 10.12'], { includedMetrics: webvitalMetrics.onlyTTFB }), + newSaucelabsCapability('safari', '11.1', ['macOS 10.13'], { includedMetrics: webvitalMetrics.onlyTTFB }), + newSaucelabsCapability('firefox', '78.0', ['Windows 7'], { includedMetrics: webvitalMetrics.onlyTTFB }), + newSaucelabsCapability('firefox', '58.0', ['Windows 11'], { includedMetrics: webvitalMetrics.onlyTTFB }), + newSaucelabsCapability('chrome', '67.0', ['Windows 10'], { includedMetrics: webvitalMetrics.onlyTTFB }), + newSaucelabsCapability('chrome', '54.0', ['OS X 10.11'], { includedMetrics: webvitalMetrics.onlyTTFB }), + newSaucelabsCapability('chrome', '65.0', ['OS X 10.11'], { includedMetrics: webvitalMetrics.onlyTTFB }), - newSaucelabsCapability('chrome', '85', ['OS X 10.10', 'macOS 10.12', 'Windows 8'], { includedMetrics: webvitalMetricsWithoutINPandFCP }), // FCP should include, but it is inconsitent 509 - newSaucelabsCapability('chrome', '96', ['OS X 10.11', 'macOS 12', 'Windows 11'], { includedMetrics: webvitalMetricsWithoutFCP }), // FCP should include, but it is inconsitent 509 + newSaucelabsCapability('chrome', '85', ['OS X 10.10', 'macOS 10.12', 'Windows 8'], { includedMetrics: webvitalMetrics.noINP_FCP }), + newSaucelabsCapability('chrome', '96', ['OS X 10.11', 'macOS 12', 'Windows 11'], { includedMetrics: webvitalMetrics.noFCP }), - newSaucelabsCapability('firefox', '90', ['macOS 10.12', 'Windows 7'], { includedMetrics: ['FID', 'TTFB', 'FCP'] }), // 510 pass - newSaucelabsCapability('firefox', '122', ['macOS 10.15', 'Windows 10'], { includedMetrics: fireFox_supporting_wv_metrices }), // bit inconsistent, 510 failed, 511 passed + newSaucelabsCapability('firefox', '90', ['macOS 10.12', 'Windows 7'], { includedMetrics: ['FID', 'TTFB', 'FCP'] }), + newSaucelabsCapability('firefox', '122', ['macOS 10.15', 'Windows 10'], { includedMetrics: webvitalMetrics.firefox }), - newSaucelabsCapability('MicrosoftEdge', '13', ['Windows 10'], { includedMetrics: testTTFBmetrics }), - newSaucelabsCapability('MicrosoftEdge', '80', ['OS X 10.10', 'macOS 10.12', 'Windows 10'], { includedMetrics: webvitalMetricsWithoutINP }), //pass 513 - newSaucelabsCapability('MicrosoftEdge', '97', ['macOS 10.12', 'Windows 10'], { includedMetrics: webvitalMetrics }), //pass 513 + newSaucelabsCapability('MicrosoftEdge', '13', ['Windows 10'], { includedMetrics: webvitalMetrics.onlyTTFB }), + newSaucelabsCapability('MicrosoftEdge', '80', ['OS X 10.10', 'macOS 10.12', 'Windows 10'], { includedMetrics: webvitalMetrics.noINP }), + newSaucelabsCapability('MicrosoftEdge', '97', ['macOS 10.12', 'Windows 10'], { includedMetrics: webvitalMetrics.all }), - newSaucelabsCapability('safari', '15', ['macOS 12'], { includedMetrics: testFCPmetrics }), + newSaucelabsCapability('safari', '15', ['macOS 12'], { includedMetrics: webvitalMetrics.onlyFCP }), ].flat(), // Do not allow parallel test execution. Makes the test execution a lot // slower, but the setup simpler.