Skip to content

Commit

Permalink
adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dosant committed Feb 11, 2021
1 parent b8c7cd7 commit cb9d009
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
kibana: [
{
feature: {
discover: ['all'],
discover: ['read'],
},
spaces: ['*'],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it('should render the "Security" section with API Keys', async () => {
await PageObjects.common.navigateToApp('management');
const sections = await managementMenu.getSections();
expect(sections).to.have.length(1);
expect(sections[0]).to.eql({
expect(sections).to.have.length(2);
expect(sections.find((s) => s.sectionId === 'security')).to.eql({
sectionId: 'security',
sectionLinks: ['users', 'roles', 'api_keys', 'role_mappings'],
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

it('shows discover navlink', async () => {
const navLinks = await appsMenu.readLinks();
expect(navLinks.map((link) => link.text)).to.eql(['Overview', 'Discover']);
expect(navLinks.map((link) => link.text)).to.eql([
'Overview',
'Discover',
'Stack Management', // because `global_discover_all_role` enables search sessions
]);
});

it('shows save button', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it('should render the "Data" section with index management', async () => {
await PageObjects.common.navigateToApp('management');
const sections = await managementMenu.getSections();
expect(sections).to.have.length(1);
expect(sections[0]).to.eql({
expect(sections).to.have.length(2);
expect(sections.find((s) => s.sectionId === 'data')).to.eql({
sectionId: 'data',
sectionLinks: ['index_management', 'transform'],
});
Expand Down

0 comments on commit cb9d009

Please sign in to comment.