-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Endpoint] Policy List UI route and initial view #56918
Changes from 1 commit
7b91e2f
4822fd2
91db958
9e29674
9a45a8c
5cc2f9d
ad57e4c
515099e
c2f1769
ab82e1d
e656b0c
e3675c1
01a5e2e
8c66c60
a735e16
c04f61f
1cb9d2c
8e18b5a
0492ff9
f296fd5
ee6aa46
438cb77
5d09b57
da416d4
d7c9ea4
a1b5a77
cd5488d
5d276d1
78bc8b4
8812f32
31676c0
13920fd
2d58030
546a193
b14f88a
15193b1
1fc8d65
04974e1
adfa203
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
import expect from '@kbn/expect'; | ||
import { FtrProviderContext } from '../../ftr_provider_context'; | ||
|
||
export default function({ getPageObjects, getService }: FtrProviderContext) { | ||
const pageObjects = getPageObjects(['common']); | ||
const testSubjects = getService('testSubjects'); | ||
|
||
describe('Endpoint Policy List', () => { | ||
it('Loads the Policy List Page', async () => { | ||
await pageObjects.common.navigateToUrlWithBrowserHistory('endpoint', '/policy'); | ||
await testSubjects.existOrFail('policyViewTitle'); | ||
const policyTitle = await testSubjects.getVisibleText('policyViewTitle'); | ||
expect(policyTitle).to.equal('Policies'); | ||
}); | ||
it('shows policy count total', async () => { | ||
await pageObjects.common.navigateToUrlWithBrowserHistory('endpoint', '/policy'); | ||
const policyTotal = await testSubjects.getVisibleText('policyTotalCount'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this how we look at table values? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. awesome |
||
expect(policyTotal).to.equal('0 Policies'); | ||
}); | ||
it('includes policy list table', async () => { | ||
await pageObjects.common.navigateToUrlWithBrowserHistory('endpoint', '/policy'); | ||
await testSubjects.existOrFail('policyTable'); | ||
}); | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good for an initial set of tests. We will want to leverage the actual page object file and its capabilities in a future PR. After my PR is merged it will be easier to refactor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I might still another test to validate the expected table columns headers are present and display the correct label. Will wait to see again how to use that Table service 😃