From ea2f9802989d0df2666bb25ba3562bee19976581 Mon Sep 17 00:00:00 2001 From: "BLACKBAUD\\Trevor.Burch" Date: Wed, 20 Mar 2019 10:41:06 -0400 Subject: [PATCH] Updated e2e tests to use the `screenshotName` attribute --- e2e/flyout.e2e-spec.ts | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/e2e/flyout.e2e-spec.ts b/e2e/flyout.e2e-spec.ts index fc1ade1..aa6008f 100644 --- a/e2e/flyout.e2e-spec.ts +++ b/e2e/flyout.e2e-spec.ts @@ -14,7 +14,9 @@ describe('Flyout', () => { SkyHostBrowser.get('visual/flyout'); SkyHostBrowser.setWindowBreakpoint('lg'); element(by.css('.sky-btn-primary')).click(); - expect('body').toMatchBaselineScreenshot(done); + expect('body').toMatchBaselineScreenshot(done, { + screenshotName: 'flyout-lg' + }); element(by.css('.sky-flyout .sky-flyout-btn-close')).click(); }); @@ -22,7 +24,9 @@ describe('Flyout', () => { SkyHostBrowser.get('visual/flyout'); SkyHostBrowser.setWindowBreakpoint('xs'); element(by.css('.sky-btn-primary')).click(); - expect('body').toMatchBaselineScreenshot(done); + expect('body').toMatchBaselineScreenshot(done, { + screenshotName: 'flyout-xs' + }); element(by.css('.sky-flyout .sky-flyout-btn-close')).click(); }); @@ -33,7 +37,9 @@ describe('Flyout', () => { browser.sleep(250); element(by.css('.sky-flyout .sky-dropdown-button')).click(); SkyHostBrowser.moveCursorOffScreen(); - expect('body').toMatchBaselineScreenshot(done); + expect('body').toMatchBaselineScreenshot(done, { + screenshotName: 'flyout-absolute-lg' + }); element(by.css('.sky-flyout .sky-flyout-btn-close')).click(); }); @@ -44,7 +50,9 @@ describe('Flyout', () => { browser.sleep(250); element(by.css('.sky-flyout .sky-dropdown-button')).click(); SkyHostBrowser.moveCursorOffScreen(); - expect('body').toMatchBaselineScreenshot(done); + expect('body').toMatchBaselineScreenshot(done, { + screenshotName: 'flyout-absolute-xs' + }); element(by.css('.sky-flyout .sky-flyout-btn-close')).click(); }); @@ -52,7 +60,9 @@ describe('Flyout', () => { SkyHostBrowser.get('visual/flyout'); SkyHostBrowser.setWindowBreakpoint('lg'); element(by.css('#open-flyout-with-iterators')).click(); - expect('body').toMatchBaselineScreenshot(done); + expect('body').toMatchBaselineScreenshot(done, { + screenshotName: 'flyout-iterators-lg' + }); element(by.css('.sky-flyout .sky-flyout-btn-close')).click(); }); @@ -60,7 +70,9 @@ describe('Flyout', () => { SkyHostBrowser.get('visual/flyout'); SkyHostBrowser.setWindowBreakpoint('xs'); element(by.css('#open-flyout-with-iterators')).click(); - expect('body').toMatchBaselineScreenshot(done); + expect('body').toMatchBaselineScreenshot(done, { + screenshotName: 'flyout-iterators-xs' + }); element(by.css('.sky-flyout .sky-flyout-btn-close')).click(); }); @@ -68,7 +80,9 @@ describe('Flyout', () => { SkyHostBrowser.get('visual/flyout'); SkyHostBrowser.setWindowBreakpoint('lg'); element(by.css('#open-flyout-with-iterators-disabled')).click(); - expect('body').toMatchBaselineScreenshot(done); + expect('body').toMatchBaselineScreenshot(done, { + screenshotName: 'flyout-no-iterators-lg' + }); element(by.css('.sky-flyout .sky-flyout-btn-close')).click(); }); @@ -76,7 +90,9 @@ describe('Flyout', () => { SkyHostBrowser.get('visual/flyout'); SkyHostBrowser.setWindowBreakpoint('xs'); element(by.css('#open-flyout-with-iterators-disabled')).click(); - expect('body').toMatchBaselineScreenshot(done); + expect('body').toMatchBaselineScreenshot(done, { + screenshotName: 'flyout-no-iterators-xs' + }); element(by.css('.sky-flyout .sky-flyout-btn-close')).click(); }); });