From 4b4db99d73985bba4db20e7664b12fafe09ccaf1 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Sun, 1 May 2016 03:35:31 -0400 Subject: [PATCH] fix(e2e:main): fix yeoman.png regex allow for revved image name, fixes e2e tests on a prod environment --- templates/app/e2e/main/main.spec(jasmine).js | 2 +- templates/app/e2e/main/main.spec(mocha).js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/app/e2e/main/main.spec(jasmine).js b/templates/app/e2e/main/main.spec(jasmine).js index 57284495a..3d56cb5d3 100644 --- a/templates/app/e2e/main/main.spec(jasmine).js +++ b/templates/app/e2e/main/main.spec(jasmine).js @@ -12,7 +12,7 @@ describe('Main View', function() { it('should include jumbotron with correct data', function() { expect(page.h1El.getText()).toBe('\'Allo, \'Allo!'); - expect(page.imgEl.getAttribute('src')).toMatch(/yeoman.png$/); + expect(page.imgEl.getAttribute('src')).toMatch(/yeoman(\.[a-zA-Z0-9]*)?\.png$/); expect(page.imgEl.getAttribute('alt')).toBe('I\'m Yeoman'); }); }); diff --git a/templates/app/e2e/main/main.spec(mocha).js b/templates/app/e2e/main/main.spec(mocha).js index 798b58c41..12b0781db 100644 --- a/templates/app/e2e/main/main.spec(mocha).js +++ b/templates/app/e2e/main/main.spec(mocha).js @@ -13,7 +13,7 @@ describe('Main View', function() { it('should include jumbotron with correct data', function() { <%= expect() %>page.h1El.getText()<%= to() %>.eventually.equal('\'Allo, \'Allo!'); - <%= expect() %>page.imgEl.getAttribute('src')<%= to() %>.eventually.match(/yeoman.png$/); + <%= expect() %>page.imgEl.getAttribute('src')<%= to() %>.eventually.match(/yeoman(\.[a-zA-Z0-9]*)?\.png$/); <%= expect() %>page.imgEl.getAttribute('alt')<%= to() %>.eventually.equal('I\'m Yeoman'); }); });