Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Enterprise Search Kibana plugin #66922

Merged
merged 49 commits into from
Jul 9, 2020

Conversation

cee-chen
Copy link
Member

@cee-chen cee-chen commented May 18, 2020

Summary

This PR adds a new Enterprise Search plugin to Kibana x-pack. It's very MVP right now and eventually will be fleshed out to match the UI/UX of App Search currently (e.g. creating/deleting engines, analytics, etc.). Additionally, Workplace Search will also eventually be added.

Since there's some extra/additional lift required to run this plugin (requires App Search running locally/on same Elasticsearch cluster), here's a few additional screenshots/screencaps to help visualize the current plugin MVP.

Animated screencap

screencap

Static screenshots

engines overview

setup guide

Various empty/error states

Error state

Empty state

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@joshdover
Copy link
Contributor

@gammon @kobelb I believe we recently decided that we should not longer merge plugins that are disabled by default and/or have not passed a security review. Rationale being that we don't want users to be able to hurt themselves (eg. by exposing a security flaw) by turning this plugin on.

Am I remembering correctly? And if so, should @constancecchen simply move this to a feature branch on our root repo until it's beta ready?

@cee-chen
Copy link
Member Author

cee-chen commented Jun 2, 2020

@kovyrin is currently doing some work to make Enterprise Search run against 8.x, so it's likely we can remove the default disabled line shortly here in any case. The disabled line does seem to be making some functional test pass that "shouldn't" (were previously failing, I think a nav link issue that we're continuing to meet w/ @kobelb to discuss), so definitely makes sense not to merge in with it.

I'll aim to remove the line here in a day or two once I'm confident I have ES and Kibana successfully and consistently both running against 8.x

@cee-chen cee-chen force-pushed the feature/enterprise-search-plugin branch 3 times, most recently from da328d2 to 4bac2a5 Compare June 9, 2020 19:20
@snide
Copy link
Contributor

snide commented Jun 9, 2020

Hey @constancecchen. I briefly ran through some of the code here on the design side. The big things you'll want to address before this goes up for review:

  1. Use variables. There shouldn't be many pixel values in your CSS.
  2. Try not to overwrite eui selections directly. Rather than .myClass .euiClass do instead myClass as an additive selector on the EUI component itself.

cc @johnbarrierwilson

Yell over slack when you're ready for a review, otherwise we'll assume this is a WIP PR.

@cee-chen cee-chen marked this pull request as draft June 12, 2020 17:45
@cee-chen cee-chen force-pushed the feature/enterprise-search-plugin branch 4 times, most recently from 9f26662 to 15e8f50 Compare June 17, 2020 16:59
@cee-chen cee-chen force-pushed the feature/enterprise-search-plugin branch 2 times, most recently from 1af7a33 to c0ccf22 Compare June 18, 2020 16:24
- remove set
- remove unnecessary capabilities registration
- telemetry namespace agnostic
see elastic#66922 (comment)
- add if statement
- pass log dependency around (this is kinda medium, should maybe refactor)
- update tests
- move test file comment to the right file (was meant for telemetry route file)
@cee-chen cee-chen force-pushed the feature/enterprise-search-plugin branch from 8d495f3 to 15a8b15 Compare July 8, 2020 08:07
Copy link
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not perform a full review. Some comments:

