[Share Modal] Fix disabled license to not show export tab (#188439)

## Summary

Closes https://github.com/elastic/kibana/issues/184871

This PR adds a check for if the license is disabled for reporting and
does not show the Export tab in the share modal. It might be good to
have a message in the export tab to show the users that they need to
update their license but that might need some feedback from
@elastic/kibana-design. This can be accomplished in another PR but this
PR is just to avoid the nasty error to the users who might be in this
situation.

### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Rachel Shen 2024-07-18 11:44:18 -06:00 committed by GitHub
parent ebc3d14828
commit 4960bb38ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 112 additions and 2 deletions

View file

@ -96,7 +96,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
// open the share menu and check that reporting is disabled
await PageObjects.lens.clickShareModal();
expect(await PageObjects.lens.isShareActionEnabled(`export`));
expect(await testSubjects.exists('export')).to.be(false);
await PageObjects.lens.closeShareModal();
});