From 5073aa520c11e8d498697fbcfc20a4a7571c52fc Mon Sep 17 00:00:00 2001 From: LeeDr Date: Tue, 26 Jan 2016 12:30:09 -0600 Subject: [PATCH] Share expectedToastMessage variable between tests, and comment about Firefox version changes message. --- test/functional/apps/discover/_shared_links.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/functional/apps/discover/_shared_links.js b/test/functional/apps/discover/_shared_links.js index 7b032e1d4dad..4d04b2b67fb8 100644 --- a/test/functional/apps/discover/_shared_links.js +++ b/test/functional/apps/discover/_shared_links.js @@ -12,6 +12,8 @@ define(function (require) { var settingsPage; var discoverPage; var baseUrl; + // var expectedToastMessage = 'Share search: URL selected. Press Ctrl+C to copy.'; pre-Firefox 41 + var expectedToastMessage = 'Share search: URL copied to clipboard.'; bdd.before(function () { common = new Common(this.remote); @@ -89,13 +91,12 @@ define(function (require) { }); bdd.it('should show toast message for copy to clipboard', function () { - var expectedMsg = 'Share search: URL copied to clipboard.'; return discoverPage.clickCopyToClipboard() .then(function () { return headerPage.getToastMessage(); }) .then(function (toastMessage) { - expect(toastMessage).to.be(expectedMsg); + expect(toastMessage).to.be(expectedToastMessage); }) .then(function () { return headerPage.waitForToastMessageGone(); @@ -122,13 +123,12 @@ define(function (require) { // NOTE: This test has to run immediately after the test above // 'shorten URL button should produce a short URL' bdd.it('should show toast message for copy to clipboard', function () { - var expectedMsg = 'Share search: URL copied to clipboard.'; return discoverPage.clickCopyToClipboard() .then(function () { return headerPage.getToastMessage(); }) .then(function (toastMessage) { - expect(toastMessage).to.be(expectedMsg); + expect(toastMessage).to.be(expectedToastMessage); }) .then(function () { return headerPage.waitForToastMessageGone();