x-pack/plugins/enterprise_search/server/plugin.ts Outdated Show resolved Hide resolved
Comment on lines 120 to 123
registerTelemetryRoute({
...dependencies,
getSavedObjectsService: () => savedObjectsStarted,
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is effectively registering the telemetry route after the plugin's start. This is currently working because we are waiting for the legacy plugins to initialize before starting the server (which are initialized after KP plugin's start), however this may break after legacy removal if we decide to change this workflow.

I see that you can't just rely on the route handler context because you are using the contract to create a repository to use incrementCounter, however as a workaround, you could do:

let soStart: SavedObjectsServiceStart;
getStartServices().then(([coreStart]) => {
  soStart = coreStart.savedObjects
});
registerTelemetryRoute({
  ...dependencies,
  getSavedObjectsService: () => soStart,
});

@joshdover do we have any plan to allow access to incrementCounter from the SO client or from the SO context handler by any other mean?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for the great catches & cleanup Pierre! 😁 This comment should be addressed in 9c6acdd

Copy link
Contributor

@joshdover joshdover Jul 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshdover do we have any plan to allow access to incrementCounter from the SO client or from the SO context handler by any other mean?

No plans that I'm aware of.

I'm not sure why this was originally omitted from the Client interface (this all predates me at Elastic), but I suspect there may be security / authz concerns due to the scripted update that incrementCounter uses. In this specific case, authz doesn't really matter since we're accessing a telemetry object that (I assume?) is space agnostic and only accessible to the kibana_system user.

I think we don't have any internal repositories available on the RequestHandlerContext in order to prevent accidental usage when a scoped client is probably what you want. Another option would be to register your own context provider to supply this on the context object:

coreSetup.http.registerRouteHandlerContext('enterpriseSearch', () => {
  const [coreStart] = await coreSetup.getStartServices();
  return {
    internalSavedObjectsRepository: coreStart.savedObjects.createInternalRepository()
  }
});

This would make the value accessible on context.enterpriseSearch.internalSavedObjectsRepository inside your route handlers.

x-pack/plugins/enterprise_search/server/plugin.ts Outdated Show resolved Hide resolved
@legrego legrego self-requested a review July 8, 2020 12:10
- Remove unnecessary ServerConfigType
- Remove unnecessary uiCapabilities
- Move registerTelemetryRoute / SavedObjectsServiceStart workaround
- Remove unnecessary license optional chaining
Address type/typos
@cee-chen cee-chen force-pushed the feature/enterprise-search-plugin branch from 054f659 to 3b715b5 Compare July 8, 2020 17:35
cee-chen and others added 3 commits July 8, 2020 10:46
- I can't even?? I swear charset=utf-8 fixed the same error a few weeks ago
- Fix incorrect navigateToApp slug (hadn't realized this was a URL, not an ID)
- Update without_host_configured tests to run without API key
- Update README
@cee-chen cee-chen force-pushed the feature/enterprise-search-plugin branch from 5136952 to f305f11 Compare July 8, 2020 20:48
@cee-chen
Copy link
Member Author

cee-chen commented Jul 8, 2020

@elasticmachine merge upstream

@cee-chen
Copy link
Member Author

cee-chen commented Jul 9, 2020

@legrego Our functional tests for Enterprise Search without a host URL set are now running on CI! (f305f11) (https://github.com/elastic/kibana/pull/66922/checks?check_run_id=851885033)

Is there anything else you'd like to add or review?

Copy link
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performed a technical review.

Some nits and comments, but overall this is looking great. Rare enough to be noted for a new plugin addition, unit test coverage is excellent, and FTR tests are present. Great job!

LGTM for the platform team.

},
async (context, request, response) => {
try {
const enterpriseSearchUrl = config.host as string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: config.host is defined as optional in the config schema. currently, the endpoint would perform a unnecessary request that will fail:

const url = `${encodeURI(enterpriseSearchUrl)}/as/engines/collection?${params}`;

const enginesResponse = await fetch(url, {
    headers: { Authorization: request.headers.authorization as string },
});

would be better to 'fail fast' in the case of !config.host

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory the front-end should be taking care of this / not allowing this endpoint to be reached (the user/admin will get redirected to the Setup Guide which doesn't make a http call if config.host isn't set).

That being said, that's still a really good point and it's better to harden all pieces of an app! I'll definitely write this down as follow-up tech debt - I'd like to tackle it as a way to DRY out multiple endpoints at once vs per-endpoint (maybe http interceptors?)

Comment on lines +37 to +39
const enginesResponse = await fetch(url, {
headers: { Authorization: request.headers.authorization as string },
});
Copy link
Contributor

@pgayvallet pgayvallet Jul 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @restrry: FYI, another usage relying on accessing the authorization header on the request.

Copy link
Contributor

@mshustov mshustov Jul 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it perform request to a dedicated AppSearch server, but uses ES credentials? Would it cover this use-case if the platform provides request proxy functionality instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orhantoy / @kovyrin can probably answer this with more detail than I could 😬

Comment on lines +33 to +37
export class MockRouter {
public router!: jest.Mocked<IRouter>;
public method: methodType;
public payload?: payloadType;
public response = httpServerMock.createResponseFactory();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @joshdover @restrry I think I really like this testing utility. By improving it a little (like performing validation on all three body + query + params), that could be a good solution to provide route testing tool for plugin unit tests. WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll definitely admit I didn't quite grok how to handle body/query/params and over-simplified it into the payload var (also probably not the best name 😅) - super cool to hear that others think it's useful though!!

Comment on lines +58 to +59
expect(mockLogger.error).toHaveBeenCalled();
expect(mockRouter.response.internalError).toHaveBeenCalled();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: Assert the logged error content

expect(loggingSystemMock.collect(mockLogger).error).toMatchInlineSnapshot()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only concern about the inline snapshot is that a stack trace is generated:

        Array [
          Array [
            "App Search UI telemetry error: Error: Could not find Saved Objects service
            at handler (/Users/constance/Documents/kibana/x-pack/plugins/enterprise_search/server/routes/app_search/telemetry.ts:35:44)
            at MockRouter.callRoute (/Users/constance/Documents/kibana/x-pack/plugins/enterprise_search/server/routes/__mocks__/router.mock.ts:53:11)
            at Object.it (/Users/constance/Documents/kibana/x-pack/plugins/enterprise_search/server/routes/app_search/telemetry.test.ts:69:24)
            at Promise (/Users/constance/Documents/kibana/node_modules/jest-circus/build/utils.js:198:28)
            at new Promise (<anonymous>)
            at callAsyncCircusFn (/Users/constance/Documents/kibana/node_modules/jest-circus/build/utils.js:162:10)
            at _callCircusTest (/Users/constance/Documents/kibana/node_modules/jest-circus/build/run.js:205:40)
            at process._tickCallback (internal/process/next_tick.js:68:7)",
          ],
        ]

which of course is going to change per-machine and thus fail the snapshot 😬

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this to

      expect(loggingSystemMock.collect(mockLogger).error[0][0]).toEqual(
        expect.stringContaining(
          'App Search UI telemetry error: Error: Could not find Saved Objects service'
        )
      );

for now - would def love to hear if there's a better approach however!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a funny aside, when I was googling this to try and find better approaches, one of the top hits I got was Josh Dover's excellent blog post 😂 https://joshdover.com/when-not-to-use-jest-snapshots/

Comment on lines +9 to +13
export default function ({ loadTestFile }: FtrProviderContext) {
describe('Enterprise Search', function () {
loadTestFile(require.resolve('./app_search/engines'));
});
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this test suite is only for local testing, or is there a follow-up plan to be able to run the suite against a running enterprise search instance on the CI?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, per the README with_host_configured only runs locally right now. Larry let us know that Spencer added the option to run a docker image as a sidecar service on CI, but currently we're leaning as a team more towards running separate Cypress E2E tests (since we already have a full suite of Cypress tests on ent-search). It's definitely on our list to follow up on!

Comment on lines +33 to +34
// Push the route to the history.
history.push(to);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: (I know this means quite a lot of changes as you would need to add a specific context provider instead of using useHistory) It would be better to use applicationSetup.navigateToUrl here, to handle cases where you'll navigate to an internal link;

/**
* Navigate to given url, which can either be an absolute url or a relative path, in a SPA friendly way when possible.
*
* If all these criteria are true for the given url:
* - (only for absolute URLs) The origin of the URL matches the origin of the browser's current location
* - The pathname of the URL starts with the current basePath (eg. /mybasepath/s/my-space)
* - The pathname segment after the basePath matches any known application route (eg. /app/<id>/ or any application's `appRoute` configuration)
*
* Then a SPA navigation will be performed using `navigateToApp` using the corresponding application and path.
* Otherwise, fallback to a full page reload to navigate to the url using `window.location.assign`
*
* @example
* ```ts
* // current url: `https://kibana:8080/base-path/s/my-space/app/dashboard`
*
* // will call `application.navigateToApp('discover', { path: '/some-path?foo=bar'})`
* application.navigateToUrl('https://kibana:8080/base-path/s/my-space/app/discover/some-path?foo=bar')
* application.navigateToUrl('/base-path/s/my-space/app/discover/some-path?foo=bar')
*
* // will perform a full page reload using `window.location.assign`
* application.navigateToUrl('https://elsewhere:8080/base-path/s/my-space/app/discover/some-path') // origin does not match
* application.navigateToUrl('/app/discover/some-path') // does not include the current basePath
* application.navigateToUrl('/base-path/s/my-space/app/unknown-app/some-path') // unknown application
* ```
*
* @param url - an absolute url, or a relative path, to navigate to.
*/
navigateToUrl(url: string): Promise<void>;

This can be done as a follow-up.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, will definitely look into it as a follow-up PR!

Copy link
Member

@legrego legrego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the revisions!

- remove unnecessary authz?
- remove unnecessary content-type json headers
- add loggingSystemMock.collect(mockLogger).error assertion
- reconstrcut new MockRouter on beforeEach for better sandboxing
- fix incorrect describe()s -should be it()
- pull out reusable mockDependencies helper (renamed/extended from mockConfig) for tests that don't particularly use config/log but still want to pass type definitions
- Fix comment copy
@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/lens/smokescreen·ts.lens app lens smokescreen tests should allow creation of lens visualizations

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 1 times on tracked branches: https://github.com/elastic/kibana/issues/71304

[00:00:00]       │
[00:09:49]         └-: lens app
[00:09:49]           └-> "before all" hook
[00:09:49]           └-> "before all" hook
[00:09:49]             │ debg Starting lens before method
[00:09:49]             │ info [logstash_functional] Loading "mappings.json"
[00:09:49]             │ info [logstash_functional] Loading "data.json.gz"
[00:09:49]             │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:09:49]             │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:09:49]             │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:09:50]             │ info [lens/basic] Loading "mappings.json"
[00:09:50]             │ info [lens/basic] Loading "data.json.gz"
[00:09:50]             │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594319030245622102] [.kibana_2/lWgz8Q8GRd-nqxicygfRRA] deleting index
[00:09:50]             │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594319030245622102] [.kibana_1/7wMo75J8QQaxcsbvhHOYFA] deleting index
[00:09:50]             │ info [lens/basic] Deleted existing index [".kibana_2",".kibana_1"]
[00:09:50]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594319030245622102] [.kibana_1] creating index, cause [api], templates [], shards [1]/[0]
[00:09:51]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594319030245622102] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_1][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_1][0]]"
[00:09:51]             │ info [lens/basic] Created index ".kibana_1"
[00:09:51]             │ debg [lens/basic] ".kibana_1" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:09:51]             │ info [lens/basic] Indexed 10 docs into ".kibana_1"
[00:09:51]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594319030245622102] [.kibana_1/yd1r4RT-Q1GKWyKZSI2_SA] update_mapping [_doc]
[00:09:51]             │ debg Migrating saved objects
[00:09:51]             │ proc [kibana]   log   [19:05:58.451] [info][savedobjects-service] Creating index .kibana_2.
[00:09:51]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594319030245622102] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1]
[00:09:51]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594319030245622102] updating number_of_replicas to [0] for indices [.kibana_2]
[00:09:51]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594319030245622102] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_2][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_2][0]]"
[00:09:51]             │ proc [kibana]   log   [19:05:58.512] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:09:51]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594319030245622102] [.kibana_2/574CGaiXS5WXwY5XSufowg] update_mapping [_doc]
[00:09:51]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594319030245622102] [.kibana_2/574CGaiXS5WXwY5XSufowg] update_mapping [_doc]
[00:09:51]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594319030245622102] [.kibana_2/574CGaiXS5WXwY5XSufowg] update_mapping [_doc]
[00:09:51]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594319030245622102] [.kibana_2/574CGaiXS5WXwY5XSufowg] update_mapping [_doc]
[00:09:51]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594319030245622102] [.kibana_2/574CGaiXS5WXwY5XSufowg] update_mapping [_doc]
[00:09:51]             │ proc [kibana]   log   [19:05:58.750] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:09:51]             │ proc [kibana]   log   [19:05:58.800] [info][savedobjects-service] Finished in 351ms.
[00:09:51]           └-: 
[00:09:51]             └-> "before all" hook
[00:09:51]             └-: lens smokescreen tests
[00:09:51]               └-> "before all" hook
[00:09:51]               └-> should allow editing saved visualizations
[00:09:51]                 └-> "before each" hook: global before each
[00:09:51]                 │ debg navigating to visualize url: http://localhost:6151/app/visualize#/
[00:09:51]                 │ debg navigate to: http://localhost:6151/app/visualize#/
[00:09:51]                 │ debg browser[INFO] http://localhost:6151/login?next=%2Fapp%2Fvisualize%3F_t%3D1594321558822#/ 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:09:51]                 │
[00:09:51]                 │ debg browser[INFO] http://localhost:6151/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:09:51]                 │ debg ... sleep(700) start
[00:09:52]                 │ debg ... sleep(700) end
[00:09:52]                 │ debg returned from get, calling refresh
[00:09:52]                 │ debg browser[INFO] http://localhost:6151/login?next=%2Fapp%2Fvisualize%3F_t%3D1594321558822#/ 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:09:52]                 │
[00:09:52]                 │ debg browser[INFO] http://localhost:6151/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:09:52]                 │ debg currentUrl = http://localhost:6151/login?next=%2Fapp%2Fvisualize%3F_t%3D1594321558822#/
[00:09:52]                 │          appUrl = http://localhost:6151/app/visualize#/
[00:09:52]                 │ debg TestSubjects.find(kibanaChrome)
[00:09:52]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:09:53]                 │ debg Found login page
[00:09:53]                 │ debg TestSubjects.setValue(loginUsername, test_user)
[00:09:53]                 │ debg TestSubjects.click(loginUsername)
[00:09:53]                 │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:09:53]                 │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:09:53]                 │ debg browser[INFO] http://localhost:6151/34505/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-09T19:06:00Z
[00:09:53]                 │        Adding connection to http://localhost:6151/elasticsearch
[00:09:53]                 │
[00:09:53]                 │      "
[00:09:53]                 │ debg TestSubjects.setValue(loginPassword, changeme)
[00:09:53]                 │ debg TestSubjects.click(loginPassword)
[00:09:53]                 │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:09:53]                 │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:09:54]                 │ debg TestSubjects.click(loginSubmit)
[00:09:54]                 │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:09:54]                 │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:09:54]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"] nav:not(.ng-hide)') with timeout=60000
[00:09:57]                 │ debg browser[INFO] http://localhost:6151/app/visualize?_t=1594321558822#/ 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:09:57]                 │
[00:09:57]                 │ debg browser[INFO] http://localhost:6151/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:09:57]                 │ debg browser[INFO] http://localhost:6151/34505/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-09T19:06:03Z
[00:09:57]                 │        Adding connection to http://localhost:6151/elasticsearch
[00:09:57]                 │
[00:09:57]                 │      "
[00:09:57]                 │ debg browser[INFO] http://localhost:6151/app/visualize?_t=1594321564416#/ 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:09:57]                 │
[00:09:57]                 │ debg browser[INFO] http://localhost:6151/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:09:57]                 │ debg Finished login process currentUrl = http://localhost:6151/app/visualize#/
[00:09:57]                 │ debg ... sleep(501) start
[00:09:57]                 │ debg ... sleep(501) end
[00:09:58]                 │ debg in navigateTo url = http://localhost:6151/app/visualize#/
[00:09:58]                 │ debg TestSubjects.exists(statusPageContainer)
[00:09:58]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:10:00]                 │ debg browser[INFO] http://localhost:6151/34505/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-09T19:06:05Z
[00:10:00]                 │        Adding connection to http://localhost:6151/elasticsearch
[00:10:00]                 │
[00:10:00]                 │      "
[00:10:00]                 │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:10:01]                 │ debg searchForItemWithName: Artistpreviouslyknownaslens
[00:10:01]                 │ debg Find.allByCssSelector('.euiFieldSearch') with timeout=10000
[00:10:01]                 │ debg isGlobalLoadingIndicatorVisible
[00:10:01]                 │ debg TestSubjects.exists(globalLoadingIndicator)
[00:10:01]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:10:01]                 │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:10:03]                 │ debg --- retry.tryForTime failed again with the same message...
[00:10:04]                 │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:10:04]                 │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:10:04]                 │ debg lensPage.clickVisualizeListItemTitle('Artistpreviouslyknownaslens')
[00:10:04]                 │ debg TestSubjects.click(visListingTitleLink-Artistpreviouslyknownaslens)
[00:10:04]                 │ debg Find.clickByCssSelector('[data-test-subj="visListingTitleLink-Artistpreviouslyknownaslens"]') with timeout=10000
[00:10:04]                 │ debg Find.findByCssSelector('[data-test-subj="visListingTitleLink-Artistpreviouslyknownaslens"]') with timeout=10000
[00:10:04]                 │ debg lensPage.goToTimeRange()
[00:10:04]                 │ debg TestSubjects.exists(noDataPopoverDismissButton)
[00:10:04]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="noDataPopoverDismissButton"]') with timeout=2500
[00:10:05]                 │ debg TestSubjects.click(noDataPopoverDismissButton)
[00:10:05]                 │ debg Find.clickByCssSelector('[data-test-subj="noDataPopoverDismissButton"]') with timeout=10000
[00:10:05]                 │ debg Find.findByCssSelector('[data-test-subj="noDataPopoverDismissButton"]') with timeout=10000
[00:10:05]                 │ debg Setting absolute range to Sep 19, 2015 @ 06:31:44.000 to Sep 23, 2015 @ 18:31:44.000
[00:10:05]                 │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:10:05]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=20000
[00:10:05]                 │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[00:10:05]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=2500
[00:10:05]                 │ debg TestSubjects.click(superDatePickerShowDatesButton)
[00:10:05]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:10:05]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:10:05]                 │ debg TestSubjects.exists(superDatePickerstartDatePopoverButton)
[00:10:05]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=2500
[00:10:06]                 │ debg TestSubjects.click(superDatePickerendDatePopoverButton)
[00:10:06]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:10:06]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:10:06]                 │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:10:06]                 │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:10:06]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:10:06]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:10:06]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:10:06]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:10:06]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:10:06]                 │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 23, 2015 @ 18:31:44.000)
[00:10:06]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:10:06]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:10:06]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:10:07]                 │ debg ... sleep(500) start
[00:10:07]                 │ debg ... sleep(500) end
[00:10:07]                 │ debg TestSubjects.click(superDatePickerstartDatePopoverButton)
[00:10:07]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:10:07]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:10:07]                 │ debg Find.waitForElementStale with timeout=10000
[00:10:07]                 │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:10:08]                 │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:10:08]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:10:08]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:10:08]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:10:08]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:10:08]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:10:08]                 │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 19, 2015 @ 06:31:44.000)
[00:10:08]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:10:08]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:10:08]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:10:08]                 │ debg TestSubjects.exists(superDatePickerApplyTimeButton)
[00:10:08]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerApplyTimeButton"]') with timeout=2500
[00:10:11]                 │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerApplyTimeButton"] is not displayed
[00:10:11]                 │ debg TestSubjects.click(querySubmitButton)
[00:10:11]                 │ debg Find.clickByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:10:11]                 │ debg Find.findByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:10:12]                 │ debg Find.waitForElementStale with timeout=10000
[00:10:12]                 │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:10:12]                 │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:10:13]                 │ debg lensPage.assertExactText('[data-test-subj="lns_metric_title"]', 'Maximum of bytes')
[00:10:13]                 │ debg lensPage.assertExpectedText('[data-test-subj="lns_metric_title"]', value => value === expectedText)
[00:10:13]                 │ debg Waiting up to 1000ms for assertExpectedText...
[00:10:13]                 │ debg Find.findByCssSelector('[data-test-subj="lns_metric_title"]') with timeout=10000
[00:10:13]                 │ debg lensPage.assertExactText('[data-test-subj="lns_metric_value"]', '19,986')
[00:10:13]                 │ debg lensPage.assertExpectedText('[data-test-subj="lns_metric_value"]', value => value === expectedText)
[00:10:13]                 │ debg Waiting up to 1000ms for assertExpectedText...
[00:10:13]                 │ debg Find.findByCssSelector('[data-test-subj="lns_metric_value"]') with timeout=10000
[00:10:13]                 └- ✓ pass  (21.6s) "lens app  lens smokescreen tests should allow editing saved visualizations"
[00:10:13]               └-> metric should be embeddable in dashboards
[00:10:13]                 └-> "before each" hook: global before each
[00:10:13]                 │ debg navigating to dashboard url: http://localhost:6151/app/dashboards#/list
[00:10:13]                 │ debg navigate to: http://localhost:6151/app/dashboards#/list
[00:10:13]                 │ debg ... sleep(700) start
[00:10:13]                 │ debg browser[INFO] http://localhost:6151/app/dashboards?_t=1594321580419#/list 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:10:13]                 │
[00:10:13]                 │ debg browser[INFO] http://localhost:6151/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:13]                 │ debg ... sleep(700) end
[00:10:13]                 │ debg returned from get, calling refresh
[00:10:14]                 │ debg browser[INFO] http://localhost:6151/app/dashboards?_t=1594321580419#/list 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:10:14]                 │
[00:10:14]                 │ debg browser[INFO] http://localhost:6151/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:14]                 │ debg currentUrl = http://localhost:6151/app/dashboards#/list
[00:10:14]                 │          appUrl = http://localhost:6151/app/dashboards#/list
[00:10:14]                 │ debg TestSubjects.find(kibanaChrome)
[00:10:14]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:10:15]                 │ debg browser[INFO] http://localhost:6151/34505/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-09T19:06:21Z
[00:10:15]                 │        Adding connection to http://localhost:6151/elasticsearch
[00:10:15]                 │
[00:10:15]                 │      "
[00:10:15]                 │ debg ... sleep(501) start
[00:10:15]                 │ debg ... sleep(501) end
[00:10:15]                 │ debg in navigateTo url = http://localhost:6151/app/dashboards#/list?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:10:15]                 │ debg --- retry.try error: URL changed, waiting for it to settle
[00:10:16]                 │ debg ... sleep(501) start
[00:10:16]                 │ debg ... sleep(501) end
[00:10:16]                 │ debg in navigateTo url = http://localhost:6151/app/dashboards#/list?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:10:16]                 │ debg TestSubjects.exists(statusPageContainer)
[00:10:16]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:10:19]                 │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:10:19]                 │ debg TestSubjects.exists(newItemButton)
[00:10:19]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="newItemButton"]') with timeout=2500
[00:10:22]                 │ debg --- retry.tryForTime error: [data-test-subj="newItemButton"] is not displayed
[00:10:22]                 │ debg TestSubjects.click(createDashboardPromptButton)
[00:10:22]                 │ debg Find.clickByCssSelector('[data-test-subj="createDashboardPromptButton"]') with timeout=10000
[00:10:22]                 │ debg Find.findByCssSelector('[data-test-subj="createDashboardPromptButton"]') with timeout=10000
[00:10:23]                 │ debg waitForRenderComplete
[00:10:23]                 │ debg in getSharedItemsCount
[00:10:23]                 │ debg Find.findByCssSelector('[data-shared-items-count]') with timeout=10000
[00:10:23]                 │ debg Renderable.waitForRender for 0 elements
[00:10:23]                 │ debg Find.allByCssSelector('[data-render-complete="true"]') with timeout=10000
[00:10:33]                 │ debg Find.allByCssSelector('[data-loading]') with timeout=1000
[00:10:34]                 │ debg DashboardAddPanel.clickOpenAddPanel
[00:10:34]                 │ debg TestSubjects.click(dashboardAddPanelButton)
[00:10:34]                 │ debg Find.clickByCssSelector('[data-test-subj="dashboardAddPanelButton"]') with timeout=10000
[00:10:34]                 │ debg Find.findByCssSelector('[data-test-subj="dashboardAddPanelButton"]') with timeout=10000
[00:10:34]                 │ debg ... sleep(500) start
[00:10:34]                 │ debg ... sleep(500) end
[00:10:34]                 │ debg Find.waitForDeletedByCssSelector('[data-test-subj="savedObjectFinderLoadingIndicator"]') with timeout=10000
[00:10:35]                 │ debg TestSubjects.setValue(savedObjectFinderSearchInput, Artistpreviouslyknownaslens)
[00:10:35]                 │ debg TestSubjects.click(savedObjectFinderSearchInput)
[00:10:35]                 │ debg Find.clickByCssSelector('[data-test-subj="savedObjectFinderSearchInput"]') with timeout=10000
[00:10:35]                 │ debg Find.findByCssSelector('[data-test-subj="savedObjectFinderSearchInput"]') with timeout=10000
[00:10:35]                 │ debg Find.waitForDeletedByCssSelector('[data-test-subj="savedObjectFinderLoadingIndicator"]') with timeout=10000
[00:10:36]                 │ debg Find.clickByButtonText('Artistpreviouslyknownaslens') with timeout=10000
[00:10:36]                 │ debg Find.byButtonText('Artistpreviouslyknownaslens') with timeout=10000
[00:10:37]                 │ debg TestSubjects.exists(dashboardAddPanel)
[00:10:37]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="dashboardAddPanel"]') with timeout=1000
[00:10:37]                 │ debg Closing flyout dashboardAddPanel
[00:10:37]                 │ debg TestSubjects.find(dashboardAddPanel)
[00:10:37]                 │ debg Find.findByCssSelector('[data-test-subj="dashboardAddPanel"]') with timeout=10000
[00:10:37]                 │ debg Waiting up to 20000ms for flyout closed...
[00:10:37]                 │ debg TestSubjects.exists(dashboardAddPanel)
[00:10:37]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="dashboardAddPanel"]') with timeout=1000
[00:10:38]                 │ debg --- retry.tryForTime error: [data-test-subj="dashboardAddPanel"] is not displayed
[00:10:39]                 │ debg lensPage.goToTimeRange()
[00:10:39]                 │ debg TestSubjects.exists(noDataPopoverDismissButton)
[00:10:39]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="noDataPopoverDismissButton"]') with timeout=2500
[00:10:41]                 │ debg --- retry.tryForTime error: [data-test-subj="noDataPopoverDismissButton"] is not displayed
[00:10:42]                 │ debg Setting absolute range to Sep 19, 2015 @ 06:31:44.000 to Sep 23, 2015 @ 18:31:44.000
[00:10:42]                 │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:10:42]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=20000
[00:10:42]                 │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[00:10:42]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=2500
[00:10:42]                 │ debg TestSubjects.click(superDatePickerShowDatesButton)
[00:10:42]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:10:42]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:10:42]                 │ debg TestSubjects.exists(superDatePickerstartDatePopoverButton)
[00:10:42]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=2500
[00:10:42]                 │ debg TestSubjects.click(superDatePickerendDatePopoverButton)
[00:10:42]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:10:42]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:10:42]                 │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:10:42]                 │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:10:42]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:10:42]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:10:42]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:10:42]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:10:42]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:10:42]                 │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 23, 2015 @ 18:31:44.000)
[00:10:42]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:10:42]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:10:42]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:10:43]                 │ debg ... sleep(500) start
[00:10:43]                 │ debg ... sleep(500) end
[00:10:43]                 │ debg TestSubjects.click(superDatePickerstartDatePopoverButton)
[00:10:43]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:10:43]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:10:43]                 │ debg Find.waitForElementStale with timeout=10000
[00:10:44]                 │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:10:44]                 │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:10:44]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:10:44]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:10:44]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:10:44]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:10:44]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:10:44]                 │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 19, 2015 @ 06:31:44.000)
[00:10:44]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:10:44]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:10:44]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:10:45]                 │ debg TestSubjects.exists(superDatePickerApplyTimeButton)
[00:10:45]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerApplyTimeButton"]') with timeout=2500
[00:10:47]                 │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerApplyTimeButton"] is not displayed
[00:10:48]                 │ debg TestSubjects.click(querySubmitButton)
[00:10:48]                 │ debg Find.clickByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:10:48]                 │ debg Find.findByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:10:48]                 │ debg Find.waitForElementStale with timeout=10000
[00:10:48]                 │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:10:48]                 │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:10:48]                 │ debg lensPage.assertExactText('[data-test-subj="lns_metric_title"]', 'Maximum of bytes')
[00:10:48]                 │ debg lensPage.assertExpectedText('[data-test-subj="lns_metric_title"]', value => value === expectedText)
[00:10:48]                 │ debg Waiting up to 1000ms for assertExpectedText...
[00:10:48]                 │ debg Find.findByCssSelector('[data-test-subj="lns_metric_title"]') with timeout=10000
[00:10:48]                 │ debg lensPage.assertExactText('[data-test-subj="lns_metric_value"]', '19,986')
[00:10:48]                 │ debg lensPage.assertExpectedText('[data-test-subj="lns_metric_value"]', value => value === expectedText)
[00:10:48]                 │ debg Waiting up to 1000ms for assertExpectedText...
[00:10:48]                 │ debg Find.findByCssSelector('[data-test-subj="lns_metric_value"]') with timeout=10000
[00:10:48]                 └- ✓ pass  (35.7s) "lens app  lens smokescreen tests metric should be embeddable in dashboards"
[00:10:48]               └-> click on the bar in XYChart adds proper filters/timerange in dashboard
[00:10:48]                 └-> "before each" hook: global before each
[00:10:48]                 │ debg navigating to dashboard url: http://localhost:6151/app/dashboards#/list
[00:10:48]                 │ debg navigate to: http://localhost:6151/app/dashboards#/list
[00:10:48]                 │ debg browser[INFO] http://localhost:6151/app/dashboards?_t=1594321616072#/list 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:10:48]                 │
[00:10:48]                 │ debg browser[INFO] http://localhost:6151/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:48]                 │ debg ... sleep(700) start
[00:10:49]                 │ debg ... sleep(700) end
[00:10:49]                 │ debg returned from get, calling refresh
[00:10:50]                 │ debg browser[INFO] http://localhost:6151/34505/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-09T19:06:57Z
[00:10:50]                 │        Adding connection to http://localhost:6151/elasticsearch
[00:10:50]                 │
[00:10:50]                 │      "
[00:10:50]                 │ERROR browser[SEVERE] http://localhost:6151/34505/bundles/core/core.entry.js 83:261771 TypeError: Failed to fetch
[00:10:50]                 │ debg browser[INFO] http://localhost:6151/app/dashboards?_t=1594321616072#/list 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:10:50]                 │
[00:10:50]                 │ debg browser[INFO] http://localhost:6151/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:51]                 │ debg browser[INFO] http://localhost:6151/34505/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-09T19:06:58Z
[00:10:51]                 │        Adding connection to http://localhost:6151/elasticsearch
[00:10:51]                 │
[00:10:51]                 │      "
[00:10:51]                 │ debg currentUrl = http://localhost:6151/app/dashboards#/list
[00:10:51]                 │          appUrl = http://localhost:6151/app/dashboards#/list
[00:10:51]                 │ debg TestSubjects.find(kibanaChrome)
[00:10:51]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:10:51]                 │ debg ... sleep(501) start
[00:10:52]                 │ debg ... sleep(501) end
[00:10:52]                 │ debg in navigateTo url = http://localhost:6151/app/dashboards#/list?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:10:52]                 │ debg --- retry.try error: URL changed, waiting for it to settle
[00:10:52]                 │ debg ... sleep(501) start
[00:10:53]                 │ debg ... sleep(501) end
[00:10:53]                 │ debg in navigateTo url = http://localhost:6151/app/dashboards#/list?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:10:53]                 │ debg TestSubjects.exists(statusPageContainer)
[00:10:53]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:10:55]                 │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:10:56]                 │ debg TestSubjects.exists(newItemButton)
[00:10:56]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="newItemButton"]') with timeout=2500
[00:10:58]                 │ debg --- retry.tryForTime error: [data-test-subj="newItemButton"] is not displayed
[00:10:59]                 │ debg TestSubjects.click(createDashboardPromptButton)
[00:10:59]                 │ debg Find.clickByCssSelector('[data-test-subj="createDashboardPromptButton"]') with timeout=10000
[00:10:59]                 │ debg Find.findByCssSelector('[data-test-subj="createDashboardPromptButton"]') with timeout=10000
[00:10:59]                 │ debg waitForRenderComplete
[00:10:59]                 │ debg in getSharedItemsCount
[00:10:59]                 │ debg Find.findByCssSelector('[data-shared-items-count]') with timeout=10000
[00:10:59]                 │ debg Renderable.waitForRender for 0 elements
[00:10:59]                 │ debg Find.allByCssSelector('[data-render-complete="true"]') with timeout=10000
[00:11:09]                 │ debg Find.allByCssSelector('[data-loading]') with timeout=1000
[00:11:10]                 │ debg DashboardAddPanel.clickOpenAddPanel
[00:11:10]                 │ debg TestSubjects.click(dashboardAddPanelButton)
[00:11:10]                 │ debg Find.clickByCssSelector('[data-test-subj="dashboardAddPanelButton"]') with timeout=10000
[00:11:10]                 │ debg Find.findByCssSelector('[data-test-subj="dashboardAddPanelButton"]') with timeout=10000
[00:11:10]                 │ debg ... sleep(500) start
[00:11:11]                 │ debg ... sleep(500) end
[00:11:11]                 │ debg Find.waitForDeletedByCssSelector('[data-test-subj="savedObjectFinderLoadingIndicator"]') with timeout=10000
[00:11:11]                 │ debg TestSubjects.setValue(savedObjectFinderSearchInput, lnsXYvis)
[00:11:11]                 │ debg TestSubjects.click(savedObjectFinderSearchInput)
[00:11:11]                 │ debg Find.clickByCssSelector('[data-test-subj="savedObjectFinderSearchInput"]') with timeout=10000
[00:11:11]                 │ debg Find.findByCssSelector('[data-test-subj="savedObjectFinderSearchInput"]') with timeout=10000
[00:11:11]                 │ debg Find.waitForDeletedByCssSelector('[data-test-subj="savedObjectFinderLoadingIndicator"]') with timeout=10000
[00:11:12]                 │ debg Find.clickByButtonText('lnsXYvis') with timeout=10000
[00:11:12]                 │ debg Find.byButtonText('lnsXYvis') with timeout=10000
[00:11:13]                 │ debg TestSubjects.exists(dashboardAddPanel)
[00:11:13]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="dashboardAddPanel"]') with timeout=1000
[00:11:13]                 │ debg Closing flyout dashboardAddPanel
[00:11:13]                 │ debg TestSubjects.find(dashboardAddPanel)
[00:11:13]                 │ debg Find.findByCssSelector('[data-test-subj="dashboardAddPanel"]') with timeout=10000
[00:11:13]                 │ debg Waiting up to 20000ms for flyout closed...
[00:11:13]                 │ debg TestSubjects.exists(dashboardAddPanel)
[00:11:13]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="dashboardAddPanel"]') with timeout=1000
[00:11:14]                 │ debg --- retry.tryForTime error: [data-test-subj="dashboardAddPanel"] is not displayed
[00:11:14]                 │ debg lensPage.goToTimeRange()
[00:11:14]                 │ debg TestSubjects.exists(noDataPopoverDismissButton)
[00:11:14]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="noDataPopoverDismissButton"]') with timeout=2500
[00:11:17]                 │ debg --- retry.tryForTime error: [data-test-subj="noDataPopoverDismissButton"] is not displayed
[00:11:18]                 │ debg Setting absolute range to Sep 19, 2015 @ 06:31:44.000 to Sep 23, 2015 @ 18:31:44.000
[00:11:18]                 │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:11:18]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=20000
[00:11:18]                 │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[00:11:18]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=2500
[00:11:18]                 │ debg TestSubjects.click(superDatePickerShowDatesButton)
[00:11:18]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:11:18]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:11:18]                 │ debg TestSubjects.exists(superDatePickerstartDatePopoverButton)
[00:11:18]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=2500
[00:11:18]                 │ debg TestSubjects.click(superDatePickerendDatePopoverButton)
[00:11:18]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:11:18]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:11:18]                 │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:11:18]                 │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:11:18]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:11:18]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:11:18]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:11:18]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:11:18]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:11:18]                 │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 23, 2015 @ 18:31:44.000)
[00:11:18]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:11:18]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:11:18]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:11:19]                 │ debg ... sleep(500) start
[00:11:19]                 │ debg ... sleep(500) end
[00:11:19]                 │ debg TestSubjects.click(superDatePickerstartDatePopoverButton)
[00:11:19]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:11:19]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:11:19]                 │ debg Find.waitForElementStale with timeout=10000
[00:11:20]                 │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:11:20]                 │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:11:20]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:11:20]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:11:20]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:11:20]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:11:20]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:11:20]                 │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 19, 2015 @ 06:31:44.000)
[00:11:20]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:11:20]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:11:20]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:11:21]                 │ debg TestSubjects.exists(superDatePickerApplyTimeButton)
[00:11:21]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerApplyTimeButton"]') with timeout=2500
[00:11:23]                 │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerApplyTimeButton"] is not displayed
[00:11:24]                 │ debg TestSubjects.click(querySubmitButton)
[00:11:24]                 │ debg Find.clickByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:11:24]                 │ debg Find.findByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:11:24]                 │ debg Find.waitForElementStale with timeout=10000
[00:11:24]                 │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:11:24]                 │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:11:24]                 │ debg Find.findByCssSelector('.echChart canvas:last-of-type') with timeout=10000
[00:11:24]                 │ debg TestSubjects.click(applyFiltersPopoverButton)
[00:11:24]                 │ debg Find.clickByCssSelector('[data-test-subj="applyFiltersPopoverButton"]') with timeout=10000
[00:11:24]                 │ debg Find.findByCssSelector('[data-test-subj="applyFiltersPopoverButton"]') with timeout=10000
[00:11:25]                 │ debg TestSubjects.missingOrFail(applyFiltersPopoverButton)
[00:11:25]                 │ debg Find.waitForDeletedByCssSelector('[data-test-subj="applyFiltersPopoverButton"]') with timeout=2500
[00:11:25]                 │ debg lensPage.assertExactText('[data-test-subj="embeddablePanelHeading-lnsXYvis"]', 'lnsXYvis')
[00:11:25]                 │ debg lensPage.assertExpectedText('[data-test-subj="embeddablePanelHeading-lnsXYvis"]', value => value === expectedText)
[00:11:25]                 │ debg Waiting up to 1000ms for assertExpectedText...
[00:11:25]                 │ debg Find.findByCssSelector('[data-test-subj="embeddablePanelHeading-lnsXYvis"]') with timeout=10000
[00:11:25]                 │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:11:25]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=20000
[00:11:25]                 │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[00:11:25]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=2500
[00:11:28]                 │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerShowDatesButton"] is not displayed
[00:11:28]                 │ debg TestSubjects.exists(superDatePickerstartDatePopoverButton)
[00:11:28]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=2500
[00:11:28]                 │ debg TestSubjects.getVisibleText(superDatePickerstartDatePopoverButton)
[00:11:28]                 │ debg TestSubjects.find(superDatePickerstartDatePopoverButton)
[00:11:28]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:11:28]                 │ debg TestSubjects.getVisibleText(superDatePickerendDatePopoverButton)
[00:11:28]                 │ debg TestSubjects.find(superDatePickerendDatePopoverButton)
[00:11:28]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:11:28]                 │ debg TestSubjects.exists(filter filter-enabled filter-key-ip filter-value-97.220.3.248 filter-unpinned)
[00:11:28]                 │ debg Find.existsByCssSelector('[data-test-subj="filter filter-enabled filter-key-ip filter-value-97.220.3.248 filter-unpinned"]') with timeout=2500
[00:11:28]                 └- ✓ pass  (40.0s) "lens app  lens smokescreen tests click on the bar in XYChart adds proper filters/timerange in dashboard"
[00:11:28]               └-> should allow seamless transition to and from table view
[00:11:28]                 └-> "before each" hook: global before each
[00:11:28]                 │ debg navigating to visualize url: http://localhost:6151/app/visualize#/
[00:11:28]                 │ debg navigate to: http://localhost:6151/app/visualize#/
[00:11:29]                 │ debg browser[INFO] http://localhost:6151/app/visualize?_t=1594321656120#/ 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:11:29]                 │
[00:11:29]                 │ debg browser[INFO] http://localhost:6151/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:11:29]                 │ debg ... sleep(700) start
[00:11:29]                 │ debg ... sleep(700) end
[00:11:29]                 │ debg returned from get, calling refresh
[00:11:30]                 │ debg browser[INFO] http://localhost:6151/app/visualize?_t=1594321656120#/ 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:11:30]                 │
[00:11:30]                 │ debg browser[INFO] http://localhost:6151/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:11:30]                 │ debg currentUrl = http://localhost:6151/app/visualize#/
[00:11:30]                 │          appUrl = http://localhost:6151/app/visualize#/
[00:11:30]                 │ debg TestSubjects.find(kibanaChrome)
[00:11:30]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:11:31]                 │ debg browser[INFO] http://localhost:6151/34505/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-09T19:07:37Z
[00:11:31]                 │        Adding connection to http://localhost:6151/elasticsearch
[00:11:31]                 │
[00:11:31]                 │      "
[00:11:31]                 │ debg ... sleep(501) start
[00:11:31]                 │ debg ... sleep(501) end
[00:11:31]                 │ debg in navigateTo url = http://localhost:6151/app/visualize#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:11:31]                 │ debg --- retry.try error: URL changed, waiting for it to settle
[00:11:32]                 │ debg ... sleep(501) start
[00:11:32]                 │ debg ... sleep(501) end
[00:11:32]                 │ debg in navigateTo url = http://localhost:6151/app/visualize#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:11:32]                 │ debg TestSubjects.exists(statusPageContainer)
[00:11:32]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:11:35]                 │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:11:35]                 │ debg searchForItemWithName: Artistpreviouslyknownaslens
[00:11:35]                 │ debg Find.allByCssSelector('.euiFieldSearch') with timeout=10000
[00:11:36]                 │ debg isGlobalLoadingIndicatorVisible
[00:11:36]                 │ debg TestSubjects.exists(globalLoadingIndicator)
[00:11:36]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:11:36]                 │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:11:38]                 │ debg --- retry.tryForTime failed again with the same message...
[00:11:39]                 │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:11:39]                 │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:11:39]                 │ debg lensPage.clickVisualizeListItemTitle('Artistpreviouslyknownaslens')
[00:11:39]                 │ debg TestSubjects.click(visListingTitleLink-Artistpreviouslyknownaslens)
[00:11:39]                 │ debg Find.clickByCssSelector('[data-test-subj="visListingTitleLink-Artistpreviouslyknownaslens"]') with timeout=10000
[00:11:39]                 │ debg Find.findByCssSelector('[data-test-subj="visListingTitleLink-Artistpreviouslyknownaslens"]') with timeout=10000
[00:11:39]                 │ debg lensPage.goToTimeRange()
[00:11:39]                 │ debg TestSubjects.exists(noDataPopoverDismissButton)
[00:11:39]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="noDataPopoverDismissButton"]') with timeout=2500
[00:11:42]                 │ debg --- retry.tryForTime error: [data-test-subj="noDataPopoverDismissButton"] is not displayed
[00:11:42]                 │ debg Setting absolute range to Sep 19, 2015 @ 06:31:44.000 to Sep 23, 2015 @ 18:31:44.000
[00:11:42]                 │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:11:42]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=20000
[00:11:42]                 │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[00:11:42]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=2500
[00:11:42]                 │ debg TestSubjects.click(superDatePickerShowDatesButton)
[00:11:42]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:11:42]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:11:42]                 │ debg TestSubjects.exists(superDatePickerstartDatePopoverButton)
[00:11:42]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=2500
[00:11:42]                 │ debg TestSubjects.click(superDatePickerendDatePopoverButton)
[00:11:42]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:11:42]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:11:42]                 │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:11:42]                 │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:11:42]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:11:42]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:11:43]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:11:43]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:11:43]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:11:43]                 │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 23, 2015 @ 18:31:44.000)
[00:11:43]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:11:43]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:11:43]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:11:43]                 │ debg ... sleep(500) start
[00:11:44]                 │ debg ... sleep(500) end
[00:11:44]                 │ debg TestSubjects.click(superDatePickerstartDatePopoverButton)
[00:11:44]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:11:44]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:11:44]                 │ debg Find.waitForElementStale with timeout=10000
[00:11:44]                 │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:11:44]                 │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:11:44]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:11:44]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:11:44]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:11:44]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:11:44]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:11:44]                 │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 19, 2015 @ 06:31:44.000)
[00:11:44]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:11:44]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:11:44]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:11:45]                 │ debg TestSubjects.exists(superDatePickerApplyTimeButton)
[00:11:45]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerApplyTimeButton"]') with timeout=2500
[00:11:48]                 │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerApplyTimeButton"] is not displayed
[00:11:48]                 │ debg TestSubjects.click(querySubmitButton)
[00:11:48]                 │ debg Find.clickByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:11:48]                 │ debg Find.findByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:11:48]                 │ debg Find.waitForElementStale with timeout=10000
[00:11:49]                 │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:11:49]                 │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:11:49]                 │ debg lensPage.assertExactText('[data-test-subj="lns_metric_title"]', 'Maximum of bytes')
[00:11:49]                 │ debg lensPage.assertExpectedText('[data-test-subj="lns_metric_title"]', value => value === expectedText)
[00:11:49]                 │ debg Waiting up to 1000ms for assertExpectedText...
[00:11:49]                 │ debg Find.findByCssSelector('[data-test-subj="lns_metric_title"]') with timeout=10000
[00:11:49]                 │ debg lensPage.assertExactText('[data-test-subj="lns_metric_value"]', '19,986')
[00:11:49]                 │ debg lensPage.assertExpectedText('[data-test-subj="lns_metric_value"]', value => value === expectedText)
[00:11:49]                 │ debg Waiting up to 1000ms for assertExpectedText...
[00:11:49]                 │ debg Find.findByCssSelector('[data-test-subj="lns_metric_value"]') with timeout=10000
[00:11:49]                 │ debg lensPage.switchToVisualization('lnsChartSwitchPopover_lnsDatatable')
[00:11:49]                 │ debg TestSubjects.click(lnsChartSwitchPopover)
[00:11:49]                 │ debg Find.clickByCssSelector('[data-test-subj="lnsChartSwitchPopover"]') with timeout=10000
[00:11:49]                 │ debg Find.findByCssSelector('[data-test-subj="lnsChartSwitchPopover"]') with timeout=10000
[00:11:50]                 │ debg TestSubjects.click(lnsChartSwitchPopover_lnsDatatable)
[00:11:50]                 │ debg Find.clickByCssSelector('[data-test-subj="lnsChartSwitchPopover_lnsDatatable"]') with timeout=10000
[00:11:50]                 │ debg Find.findByCssSelector('[data-test-subj="lnsChartSwitchPopover_lnsDatatable"]') with timeout=10000
[00:11:50]                 │ debg lensPage.assertExactText('[data-test-subj="lnsDataTable"] thead .euiTableCellContent__text', 'Maximum of bytes')
[00:11:50]                 │ debg lensPage.assertExpectedText('[data-test-subj="lnsDataTable"] thead .euiTableCellContent__text', value => value === expectedText)
[00:11:50]                 │ debg Waiting up to 1000ms for assertExpectedText...
[00:11:50]                 │ debg Find.findByCssSelector('[data-test-subj="lnsDataTable"] thead .euiTableCellContent__text') with timeout=10000
[00:11:50]                 │ debg lensPage.assertExactText('[data-test-subj="lnsDataTable"] [data-test-subj="lnsDataTableCellValue"]', '19,986')
[00:11:50]                 │ debg lensPage.assertExpectedText('[data-test-subj="lnsDataTable"] [data-test-subj="lnsDataTableCellValue"]', value => value === expectedText)
[00:11:50]                 │ debg Waiting up to 1000ms for assertExpectedText...
[00:11:50]                 │ debg Find.findByCssSelector('[data-test-subj="lnsDataTable"] [data-test-subj="lnsDataTableCellValue"]') with timeout=10000
[00:11:50]                 │ debg lensPage.switchToVisualization('lnsChartSwitchPopover_lnsMetric')
[00:11:50]                 │ debg TestSubjects.click(lnsChartSwitchPopover)
[00:11:50]                 │ debg Find.clickByCssSelector('[data-test-subj="lnsChartSwitchPopover"]') with timeout=10000
[00:11:50]                 │ debg Find.findByCssSelector('[data-test-subj="lnsChartSwitchPopover"]') with timeout=10000
[00:11:50]                 │ debg TestSubjects.click(lnsChartSwitchPopover_lnsMetric)
[00:11:50]                 │ debg Find.clickByCssSelector('[data-test-subj="lnsChartSwitchPopover_lnsMetric"]') with timeout=10000
[00:11:50]                 │ debg Find.findByCssSelector('[data-test-subj="lnsChartSwitchPopover_lnsMetric"]') with timeout=10000
[00:11:51]                 │ debg lensPage.assertExactText('[data-test-subj="lns_metric_title"]', 'Maximum of bytes')
[00:11:51]                 │ debg lensPage.assertExpectedText('[data-test-subj="lns_metric_title"]', value => value === expectedText)
[00:11:51]                 │ debg Waiting up to 1000ms for assertExpectedText...
[00:11:51]                 │ debg Find.findByCssSelector('[data-test-subj="lns_metric_title"]') with timeout=10000
[00:11:51]                 │ debg lensPage.assertExactText('[data-test-subj="lns_metric_value"]', '19,986')
[00:11:51]                 │ debg lensPage.assertExpectedText('[data-test-subj="lns_metric_value"]', value => value === expectedText)
[00:11:51]                 │ debg Waiting up to 1000ms for assertExpectedText...
[00:11:51]                 │ debg Find.findByCssSelector('[data-test-subj="lns_metric_value"]') with timeout=10000
[00:11:51]                 └- ✓ pass  (22.8s) "lens app  lens smokescreen tests should allow seamless transition to and from table view"
[00:11:51]               └-> should allow creation of lens visualizations
[00:11:51]                 └-> "before each" hook: global before each
[00:11:51]                 │ debg navigating to visualize url: http://localhost:6151/app/visualize#/
[00:11:51]                 │ debg navigate to: http://localhost:6151/app/visualize#/
[00:11:51]                 │ debg ... sleep(700) start
[00:11:51]                 │ debg browser[INFO] http://localhost:6151/app/visualize?_t=1594321678887#/ 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:11:51]                 │
[00:11:51]                 │ debg browser[INFO] http://localhost:6151/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:11:52]                 │ debg ... sleep(700) end
[00:11:52]                 │ debg returned from get, calling refresh
[00:11:52]                 │ debg browser[INFO] http://localhost:6151/app/visualize?_t=1594321678887#/ 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:11:52]                 │
[00:11:52]                 │ debg browser[INFO] http://localhost:6151/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:11:52]                 │ debg currentUrl = http://localhost:6151/app/visualize#/
[00:11:52]                 │          appUrl = http://localhost:6151/app/visualize#/
[00:11:52]                 │ debg TestSubjects.find(kibanaChrome)
[00:11:52]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:11:54]                 │ debg browser[INFO] http://localhost:6151/34505/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-09T19:08:00Z
[00:11:54]                 │        Adding connection to http://localhost:6151/elasticsearch
[00:11:54]                 │
[00:11:54]                 │      "
[00:11:54]                 │ debg ... sleep(501) start
[00:11:54]                 │ debg ... sleep(501) end
[00:11:54]                 │ debg in navigateTo url = http://localhost:6151/app/visualize#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:11:54]                 │ debg --- retry.try error: URL changed, waiting for it to settle
[00:11:55]                 │ debg ... sleep(501) start
[00:11:55]                 │ debg ... sleep(501) end
[00:11:55]                 │ debg in navigateTo url = http://localhost:6151/app/visualize#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:11:55]                 │ debg TestSubjects.exists(statusPageContainer)
[00:11:55]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:11:58]                 │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:11:58]                 │ debg TestSubjects.exists(newItemButton)
[00:11:58]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="newItemButton"]') with timeout=2500
[00:11:58]                 │ debg TestSubjects.click(newItemButton)
[00:11:58]                 │ debg Find.clickByCssSelector('[data-test-subj="newItemButton"]') with timeout=10000
[00:11:58]                 │ debg Find.findByCssSelector('[data-test-subj="newItemButton"]') with timeout=10000
[00:11:58]                 │ debg TestSubjects.find(visNewDialogTypes)
[00:11:58]                 │ debg Find.findByCssSelector('[data-test-subj="visNewDialogTypes"]') with timeout=10000
[00:11:59]                 │ debg TestSubjects.click(visType-lens)
[00:11:59]                 │ debg Find.clickByCssSelector('[data-test-subj="visType-lens"]') with timeout=10000
[00:11:59]                 │ debg Find.findByCssSelector('[data-test-subj="visType-lens"]') with timeout=10000
[00:11:59]                 │ debg isGlobalLoadingIndicatorVisible
[00:11:59]                 │ debg TestSubjects.exists(globalLoadingIndicator)
[00:11:59]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:11:59]                 │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:11:59]                 │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:11:59]                 │ debg lensPage.goToTimeRange()
[00:11:59]                 │ debg TestSubjects.exists(noDataPopoverDismissButton)
[00:11:59]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="noDataPopoverDismissButton"]') with timeout=2500
[00:12:01]                 │ debg --- retry.tryForTime error: [data-test-subj="noDataPopoverDismissButton"] is not displayed
[00:12:02]                 │ debg Setting absolute range to Sep 19, 2015 @ 06:31:44.000 to Sep 23, 2015 @ 18:31:44.000
[00:12:02]                 │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:12:02]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=20000
[00:12:02]                 │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[00:12:02]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=2500
[00:12:02]                 │ debg TestSubjects.click(superDatePickerShowDatesButton)
[00:12:02]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:12:02]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:12:02]                 │ debg TestSubjects.exists(superDatePickerstartDatePopoverButton)
[00:12:02]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=2500
[00:12:02]                 │ debg TestSubjects.click(superDatePickerendDatePopoverButton)
[00:12:02]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:12:02]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:12:02]                 │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:12:02]                 │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:12:02]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:12:02]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:12:02]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:12:02]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:12:02]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:12:02]                 │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 23, 2015 @ 18:31:44.000)
[00:12:02]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:12:02]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:12:02]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:12:03]                 │ debg ... sleep(500) start
[00:12:04]                 │ debg ... sleep(500) end
[00:12:04]                 │ debg TestSubjects.click(superDatePickerstartDatePopoverButton)
[00:12:04]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:12:04]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:12:04]                 │ debg Find.waitForElementStale with timeout=10000
[00:12:04]                 │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:12:04]                 │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:12:04]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:12:04]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:12:04]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:12:04]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:12:04]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:12:04]                 │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 19, 2015 @ 06:31:44.000)
[00:12:04]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:12:04]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:12:04]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:12:05]                 │ debg TestSubjects.exists(superDatePickerApplyTimeButton)
[00:12:05]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerApplyTimeButton"]') with timeout=2500
[00:12:07]                 │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerApplyTimeButton"] is not displayed
[00:12:08]                 │ debg TestSubjects.click(querySubmitButton)
[00:12:08]                 │ debg Find.clickByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:12:08]                 │ debg Find.findByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:12:08]                 │ debg Find.waitForElementStale with timeout=10000
[00:12:08]                 │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:12:08]                 │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:12:09]                 │ debg lensPage.configureDimension([object Object])
[00:12:09]                 │ debg Find.clickByCssSelector('[data-test-subj="lnsXY_xDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:12:09]                 │ debg Find.findByCssSelector('[data-test-subj="lnsXY_xDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:12:09]                 │ debg Find.clickByCssSelector('[data-test-subj="lns-indexPatternDimensionIncompatible-date_histogram"],
[00:12:09]                 │                [data-test-subj="lns-indexPatternDimension-date_histogram"]') with timeout=10000
[00:12:09]                 │ debg Find.findByCssSelector('[data-test-subj="lns-indexPatternDimensionIncompatible-date_histogram"],
[00:12:09]                 │                [data-test-subj="lns-indexPatternDimension-date_histogram"]') with timeout=10000
[00:12:09]                 │ debg TestSubjects.find(indexPattern-dimension-field)
[00:12:09]                 │ debg Find.findByCssSelector('[data-test-subj="indexPattern-dimension-field"]') with timeout=10000
[00:12:09]                 │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:12:09]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:12:11]                 │ debg --- retry.tryForTime error: [data-test-subj~="comboBoxOptionsList"] is not displayed
[00:12:12]                 │ debg comboBox.setElement, value: @timestamp
[00:12:12]                 │ debg comboBox.isOptionSelected, value: @timestamp
[00:12:14]                 │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:12:14]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:12:15]                 │ debg Find.allByCssSelector('.euiFilterSelectItem[title^="@timestamp"]') with timeout=2500
[00:12:15]                 │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:12:15]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:12:17]                 │ debg --- retry.tryForTime error: [data-test-subj~="comboBoxOptionsList"] is not displayed
[00:12:18]                 │ debg lensPage.configureDimension([object Object])
[00:12:18]                 │ debg Find.clickByCssSelector('[data-test-subj="lnsXY_yDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:12:18]                 │ debg Find.findByCssSelector('[data-test-subj="lnsXY_yDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:12:18]                 │ debg Find.clickByCssSelector('[data-test-subj="lns-indexPatternDimensionIncompatible-avg"],
[00:12:18]                 │                [data-test-subj="lns-indexPatternDimension-avg"]') with timeout=10000
[00:12:18]                 │ debg Find.findByCssSelector('[data-test-subj="lns-indexPatternDimensionIncompatible-avg"],
[00:12:18]                 │                [data-test-subj="lns-indexPatternDimension-avg"]') with timeout=10000
[00:12:18]                 │ debg TestSubjects.find(indexPattern-dimension-field)
[00:12:18]                 │ debg Find.findByCssSelector('[data-test-subj="indexPattern-dimension-field"]') with timeout=10000
[00:12:18]                 │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:12:18]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:12:21]                 │ debg --- retry.tryForTime error: [data-test-subj~="comboBoxOptionsList"] is not displayed
[00:12:21]                 │ warn WebElementWrapper.find: stale element reference: element is not attached to the page document
[00:12:21]                 │        (Session info: headless chrome=83.0.4103.116)
[00:12:21]                 │ debg finding element 'By(css selector, [data-test-subj="indexPattern-dimension-field"])' again, 2 attempts left
[00:12:21]                 │ debg comboBox.setElement, value: bytes
[00:12:21]                 │ debg comboBox.isOptionSelected, value: bytes
[00:12:24]                 │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:12:24]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:12:24]                 │ debg Find.allByCssSelector('.euiFilterSelectItem[title^="bytes"]') with timeout=2500
[00:12:24]                 │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:12:24]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:12:27]                 │ debg --- retry.tryForTime error: [data-test-subj~="comboBoxOptionsList"] is not displayed
[00:12:27]                 │ debg lensPage.configureDimension([object Object])
[00:12:27]                 │ debg Find.clickByCssSelector('[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:12:27]                 │ debg Find.findByCssSelector('[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:12:28]                 │ debg Find.clickByCssSelector('[data-test-subj="lns-indexPatternDimensionIncompatible-terms"],
[00:12:28]                 │                [data-test-subj="lns-indexPatternDimension-terms"]') with timeout=10000
[00:12:28]                 │ debg Find.findByCssSelector('[data-test-subj="lns-indexPatternDimensionIncompatible-terms"],
[00:12:28]                 │                [data-test-subj="lns-indexPatternDimension-terms"]') with timeout=10000
[00:12:28]                 │ debg TestSubjects.find(indexPattern-dimension-field)
[00:12:28]                 │ debg Find.findByCssSelector('[data-test-subj="indexPattern-dimension-field"]') with timeout=10000
[00:12:28]                 │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:12:28]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:12:30]                 │ debg --- retry.tryForTime error: [data-test-subj~="comboBoxOptionsList"] is not displayed
[00:12:31]                 │ warn WebElementWrapper.find: stale element reference: element is not attached to the page document
[00:12:31]                 │        (Session info: headless chrome=83.0.4103.116)
[00:12:31]                 │ debg finding element 'By(css selector, [data-test-subj="indexPattern-dimension-field"])' again, 2 attempts left
[00:12:31]                 │ debg comboBox.setElement, value: @message.raw
[00:12:31]                 │ debg comboBox.isOptionSelected, value: @message.raw
[00:12:33]                 │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:12:33]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:12:33]                 │ debg Find.allByCssSelector('.euiFilterSelectItem[title^="@message.raw"]') with timeout=2500
[00:12:34]                 │ debg TestSubjects.exists(~comboBoxOptionsList)
[00:12:34]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="comboBoxOptionsList"]') with timeout=2500
[00:12:36]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594319030245622102] [.async-search] creating index, cause [api], templates [], shards [1]/[1]
[00:12:36]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594319030245622102] updating number_of_replicas to [0] for indices [.async-search]
[00:12:36]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594319030245622102] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.async-search][0]]])." previous.health="YELLOW" reason="shards started [[.async-search][0]]"
[00:12:36]                 │ debg --- retry.tryForTime error: [data-test-subj~="comboBoxOptionsList"] is not displayed
[00:12:37]                 │ debg lensPage.switchToVisualization('lnsChartSwitchPopover_lnsDatatable')
[00:12:37]                 │ debg TestSubjects.click(lnsChartSwitchPopover)
[00:12:37]                 │ debg Find.clickByCssSelector('[data-test-subj="lnsChartSwitchPopover"]') with timeout=10000
[00:12:37]                 │ debg Find.findByCssSelector('[data-test-subj="lnsChartSwitchPopover"]') with timeout=10000
[00:12:37]                 │ debg TestSubjects.click(lnsChartSwitchPopover_lnsDatatable)
[00:12:37]                 │ debg Find.clickByCssSelector('[data-test-subj="lnsChartSwitchPopover_lnsDatatable"]') with timeout=10000
[00:12:37]                 │ debg Find.findByCssSelector('[data-test-subj="lnsChartSwitchPopover_lnsDatatable"]') with timeout=10000
[00:12:37]                 │ debg lensPage.removeDimension('lnsDatatable_column')
[00:12:37]                 │ debg Find.clickByCssSelector('[data-test-subj="lnsDatatable_column"] [data-test-subj="indexPattern-dimensionPopover-remove"]') with timeout=10000
[00:12:37]                 │ debg Find.findByCssSelector('[data-test-subj="lnsDatatable_column"] [data-test-subj="indexPattern-dimensionPopover-remove"]') with timeout=10000
[00:12:37]                 │ debg lensPage.switchToVisualization('lnsChartSwitchPopover_bar_stacked')
[00:12:37]                 │ debg TestSubjects.click(lnsChartSwitchPopover)
[00:12:37]                 │ debg Find.clickByCssSelector('[data-test-subj="lnsChartSwitchPopover"]') with timeout=10000
[00:12:37]                 │ debg Find.findByCssSelector('[data-test-subj="lnsChartSwitchPopover"]') with timeout=10000
[00:12:38]                 │ debg TestSubjects.click(lnsChartSwitchPopover_bar_stacked)
[00:12:38]                 │ debg Find.clickByCssSelector('[data-test-subj="lnsChartSwitchPopover_bar_stacked"]') with timeout=10000
[00:12:38]                 │ debg Find.findByCssSelector('[data-test-subj="lnsChartSwitchPopover_bar_stacked"]') with timeout=10000
[00:12:38]                 │ debg lensPage.configureDimension([object Object])
[00:12:38]                 │ debg Find.clickByCssSelector('[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:12:38]                 │ debg Find.findByCssSelector('[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:12:48]                 │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"])
[00:12:48]                 │      Wait timed out after 10022ms
[00:12:48]                 │ debg Find.findByCssSelector('[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:12:58]                 │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"])
[00:12:58]                 │      Wait timed out after 10017ms
[00:12:59]                 │ debg Find.findByCssSelector('[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:13:09]                 │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"])
[00:13:09]                 │      Wait timed out after 10023ms
[00:13:09]                 │ debg Find.findByCssSelector('[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:13:19]                 │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"])
[00:13:19]                 │      Wait timed out after 10057ms
[00:13:20]                 │ debg Find.findByCssSelector('[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:13:30]                 │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"])
[00:13:30]                 │      Wait timed out after 10030ms
[00:13:30]                 │ debg Find.findByCssSelector('[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:13:40]                 │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"])
[00:13:40]                 │      Wait timed out after 10045ms
[00:13:41]                 │ debg Find.findByCssSelector('[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:13:51]                 │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"])
[00:13:51]                 │      Wait timed out after 10051ms
[00:13:52]                 │ debg Find.findByCssSelector('[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:14:02]                 │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"])
[00:14:02]                 │      Wait timed out after 10017ms
[00:14:02]                 │ debg Find.findByCssSelector('[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:14:12]                 │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"])
[00:14:12]                 │      Wait timed out after 10031ms
[00:14:13]                 │ debg Find.findByCssSelector('[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:14:23]                 │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"])
[00:14:23]                 │      Wait timed out after 10032ms
[00:14:23]                 │ debg Find.findByCssSelector('[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:14:33]                 │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"])
[00:14:33]                 │      Wait timed out after 10024ms
[00:14:34]                 │ debg Find.findByCssSelector('[data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"]') with timeout=10000
[00:14:44]                 │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"])
[00:14:44]                 │      Wait timed out after 10009ms
[00:14:44]                 │ info Taking screenshot "/dev/shm/workspace/kibana/x-pack/test/functional/screenshots/failure/lens app  lens smokescreen tests should allow creation of lens visualizations.png"
[00:14:44]                 │ info Current URL is: http://localhost:6151/app/lens#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:%272015-09-19T06:31:44.000Z%27,to:%272015-09-23T18:31:44.000Z%27))
[00:14:44]                 │ info Saving page source to: /dev/shm/workspace/kibana/x-pack/test/functional/failure_debug/html/lens app  lens smokescreen tests should allow creation of lens visualizations.html
[00:14:44]                 └- ✖ fail: "lens app  lens smokescreen tests should allow creation of lens visualizations"
[00:14:44]                 │

Stack Trace

Error: retry.try timeout: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="lnsXY_splitDimensionPanel"] [data-test-subj="lns-empty-dimension"])
Wait timed out after 10009ms
    at /dev/shm/workspace/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at onFailure (/dev/shm/workspace/kibana/test/common/services/retry/retry_for_success.ts:28:9)
    at retryForSuccess (/dev/shm/workspace/kibana/test/common/services/retry/retry_for_success.ts:68:13)

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
enterpriseSearch 41 +41 -

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@cee-chen
Copy link
Member Author

cee-chen commented Jul 9, 2020

it's happening!!

😱

@cee-chen cee-chen merged commit f7b5144 into elastic:master Jul 9, 2020
cee-chen pushed a commit to cee-chen/kibana that referenced this pull request Jul 9, 2020
* Initial App Search in Kibana plugin work

- Initializes a new platform plugin that ships out of the box w/ x-pack
- Contains a very basic front-end that shows AS engines, error states, or a Setup Guide
- Contains a very basic server that remotely calls the AS internal engines API and returns results

* Update URL casing to match Kibana best practices

- URL casing appears to be snake_casing, but kibana.json casing appears to be camelCase

* Register App Search plugin in Home Feature Catalogue

* Add custom App Search in Kibana logo

- I haven't had much success in surfacing a SVG file via a server-side endpoint/URL, but then I realized EuiIcon supports passing in a ReactElement directly. Woo!

* Fix appSearch.host config setting to be optional

- instead of crashing folks on load

* Rename plugin to Enterprise Search

- per product decision, URL should be enterprise_search/app_search and Workplace Search should also eventually live here
- reorganize folder structure in anticipation for another workplace_search plugin/codebase living alongside app_search
- rename app.tsx/main.tsx to a standard top-level index.tsx (which will contain top-level routes/state)
- rename AS->ES files/vars where applicable
- TODO: React Router

* Set up React Router URL structure

* Convert showSetupGuide action/flag to a React Router link

- remove showSetupGuide flag
- add a new shared helper component for combining EuiButton/EuiLink with React Router behavior (https://github.com/elastic/eui/blob/master/wiki/react-router.md#react-router-51)

* Implement Kibana Chrome breadcrumbs

- create shared helper (WS will presumably also want this) for generating EUI breadcrumb objects with React Router links+click behavior
- create React component that calls chrome.setBreadcrumbs on page mount
- clean up type definitions - move app-wide props to IAppSearchProps and update most pages/views to simply import it instead of calling their own definitions

* Added server unit tests (#2)

* Added unit test for server

* PR Feedback

* Refactor top-level Kibana props to a global context state

- rather them passing them around verbosely as props, the components that need them should be able to call the useContext hook

+ Remove IAppSearchProps in favor of IKibanaContext

+ Also rename `appSearchUrl` to `enterpriseSearchUrl`, since this context will contained shared/Kibana-wide values/actions useful to both AS and WS

* Added unit tests for public (#4)

* application.test.ts

* Added Unit Test for EngineOverviewHeader

* Added Unit Test for generate_breadcrumbs

* Added Unit Test for set_breadcrumb.tsx

* Added a unit test for link_events

- Also changed link_events.tsx to link_events.ts since it's just TS, no
React
- Modified letBrowserHandleEvent so it will still return a false
boolean when target is blank

* Betterize these tests

Co-Authored-By: Constance <constancecchen@users.noreply.github.com>

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Add UI telemetry tracking to AS in Kibana (#5)

* Set up Telemetry usageCollection, savedObjects, route, & shared helper

- The Kibana UsageCollection plugin handles collecting our telemetry UI data (views, clicks, errors, etc.) and pushing it to elastic's telemetry servers
- That data is stored in incremented in Kibana's savedObjects lib/plugin (as well as mapped)
- When an end-user hits a certain view or action, the shared helper will ping the app search telemetry route which increments the savedObject store

* Update client-side views/links to new shared telemetry helper

* Write tests for new telemetry files

* Implement remaining unit tests (#7)

* Write tests for React Router+EUI helper components

* Update generate_breadcrumbs test

- add test suite for generateBreadcrumb() itself (in order to cover a missing branch)
- minor lint fixes
- remove unnecessary import from set_breadcrumbs test

* Write test for get_username util

+ update test to return a more consistent falsey value (null)

* Add test for SetupGuide

* [Refactor] Pull out various Kibana context mocks into separate files

- I'm creating a reusable useContext mock for shallow()ed enzyme components
+ add more documentation comments + examples

* Write tests for empty state components

+ test new usecontext shallow mock

* Empty state components: Add extra getUserName branch test

* Write test for app search index/routes

* Write tests for engine overview table

+ fix bonus bug

* Write Engine Overview tests

+ Update EngineOverview logic to account for issues found during tests :)
  - Move http to async/await syntax instead of promise syntax (works better with existing HttpServiceMock jest.fn()s)
  - hasValidData wasn't strict enough in type checking/object nest checking and was causing the app itself to crash (no bueno)

* Refactor EngineOverviewHeader test to use shallow + to full coverage

- missed adding this test during telemetry work
- switching to shallow and beforeAll reduces the test time from 5s to 4s!

* [Refactor] Pull out React Router history mocks into a test util helper

+ minor refactors/updates

* Add small tests to increase branch coverage

- mostly testing fallbacks or removing fallbacks in favor of strict type interface
- these are slightly obsessive so I'd also be fine ditching them if they aren't terribly valuable

* Address larger tech debt/TODOs (#8)

* Fix optional chaining TODO

- turns out my local Prettier wasn't up to date, completely my bad

* Fix constants TODO

- adds a common folder/architecture for others to use in the future

* Remove TODO for eslint-disable-line and specify lint rule being skipped

- hopefully that's OK for review, I can't think of any other way to sanely do this without re-architecting the entire file or DDoSing our API

* Add server-side logging to route dependencies

+ add basic example of error catching/logging to Telemetry route
+ [extra] refactor mockResponseFactory name to something slightly easier to read

* Move more Engines Overview API logic/logging to server-side

- handle data validation in the server-side
- wrap server-side API in a try/catch to account for fetch issues
- more correctly return 2xx/4xx statuses and more correctly deal with those responses in the front-end
- Add server info/error/debug logs (addresses TODO)
- Update tests + minor refactors/cleanup
    - remove expectResponseToBe200With helper (since we're now returning multiple response types) and instead make mockResponse var name more readable
    - one-line header auth
    - update tests with example error logs
    - update schema validation for `type` to be an enum of `indexed`/`meta` (more accurately reflecting API)

* Per telemetry team feedback, rename usageCollection telemetry mapping name to simpler 'app_search'

- since their mapping already nests under 'kibana.plugins'
- note: I left the savedObjects name with the '_telemetry' suffix, as there very well may be a use case for top-level generic 'app_search' saved objects

* Update Setup Guide installation instructions (#9)

Co-authored-by: Chris Cressman <chris@chriscressman.com>

* [Refactor] DRY out route test helper

* [Refactor] Rename public/test_utils to public/__mocks__

- to better follow/use jest setups and for .mock.ts suffixes

* Add platinum licensing check to Meta Engines table/call (#11)

* Licensing plugin setup

* Add LicensingContext setup

* Update EngineOverview to not hit meta engines API on platinum license

* Add Jest test helpers for future shallow/context use

* Update plugin to use new Kibana nav + URL update (#12)

* Update new nav categories to add Enterprise Search + update plugin to use new category

- per @johnbarrierwilson and Matt Riley, Enterprise Search should be under Kibana and above Observability
- Run `node scripts/check_published_api_changes.js --accept` since this new category affects public API

* [URL UPDATE] Change '/app/enterprise_search/app_search' to '/app/app_search'

- This needs to be done because App Search and Workplace search *have* to be registered as separate plugins to have 2 distinct nav links
- Currently Kibana doesn't support nested app names (see: elastic#59190) but potentially will in the future

- To support this change, we need to update applications/index.tsx to NOT handle '/app/enterprise_search' level routing, but instead accept an async imported app component (e.g. AppSearch, WorkplaceSearch).
- AppSearch should now treat its router as root '/' instead of '/app_search'

- (Addl) Per Josh Dover's recommendation, switch to `<Router history={params.history}>` from `<BrowserRouter basename={params.appBasePath}>` since they're deprecating appBasePath

* Update breadcrumbs helper to account for new URLs

- Remove path for Enterprise Search breadcrumb, since '/app/enterprise_search' will not link anywhere meaningful for the foreseeable future, so the Enterprise Search root should not go anywhere
- Update App Search helper to go to root path, per new React Router setup

Test changes:
- Mock custom basepath for App Search tests
- Swap enterpriseSearchBreadcrumbs and appSearchBreadcrumbs test order (since the latter overrides the default mock)

* Add create_first_engine_button telemetry tracking to EmptyState

* Switch plugin URLs back to /app/enterprise_search/app_search

Now that elastic#66455 has been merged in 🎉

* Add i18n formatted messages / translations (#13)

* Add i18n provider and formatted/i18n translated messages

* Update tests to account for new I18nProvider context + FormattedMessage components

- Add new mountWithContext helper that provides all contexts+providers used in top-level app
- Add new shallowWithIntl helper for shallow() components that dive into FormattedMessage

* Format i18n dates and numbers

+ update some mock tests to not throw react-intl invalid date messages

* Update EngineOverviewHeader to disable button on prop

* Address review feedback (#14)

* Fix Prettier linting issues

* Escape App Search API endpoint URLs

- per PR feedback
- querystring should automatically encodeURIComponent / escape query param strings

* Update server plugin.ts to use getStartServices() rather than storing local references from start()

- Per feedback: https://github.com/elastic/kibana/blob/master/src/core/CONVENTIONS.md#applications

- Note: savedObjects.registerType needs to be outside of getStartServices, or an error is thrown

- Side update to registerTelemetryUsageCollector to simplify args

- Update/fix tests to account for changes

* E2E testing (#6)

* Wired up basics for E2E testing

* Added version with App Search

* Updated naming

* Switched configuration around

* Added concept of 'fixtures'

* Figured out how to log in as the enterprise_search user

* Refactored to use an App Search service

* Added some real tests

* Added a README

* Cleanup

* More cleanup

* Error handling + README updatre

* Removed unnecessary files

* Apply suggestions from code review

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_table.tsx

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* PR feedback - updated README

* Additional lint fixes

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Add README and CODEOWNERS (#15)

* Add plugin README and CODEOWNERS

* Fix Typescript errors (#16)

* Fix public mocks

* Fix empty states types

* Fix engine table component errors

* Fix engine overview component errors

* Fix setup guide component errors

- SetBreadcrumbs will be fixed in a separate commit

* Fix App Search index errors

* Fix engine overview header component errors

* Fix applications context index errors

* Fix kibana breadcrumb helper errors

* Fix license helper errors

* ❗ Refactor React Router EUI link/button helpers
- in order to fix typescript errors

- this changes the component logic significantly to a react render prop, so that the Link and Button components can have different types - however, end behavior should still remain the same

* Fix telemetry helper errors

* Minor unused var cleanup in plugin files

* Fix telemetry collector/savedobjects errors

* Fix MockRouter type errors and add IRouteDependencies export

- routes will use IRouteDependencies in the next few commits

* Fix engines route errors

* Fix telemetry route errors

* Remove any type from source code

- thanks to Scotty for the inspiration

* Add eslint rules for Enterprise Search plugin

- Add checks for type any, but only on non-test files
- Disable react-hooks/exhaustive-deps, since we're already disabling it in a few files and other plugins also have it turned off

* Cover uncovered lines in engines_table and telemetry tests

* Fixed TS warnings in E2E tests (#17)

* Feedback: Convert static CSS values to EUI variables where possible

* Feedback: Flatten nested CSS where possible

- Prefer setting CSS class overrides on individual EUI components, not on a top-level page

+ Change CSS class casing from kebab-case to camelCase to better match EUI/Kibana

+ Remove unnecessary .euiPageContentHeader margin-bottom override by changing the panelPaddingSize of euiPageContent

+ Decrease engine overview table padding on mobile

* Refactor out components shared with Workplace Search (#18)

* Move getUserName helper to shared

- in preparation for Workplace Search plugin also using this helper

* Move Setup Guide layout to a shared component

* Setup Guide: add extra props for standard/native auth links

Note: It's possible this commit may be unnecessary if we can publish shared Enterprise Search security mode docs

* Update copy per feedback from copy team

* Address various telemetry issues

- saved objects: removing indexing per elastic#43673
- add schema and generate json per elastic#64942
- move definitions over to collectors since saved objects is mostly empty at this point, and schema throws an error when it imports an obj instead of being defined inline
- istanbul ignore saved_objects file since it doesn't have anything meaningful to test but was affecting code coverage

* Disable plugin access if a normal user does not have access to App Search (#19)

* Set up new server security dependency and configs

* Set up access capabilities

* Set up checkAccess helper/caller

* Remove NoUserState component from the public UI

- Since this is now being handled by checkAccess / normal users should never see the plugin at all if they don't have an account/access, the component is no longer needed

* Update server routes to account for new changes

- Remove login redirect catch from routes, since the access helper should now handle that for most users by disabling the plugin (superusers will see a generic cannot connect/error screen)
- Refactor out new config values to a shared mock

* Refactor Enterprise Search http call to hit/return new internal API endpoint

+ pull out the http call to a separate library for upcoming public URL work (so that other files can call it directly as well)

* [Discussion] Increase timeout but add another warning timeout for slow servers

- per recommendation/convo with Brandon

* Register feature control

* Remove no_as_account from UI telemetry

- since we're no longer tracking that in the UI

* Address PR feedback - isSuperUser check

* Public URL support for Elastic Cloud (#21)

* Add server-side public URL route

- Per feedback from Kibana platform team, it's not possible to pass info from server/ to public/ without a HTTP call :[

* Update MockRouter for routes without any payload/params

* Add client-side helper for calling the new public URL API

+ API seems to return a URL a trailing slash, which we need to omit

* Update public/plugin.ts to check and set a public URL

- relies on this.hasCheckedPublicUrl to only make the call once per page load instead of on every page nav

* Fix failing feature control tests

- Split up scenario cases as needed
- Add plugin as an exception alongside ML & Monitoring

* Address PR feedback

- version: kibana
- copy edits
- Sass vars
- code cleanup

* Casing feedback: change all plugin registration IDs from snake_case to camelCase

- note: current remainng snake_case exceptions are telemetry keys
- file names and api endpoints are snake_case per conventions

* Misc security feedback

- remove set
- remove unnecessary capabilities registration
- telemetry namespace agnostic

* Security feedback: add warn logging to telemetry collector

see elastic#66922 (comment)
- add if statement
- pass log dependency around (this is kinda medium, should maybe refactor)
- update tests
- move test file comment to the right file (was meant for telemetry route file)

* Address feedback from Pierre

- Remove unnecessary ServerConfigType
- Remove unnecessary uiCapabilities
- Move registerTelemetryRoute / SavedObjectsServiceStart workaround
- Remove unnecessary license optional chaining

* PR feedback

Address type/typos

* Fix telemetry API call returning 415 on Chrome

- I can't even?? I swear charset=utf-8 fixed the same error a few weeks ago

* Fix failing tests

* Update Enterprise Search functional tests (without host) to run on CI

- Fix incorrect navigateToApp slug (hadn't realized this was a URL, not an ID)
- Update without_host_configured tests to run without API key
- Update README

* Address PR feedback from Pierre

- remove unnecessary authz?
- remove unnecessary content-type json headers
- add loggingSystemMock.collect(mockLogger).error assertion
- reconstrcut new MockRouter on beforeEach for better sandboxing
- fix incorrect describe()s -should be it()
- pull out reusable mockDependencies helper (renamed/extended from mockConfig) for tests that don't particularly use config/log but still want to pass type definitions
- Fix comment copy

Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
Co-authored-by: Chris Cressman <chris@chriscressman.com>
Co-authored-by: scottybollinger <scotty.bollinger@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	.github/CODEOWNERS
#	x-pack/scripts/functional_tests.js
cee-chen pushed a commit that referenced this pull request Jul 9, 2020
* Initial App Search in Kibana plugin work

- Initializes a new platform plugin that ships out of the box w/ x-pack
- Contains a very basic front-end that shows AS engines, error states, or a Setup Guide
- Contains a very basic server that remotely calls the AS internal engines API and returns results

* Update URL casing to match Kibana best practices

- URL casing appears to be snake_casing, but kibana.json casing appears to be camelCase

* Register App Search plugin in Home Feature Catalogue

* Add custom App Search in Kibana logo

- I haven't had much success in surfacing a SVG file via a server-side endpoint/URL, but then I realized EuiIcon supports passing in a ReactElement directly. Woo!

* Fix appSearch.host config setting to be optional

- instead of crashing folks on load

* Rename plugin to Enterprise Search

- per product decision, URL should be enterprise_search/app_search and Workplace Search should also eventually live here
- reorganize folder structure in anticipation for another workplace_search plugin/codebase living alongside app_search
- rename app.tsx/main.tsx to a standard top-level index.tsx (which will contain top-level routes/state)
- rename AS->ES files/vars where applicable
- TODO: React Router

* Set up React Router URL structure

* Convert showSetupGuide action/flag to a React Router link

- remove showSetupGuide flag
- add a new shared helper component for combining EuiButton/EuiLink with React Router behavior (https://github.com/elastic/eui/blob/master/wiki/react-router.md#react-router-51)

* Implement Kibana Chrome breadcrumbs

- create shared helper (WS will presumably also want this) for generating EUI breadcrumb objects with React Router links+click behavior
- create React component that calls chrome.setBreadcrumbs on page mount
- clean up type definitions - move app-wide props to IAppSearchProps and update most pages/views to simply import it instead of calling their own definitions

* Added server unit tests (#2)

* Added unit test for server

* PR Feedback

* Refactor top-level Kibana props to a global context state

- rather them passing them around verbosely as props, the components that need them should be able to call the useContext hook

+ Remove IAppSearchProps in favor of IKibanaContext

+ Also rename `appSearchUrl` to `enterpriseSearchUrl`, since this context will contained shared/Kibana-wide values/actions useful to both AS and WS

* Added unit tests for public (#4)

* application.test.ts

* Added Unit Test for EngineOverviewHeader

* Added Unit Test for generate_breadcrumbs

* Added Unit Test for set_breadcrumb.tsx

* Added a unit test for link_events

- Also changed link_events.tsx to link_events.ts since it's just TS, no
React
- Modified letBrowserHandleEvent so it will still return a false
boolean when target is blank

* Betterize these tests

Co-Authored-By: Constance <constancecchen@users.noreply.github.com>

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Add UI telemetry tracking to AS in Kibana (#5)

* Set up Telemetry usageCollection, savedObjects, route, & shared helper

- The Kibana UsageCollection plugin handles collecting our telemetry UI data (views, clicks, errors, etc.) and pushing it to elastic's telemetry servers
- That data is stored in incremented in Kibana's savedObjects lib/plugin (as well as mapped)
- When an end-user hits a certain view or action, the shared helper will ping the app search telemetry route which increments the savedObject store

* Update client-side views/links to new shared telemetry helper

* Write tests for new telemetry files

* Implement remaining unit tests (#7)

* Write tests for React Router+EUI helper components

* Update generate_breadcrumbs test

- add test suite for generateBreadcrumb() itself (in order to cover a missing branch)
- minor lint fixes
- remove unnecessary import from set_breadcrumbs test

* Write test for get_username util

+ update test to return a more consistent falsey value (null)

* Add test for SetupGuide

* [Refactor] Pull out various Kibana context mocks into separate files

- I'm creating a reusable useContext mock for shallow()ed enzyme components
+ add more documentation comments + examples

* Write tests for empty state components

+ test new usecontext shallow mock

* Empty state components: Add extra getUserName branch test

* Write test for app search index/routes

* Write tests for engine overview table

+ fix bonus bug

* Write Engine Overview tests

+ Update EngineOverview logic to account for issues found during tests :)
  - Move http to async/await syntax instead of promise syntax (works better with existing HttpServiceMock jest.fn()s)
  - hasValidData wasn't strict enough in type checking/object nest checking and was causing the app itself to crash (no bueno)

* Refactor EngineOverviewHeader test to use shallow + to full coverage

- missed adding this test during telemetry work
- switching to shallow and beforeAll reduces the test time from 5s to 4s!

* [Refactor] Pull out React Router history mocks into a test util helper

+ minor refactors/updates

* Add small tests to increase branch coverage

- mostly testing fallbacks or removing fallbacks in favor of strict type interface
- these are slightly obsessive so I'd also be fine ditching them if they aren't terribly valuable

* Address larger tech debt/TODOs (#8)

* Fix optional chaining TODO

- turns out my local Prettier wasn't up to date, completely my bad

* Fix constants TODO

- adds a common folder/architecture for others to use in the future

* Remove TODO for eslint-disable-line and specify lint rule being skipped

- hopefully that's OK for review, I can't think of any other way to sanely do this without re-architecting the entire file or DDoSing our API

* Add server-side logging to route dependencies

+ add basic example of error catching/logging to Telemetry route
+ [extra] refactor mockResponseFactory name to something slightly easier to read

* Move more Engines Overview API logic/logging to server-side

- handle data validation in the server-side
- wrap server-side API in a try/catch to account for fetch issues
- more correctly return 2xx/4xx statuses and more correctly deal with those responses in the front-end
- Add server info/error/debug logs (addresses TODO)
- Update tests + minor refactors/cleanup
    - remove expectResponseToBe200With helper (since we're now returning multiple response types) and instead make mockResponse var name more readable
    - one-line header auth
    - update tests with example error logs
    - update schema validation for `type` to be an enum of `indexed`/`meta` (more accurately reflecting API)

* Per telemetry team feedback, rename usageCollection telemetry mapping name to simpler 'app_search'

- since their mapping already nests under 'kibana.plugins'
- note: I left the savedObjects name with the '_telemetry' suffix, as there very well may be a use case for top-level generic 'app_search' saved objects

* Update Setup Guide installation instructions (#9)

Co-authored-by: Chris Cressman <chris@chriscressman.com>

* [Refactor] DRY out route test helper

* [Refactor] Rename public/test_utils to public/__mocks__

- to better follow/use jest setups and for .mock.ts suffixes

* Add platinum licensing check to Meta Engines table/call (#11)

* Licensing plugin setup

* Add LicensingContext setup

* Update EngineOverview to not hit meta engines API on platinum license

* Add Jest test helpers for future shallow/context use

* Update plugin to use new Kibana nav + URL update (#12)

* Update new nav categories to add Enterprise Search + update plugin to use new category

- per @johnbarrierwilson and Matt Riley, Enterprise Search should be under Kibana and above Observability
- Run `node scripts/check_published_api_changes.js --accept` since this new category affects public API

* [URL UPDATE] Change '/app/enterprise_search/app_search' to '/app/app_search'

- This needs to be done because App Search and Workplace search *have* to be registered as separate plugins to have 2 distinct nav links
- Currently Kibana doesn't support nested app names (see: #59190) but potentially will in the future

- To support this change, we need to update applications/index.tsx to NOT handle '/app/enterprise_search' level routing, but instead accept an async imported app component (e.g. AppSearch, WorkplaceSearch).
- AppSearch should now treat its router as root '/' instead of '/app_search'

- (Addl) Per Josh Dover's recommendation, switch to `<Router history={params.history}>` from `<BrowserRouter basename={params.appBasePath}>` since they're deprecating appBasePath

* Update breadcrumbs helper to account for new URLs

- Remove path for Enterprise Search breadcrumb, since '/app/enterprise_search' will not link anywhere meaningful for the foreseeable future, so the Enterprise Search root should not go anywhere
- Update App Search helper to go to root path, per new React Router setup

Test changes:
- Mock custom basepath for App Search tests
- Swap enterpriseSearchBreadcrumbs and appSearchBreadcrumbs test order (since the latter overrides the default mock)

* Add create_first_engine_button telemetry tracking to EmptyState

* Switch plugin URLs back to /app/enterprise_search/app_search

Now that #66455 has been merged in 🎉

* Add i18n formatted messages / translations (#13)

* Add i18n provider and formatted/i18n translated messages

* Update tests to account for new I18nProvider context + FormattedMessage components

- Add new mountWithContext helper that provides all contexts+providers used in top-level app
- Add new shallowWithIntl helper for shallow() components that dive into FormattedMessage

* Format i18n dates and numbers

+ update some mock tests to not throw react-intl invalid date messages

* Update EngineOverviewHeader to disable button on prop

* Address review feedback (#14)

* Fix Prettier linting issues

* Escape App Search API endpoint URLs

- per PR feedback
- querystring should automatically encodeURIComponent / escape query param strings

* Update server plugin.ts to use getStartServices() rather than storing local references from start()

- Per feedback: https://github.com/elastic/kibana/blob/master/src/core/CONVENTIONS.md#applications

- Note: savedObjects.registerType needs to be outside of getStartServices, or an error is thrown

- Side update to registerTelemetryUsageCollector to simplify args

- Update/fix tests to account for changes

* E2E testing (#6)

* Wired up basics for E2E testing

* Added version with App Search

* Updated naming

* Switched configuration around

* Added concept of 'fixtures'

* Figured out how to log in as the enterprise_search user

* Refactored to use an App Search service

* Added some real tests

* Added a README

* Cleanup

* More cleanup

* Error handling + README updatre

* Removed unnecessary files

* Apply suggestions from code review

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/engine_overview/engine_table.tsx

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* PR feedback - updated README

* Additional lint fixes

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Add README and CODEOWNERS (#15)

* Add plugin README and CODEOWNERS

* Fix Typescript errors (#16)

* Fix public mocks

* Fix empty states types

* Fix engine table component errors

* Fix engine overview component errors

* Fix setup guide component errors

- SetBreadcrumbs will be fixed in a separate commit

* Fix App Search index errors

* Fix engine overview header component errors

* Fix applications context index errors

* Fix kibana breadcrumb helper errors

* Fix license helper errors

* ❗ Refactor React Router EUI link/button helpers
- in order to fix typescript errors

- this changes the component logic significantly to a react render prop, so that the Link and Button components can have different types - however, end behavior should still remain the same

* Fix telemetry helper errors

* Minor unused var cleanup in plugin files

* Fix telemetry collector/savedobjects errors

* Fix MockRouter type errors and add IRouteDependencies export

- routes will use IRouteDependencies in the next few commits

* Fix engines route errors

* Fix telemetry route errors

* Remove any type from source code

- thanks to Scotty for the inspiration

* Add eslint rules for Enterprise Search plugin

- Add checks for type any, but only on non-test files
- Disable react-hooks/exhaustive-deps, since we're already disabling it in a few files and other plugins also have it turned off

* Cover uncovered lines in engines_table and telemetry tests

* Fixed TS warnings in E2E tests (#17)

* Feedback: Convert static CSS values to EUI variables where possible

* Feedback: Flatten nested CSS where possible

- Prefer setting CSS class overrides on individual EUI components, not on a top-level page

+ Change CSS class casing from kebab-case to camelCase to better match EUI/Kibana

+ Remove unnecessary .euiPageContentHeader margin-bottom override by changing the panelPaddingSize of euiPageContent

+ Decrease engine overview table padding on mobile

* Refactor out components shared with Workplace Search (#18)

* Move getUserName helper to shared

- in preparation for Workplace Search plugin also using this helper

* Move Setup Guide layout to a shared component

* Setup Guide: add extra props for standard/native auth links

Note: It's possible this commit may be unnecessary if we can publish shared Enterprise Search security mode docs

* Update copy per feedback from copy team

* Address various telemetry issues

- saved objects: removing indexing per #43673
- add schema and generate json per #64942
- move definitions over to collectors since saved objects is mostly empty at this point, and schema throws an error when it imports an obj instead of being defined inline
- istanbul ignore saved_objects file since it doesn't have anything meaningful to test but was affecting code coverage

* Disable plugin access if a normal user does not have access to App Search (#19)

* Set up new server security dependency and configs

* Set up access capabilities

* Set up checkAccess helper/caller

* Remove NoUserState component from the public UI

- Since this is now being handled by checkAccess / normal users should never see the plugin at all if they don't have an account/access, the component is no longer needed

* Update server routes to account for new changes

- Remove login redirect catch from routes, since the access helper should now handle that for most users by disabling the plugin (superusers will see a generic cannot connect/error screen)
- Refactor out new config values to a shared mock

* Refactor Enterprise Search http call to hit/return new internal API endpoint

+ pull out the http call to a separate library for upcoming public URL work (so that other files can call it directly as well)

* [Discussion] Increase timeout but add another warning timeout for slow servers

- per recommendation/convo with Brandon

* Register feature control

* Remove no_as_account from UI telemetry

- since we're no longer tracking that in the UI

* Address PR feedback - isSuperUser check

* Public URL support for Elastic Cloud (#21)

* Add server-side public URL route

- Per feedback from Kibana platform team, it's not possible to pass info from server/ to public/ without a HTTP call :[

* Update MockRouter for routes without any payload/params

* Add client-side helper for calling the new public URL API

+ API seems to return a URL a trailing slash, which we need to omit

* Update public/plugin.ts to check and set a public URL

- relies on this.hasCheckedPublicUrl to only make the call once per page load instead of on every page nav

* Fix failing feature control tests

- Split up scenario cases as needed
- Add plugin as an exception alongside ML & Monitoring

* Address PR feedback

- version: kibana
- copy edits
- Sass vars
- code cleanup

* Casing feedback: change all plugin registration IDs from snake_case to camelCase

- note: current remainng snake_case exceptions are telemetry keys
- file names and api endpoints are snake_case per conventions

* Misc security feedback

- remove set
- remove unnecessary capabilities registration
- telemetry namespace agnostic

* Security feedback: add warn logging to telemetry collector

see #66922 (comment)
- add if statement
- pass log dependency around (this is kinda medium, should maybe refactor)
- update tests
- move test file comment to the right file (was meant for telemetry route file)

* Address feedback from Pierre

- Remove unnecessary ServerConfigType
- Remove unnecessary uiCapabilities
- Move registerTelemetryRoute / SavedObjectsServiceStart workaround
- Remove unnecessary license optional chaining

* PR feedback

Address type/typos

* Fix telemetry API call returning 415 on Chrome

- I can't even?? I swear charset=utf-8 fixed the same error a few weeks ago

* Fix failing tests

* Update Enterprise Search functional tests (without host) to run on CI

- Fix incorrect navigateToApp slug (hadn't realized this was a URL, not an ID)
- Update without_host_configured tests to run without API key
- Update README

* Address PR feedback from Pierre

- remove unnecessary authz?
- remove unnecessary content-type json headers
- add loggingSystemMock.collect(mockLogger).error assertion
- reconstrcut new MockRouter on beforeEach for better sandboxing
- fix incorrect describe()s -should be it()
- pull out reusable mockDependencies helper (renamed/extended from mockConfig) for tests that don't particularly use config/log but still want to pass type definitions
- Fix comment copy

Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
Co-authored-by: Chris Cressman <chris@chriscressman.com>
Co-authored-by: scottybollinger <scotty.bollinger@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	.github/CODEOWNERS
#	x-pack/scripts/functional_tests.js
@cee-chen cee-chen deleted the feature/enterprise-search-plugin branch April 29, 2023 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.