`, and ``.
@font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace;
diff --git a/src/ui/public/visualize/spy.js b/src/ui/public/visualize/spy.js
index d58299769b92..2629dce9b290 100644
--- a/src/ui/public/visualize/spy.js
+++ b/src/ui/public/visualize/spy.js
@@ -16,6 +16,7 @@ define(function (require) {
var $container = $el.find('.visualize-spy-container');
var fullPageSpy = _.get($scope.spy, 'mode.fill', false);
$scope.modes = spyModes;
+ $scope.spy.params = $scope.spy.params || {};
function getSpyObject(name) {
name = _.isUndefined(name) ? $scope.spy.mode.name : name;
diff --git a/test/functional/apps/discover/_shared_links.js b/test/functional/apps/discover/_shared_links.js
index 46f54e7733c7..e446109c5c56 100644
--- a/test/functional/apps/discover/_shared_links.js
+++ b/test/functional/apps/discover/_shared_links.js
@@ -12,8 +12,11 @@ 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.';
+ // The message changes for Firefox < 41 and Firefox >= 41
+ // var expectedToastMessage = 'Share search: URL selected. Press Ctrl+C to copy.';
+ // var expectedToastMessage = 'Share search: URL copied to clipboard.';
+ // Pass either one.
+ var expectedToastMessage = /Share search: URL (selected. Press Ctrl+C to copy.|copied to clipboard.)/;
bdd.before(function () {
common = new Common(this.remote);
@@ -68,7 +71,6 @@ define(function (require) {
bdd.it('should show the correct formatted URL', function () {
- // this is a BAD URL which includes the nav bar
var expectedUrl = baseUrl
+ '/app/kibana?_t=1453775307251#'
+ '/discover?_g=(refreshInterval:(display:Off,pause:!f,value:0),time'
@@ -92,7 +94,7 @@ define(function (require) {
return headerPage.getToastMessage();
})
.then(function (toastMessage) {
- expect(toastMessage).to.be(expectedToastMessage);
+ expect(toastMessage).to.match(expectedToastMessage);
})
.then(function () {
return headerPage.waitForToastMessageGone();
@@ -117,14 +119,13 @@ 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 () {
return discoverPage.clickCopyToClipboard()
.then(function () {
return headerPage.getToastMessage();
})
.then(function (toastMessage) {
- expect(toastMessage).to.be(expectedToastMessage);
+ expect(toastMessage).to.match(expectedToastMessage);
})
.then(function () {
return headerPage.waitForToastMessageGone();
diff --git a/test/utils/getUrl.js b/test/utils/getUrl.js
index 3a1b172d7fbc..8dd676d98b62 100644
--- a/test/utils/getUrl.js
+++ b/test/utils/getUrl.js
@@ -34,8 +34,5 @@ getUrl.noAuth = function getUrlNoAuth(config, app) {
};
getUrl.baseUrl = function getBaseUrl(config) {
- config = _.pick(config, function (val, param) {
- return param !== 'auth' & param !== 'pathname' & param !== 'hash';
- });
- return url.format(config);
+ return url.format(_.pick(config, 'protocol', 'hostname', 'port'));
};