Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
SETHULAKSHMI-PM committed Jul 9, 2024
1 parent 448a382 commit ba0484a
Showing 1 changed file with 26 additions and 23 deletions.
49 changes: 26 additions & 23 deletions protractor.saucelabs.config.js
Original file line number Diff line number Diff line change
@@ -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'],
Expand All @@ -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.
Expand Down

0 comments on commit ba0484a

Please sign in to comment.