From a101ddfd04c7ff6b0b7f4c8235acc82d0d8c7df7 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Mon, 15 May 2017 06:08:53 -0700 Subject: [PATCH 1/4] Attempting to fix breaking build Apparently the Getting Started page is preventing access to Console (Dev Tools, really) so the functional tests for Console are failing. This commit opts the user out of the Getting Started page before attempting to navigate to Console. --- test/functional/apps/console/_console.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/functional/apps/console/_console.js b/test/functional/apps/console/_console.js index 64d7190f57709..017fa83e4ad2e 100644 --- a/test/functional/apps/console/_console.js +++ b/test/functional/apps/console/_console.js @@ -15,11 +15,12 @@ export default function ({ getService, getPageObjects }) { const retry = getService('retry'); const log = getService('log'); const screenshots = getService('screenshots'); - const PageObjects = getPageObjects(['common', 'console']); + const PageObjects = getPageObjects(['common', 'console', 'gettingStarted']); describe('console app', function describeIndexTests() { - before(function () { + before(async function () { log.debug('navigateTo console'); + await PageObjects.gettingStarted.clickOptOutLink(); return PageObjects.common.navigateToApp('console'); }); From acf01b681cbe6a99d9f348c4619f3feb1bed016d Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Fri, 12 May 2017 11:35:01 -0700 Subject: [PATCH 2/4] Getting Started page (#11673) * Initial code * Renaming files/folders * Notes and changes from HTML/CSS review * CSS changes * Fixing transform units * Fleshing out logo circle * Adding logos * Un-nesting styles * Adding kuiText class on

elements * Making shield icon 404 go away * Using trustAsHtml filter; using registry * Adding code for registry * Adding images * Hooking up the opt-out link * Fixing linter issues * Fix issue with refresh bringing back nav * Removing load_default module * Use GETTING_STARTED_ROUTE constant * Allow topMessage to be a directive * Adding kuiLink CSS class to anchor elements * Adding alt text to images * Replace getters with regular methods * Remove leftover comment * Removing unnecessary comment * Fixing typo in comment * Adding comments for message properties * Fixing typo in method name * Defining custom CSS class * Fixing method call * Creating custom CSS classes * Adding documentation links * Use a instead of button for demo link * Allow directives in manage and monitor messages * Refactoring shared code into single ui/public/getting_started folder * Adding README * Fixing whitespace in/around links * Trim messages before setting them * Decorate in-app links with opt-out attribute * Opt out of the Getting Started page if the user already has index patterns * Adding more commentary around expectations of setTopMessage use * Using ng-src and ng-href attributes where attr values are angular expressions * Importing the directive before using it * Using ui/registry for message registries * Renaming service => helpers to clarify intent * Adding explanatory comment * Adding "or" * Fixing div id * Breaks out the inject logic into another directive * Adding Getting Started page object for functional tests * Consolidate into one registry * Fixes incorrect classes * Changes how styles are applied to injected-items items * Modifying class name per CSS style guide * Adding getting started doc link * Removing unused import --- .../public/components/blahblah/blahblah.html | 3 +++ .../public/components/blahblah/blahblah.js | 19 ++++++++++++++ .../public/components/blahblah/index.js | 1 + src/core_plugins/testbed/public/index.js | 26 ++++++++++++++++++- 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 src/core_plugins/testbed/public/components/blahblah/blahblah.html create mode 100644 src/core_plugins/testbed/public/components/blahblah/blahblah.js create mode 100644 src/core_plugins/testbed/public/components/blahblah/index.js diff --git a/src/core_plugins/testbed/public/components/blahblah/blahblah.html b/src/core_plugins/testbed/public/components/blahblah/blahblah.html new file mode 100644 index 0000000000000..6991d208d24c3 --- /dev/null +++ b/src/core_plugins/testbed/public/components/blahblah/blahblah.html @@ -0,0 +1,3 @@ +

+ You have an important decision to make. To do so, . +
diff --git a/src/core_plugins/testbed/public/components/blahblah/blahblah.js b/src/core_plugins/testbed/public/components/blahblah/blahblah.js new file mode 100644 index 0000000000000..5a7db76c444ed --- /dev/null +++ b/src/core_plugins/testbed/public/components/blahblah/blahblah.js @@ -0,0 +1,19 @@ +import { uiModules } from 'ui/modules'; +import template from './blahblah.html'; + +const app = uiModules.get('kibana'); + +app.directive('blahblah', function () { + return { + restrict: 'E', + replace: true, + template: template, + scope: {}, + controller: ($scope) => { + $scope.testClick = () => { + alert(`I'm doing something important!`); + console.log($scope); + }; + } + }; +}); diff --git a/src/core_plugins/testbed/public/components/blahblah/index.js b/src/core_plugins/testbed/public/components/blahblah/index.js new file mode 100644 index 0000000000000..b560cb1a0cbe4 --- /dev/null +++ b/src/core_plugins/testbed/public/components/blahblah/index.js @@ -0,0 +1 @@ +import './blahblah'; diff --git a/src/core_plugins/testbed/public/index.js b/src/core_plugins/testbed/public/index.js index 1732c655ad73c..67a8d0dc21d2b 100644 --- a/src/core_plugins/testbed/public/index.js +++ b/src/core_plugins/testbed/public/index.js @@ -1 +1,25 @@ -import './testbed'; \ No newline at end of file +import './testbed'; + + +import './components/blahblah'; +import { GettingStartedRegistryProvider } from 'ui/getting_started/registry'; +import { GETTING_STARTED_REGISTRY_TYPES } from 'ui/getting_started/constants'; + +GettingStartedRegistryProvider.register(() => ({ + type: GETTING_STARTED_REGISTRY_TYPES.TOP_MESSAGE, + template: `` +})); +GettingStartedRegistryProvider.register(() => ({ + type: GETTING_STARTED_REGISTRY_TYPES.TOP_MESSAGE, + template: `Nam hendrerit augue id egestas ultricies.` +})); + +GettingStartedRegistryProvider.register(() => ({ + type: GETTING_STARTED_REGISTRY_TYPES.MANAGE_AND_MONITOR_MESSAGE, + template: `Lorem ipsum dolor sit amet, consectetur consectetur adipiscing elit.` +})); + +GettingStartedRegistryProvider.register(() => ({ + type: GETTING_STARTED_REGISTRY_TYPES.MANAGE_AND_MONITOR_MESSAGE, + template: `Nam luctus mattis urna, ac fringilla tellus efficitur at.` +})); From 0ba233bee882589f2fb220a242a805b8be6d7f48 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Mon, 15 May 2017 11:38:55 -0700 Subject: [PATCH 3/4] Navigate to getting started page so we can opt out of it --- test/functional/apps/console/_console.js | 1 + test/functional/page_objects/common_page.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/test/functional/apps/console/_console.js b/test/functional/apps/console/_console.js index 017fa83e4ad2e..8b8c915de67b0 100644 --- a/test/functional/apps/console/_console.js +++ b/test/functional/apps/console/_console.js @@ -20,6 +20,7 @@ export default function ({ getService, getPageObjects }) { describe('console app', function describeIndexTests() { before(async function () { log.debug('navigateTo console'); + await PageObjects.common.navigateToUrl('settings', 'kibana/getting_started'); await PageObjects.gettingStarted.clickOptOutLink(); return PageObjects.common.navigateToApp('console'); }); diff --git a/test/functional/page_objects/common_page.js b/test/functional/page_objects/common_page.js index 54632e272ae77..ae2f921c4eb97 100644 --- a/test/functional/page_objects/common_page.js +++ b/test/functional/page_objects/common_page.js @@ -23,6 +23,10 @@ export function CommonPageProvider({ getService, getPageObjects }) { return getUrl.baseUrl(config.get('servers.elasticsearch')); } + /** + * @param {string} appName As defined in the apps objects in test/server_config.js + * @param {string} subUrl The route after the hash (#) + */ navigateToUrl(appName, subUrl) { const appConfig = Object.assign({}, config.get(['apps', appName]), { // Overwrite the default hash with the URL we really want. From 022a0f1683e91e58447847ebb8fe523b4953991e Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Fri, 12 May 2017 11:56:53 -0700 Subject: [PATCH 4/4] Cleanup on aisle testbed! (#11765) --- .../public/components/blahblah/blahblah.html | 3 --- .../public/components/blahblah/blahblah.js | 19 -------------- .../public/components/blahblah/index.js | 1 - src/core_plugins/testbed/public/index.js | 26 +------------------ 4 files changed, 1 insertion(+), 48 deletions(-) delete mode 100644 src/core_plugins/testbed/public/components/blahblah/blahblah.html delete mode 100644 src/core_plugins/testbed/public/components/blahblah/blahblah.js delete mode 100644 src/core_plugins/testbed/public/components/blahblah/index.js diff --git a/src/core_plugins/testbed/public/components/blahblah/blahblah.html b/src/core_plugins/testbed/public/components/blahblah/blahblah.html deleted file mode 100644 index 6991d208d24c3..0000000000000 --- a/src/core_plugins/testbed/public/components/blahblah/blahblah.html +++ /dev/null @@ -1,3 +0,0 @@ -
- You have an important decision to make. To do so, . -
diff --git a/src/core_plugins/testbed/public/components/blahblah/blahblah.js b/src/core_plugins/testbed/public/components/blahblah/blahblah.js deleted file mode 100644 index 5a7db76c444ed..0000000000000 --- a/src/core_plugins/testbed/public/components/blahblah/blahblah.js +++ /dev/null @@ -1,19 +0,0 @@ -import { uiModules } from 'ui/modules'; -import template from './blahblah.html'; - -const app = uiModules.get('kibana'); - -app.directive('blahblah', function () { - return { - restrict: 'E', - replace: true, - template: template, - scope: {}, - controller: ($scope) => { - $scope.testClick = () => { - alert(`I'm doing something important!`); - console.log($scope); - }; - } - }; -}); diff --git a/src/core_plugins/testbed/public/components/blahblah/index.js b/src/core_plugins/testbed/public/components/blahblah/index.js deleted file mode 100644 index b560cb1a0cbe4..0000000000000 --- a/src/core_plugins/testbed/public/components/blahblah/index.js +++ /dev/null @@ -1 +0,0 @@ -import './blahblah'; diff --git a/src/core_plugins/testbed/public/index.js b/src/core_plugins/testbed/public/index.js index 67a8d0dc21d2b..1732c655ad73c 100644 --- a/src/core_plugins/testbed/public/index.js +++ b/src/core_plugins/testbed/public/index.js @@ -1,25 +1 @@ -import './testbed'; - - -import './components/blahblah'; -import { GettingStartedRegistryProvider } from 'ui/getting_started/registry'; -import { GETTING_STARTED_REGISTRY_TYPES } from 'ui/getting_started/constants'; - -GettingStartedRegistryProvider.register(() => ({ - type: GETTING_STARTED_REGISTRY_TYPES.TOP_MESSAGE, - template: `` -})); -GettingStartedRegistryProvider.register(() => ({ - type: GETTING_STARTED_REGISTRY_TYPES.TOP_MESSAGE, - template: `Nam hendrerit augue id egestas ultricies.` -})); - -GettingStartedRegistryProvider.register(() => ({ - type: GETTING_STARTED_REGISTRY_TYPES.MANAGE_AND_MONITOR_MESSAGE, - template: `Lorem ipsum dolor sit amet, consectetur consectetur adipiscing elit.` -})); - -GettingStartedRegistryProvider.register(() => ({ - type: GETTING_STARTED_REGISTRY_TYPES.MANAGE_AND_MONITOR_MESSAGE, - template: `Nam luctus mattis urna, ac fringilla tellus efficitur at.` -})); +import './testbed'; \ No newline at end of file