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

[Reporting] Re-introduce tests for Canvas & Dashboard's feature declarations when Reporting disables access-by-role #111780

Closed
tsullivan opened this issue Sep 9, 2021 · 6 comments · Fixed by #117443
Labels
bug Fixes for quality problems that affect the customer experience (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort

Comments

@tsullivan
Copy link
Member

tsullivan commented Sep 9, 2021

Reporting configuration is being removed from the functional test server in order to run the tests entirely using reporting's defaults. This means tests with Reporting code that is not yet default needs to be shifted to another test suite.

x-pack/test/reporting_api_integration/reporting_and_security/
This has Reporting API Integration tests that enable feature application controls for Reporting enabled. In this suite of tests, we need to add tests for the APIs that are affected:

  • Licensing, upgrade and downgrade (x-pack/test/api_integration/apis/security/license_downgrade.ts)
  • Application feature capabilities (x-pack/test/api_integration/apis/security/privileges.ts)

x-pack/test/reporting_functional/reporting_and_security/
This has Reporting UI Functional tests that enable feature application controls for Reporting. This suite should have tests that verify the app integration touchpoints that are affected by the setting. (Example: x-pack/test/functional/apps/canvas/reports.ts)

@tsullivan tsullivan added the bug Fixes for quality problems that affect the customer experience label Sep 9, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Sep 9, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-reporting-services (Team:Reporting Services)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Sep 9, 2021
@tsullivan tsullivan added the (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead label Sep 9, 2021
@LeeDr
Copy link

LeeDr commented Sep 9, 2021

Here's another thought on this. Maybe we let master have the new configuration and appropriate tests while keeping 7.15 (not sure on 7.x) with the current default behavior?
We're generally keeping tests the same on master and 7.x but when the default changes between branches maybe the tests should just change with them only in those branches?

@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Sep 13, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. and removed impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels Oct 27, 2021
@tsullivan
Copy link
Member Author

I've crossed out the need to re-introduce x-pack/test/api_integration/apis/security/license_downgrade.ts with the non-legacy configuration. But looking again - that test is very specific to security and the existing test that doesn't cover Reporting stuff is fine.

@tsullivan
Copy link
Member Author

I've crossed out the second half of the description because we already have tests that validate the touchpoints of the various applications for users that do/don't have reporting application privilege:

describe('Dashboard: Download CSV file', () => {
it('does not allow user that does not have reporting privileges', async () => {
await reportingFunctional.loginDataAnalyst();
await reportingFunctional.openSavedDashboard(DASHBOARD_TITLE);
await reportingFunctional.tryDashboardDownloadCsvNotAvailable('Ecommerce Data');
});
it('does allow user with reporting privileges', async () => {
await reportingFunctional.loginReportingUser();
await reportingFunctional.openSavedDashboard(DASHBOARD_TITLE);
await reportingFunctional.tryDashboardDownloadCsvSuccess('Ecommerce Data');
});
});
describe('Dashboard: Generate Screenshot', () => {
it('does not allow user that does not have reporting privileges', async () => {
await reportingFunctional.loginDataAnalyst();
await reportingFunctional.openSavedDashboard(DASHBOARD_TITLE);
await reportingFunctional.tryReportsNotAvailable();
});
it('does allow PDF generation user with reporting privileges', async () => {
await reportingFunctional.loginReportingUser();
await reportingFunctional.openSavedDashboard(DASHBOARD_TITLE);
await reportingFunctional.tryGeneratePdfSuccess();
});
it('does allow PNG generation user with reporting privileges', async () => {
await reportingFunctional.loginReportingUser();
await reportingFunctional.openSavedDashboard(DASHBOARD_TITLE);
await reportingFunctional.tryGeneratePngSuccess();
});
});
describe('Discover: Generate CSV', () => {
it('does not allow user that does not have reporting privileges', async () => {
await reportingFunctional.loginDataAnalyst();
await reportingFunctional.openSavedSearch(SAVEDSEARCH_TITLE);
await reportingFunctional.tryDiscoverCsvNotAvailable();
});
it('does allow user with reporting privileges', async () => {
await reportingFunctional.loginReportingUser();
await reportingFunctional.openSavedSearch(SAVEDSEARCH_TITLE);
await reportingFunctional.tryDiscoverCsvSuccess();
});
});
describe('Canvas: Generate PDF', () => {
const esArchiver = getService('esArchiver');
const reportingApi = getService('reportingAPI');
before('initialize tests', async () => {
await esArchiver.load('x-pack/test/functional/es_archives/canvas/reports');
});
after('teardown tests', async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/canvas/reports');
await reportingApi.deleteAllReports();
await reportingFunctional.initEcommerce();
});
it('does not allow user that does not have reporting privileges', async () => {
await reportingFunctional.loginDataAnalyst();
await reportingFunctional.openCanvasWorkpad(CANVAS_TITLE);
await reportingFunctional.tryGeneratePdfNotAvailable();
});
it('does allow user with reporting privileges', async () => {
await reportingFunctional.loginReportingUser();
await reportingFunctional.openCanvasWorkpad(CANVAS_TITLE);
await reportingFunctional.tryGeneratePdfSuccess();
});
});
describe('Visualize Editor: Generate Screenshot', () => {
it('does not allow user that does not have reporting privileges', async () => {
await reportingFunctional.loginDataAnalyst();
await reportingFunctional.openSavedVisualization(VIS_TITLE);
await reportingFunctional.tryReportsNotAvailable();
});
it('does allow PDF generation user with reporting privileges', async () => {
await reportingFunctional.loginReportingUser();
await reportingFunctional.openSavedVisualization(VIS_TITLE);
await reportingFunctional.tryGeneratePdfSuccess();
});
it('does allow PNG generation user with reporting privileges', async () => {
await reportingFunctional.loginReportingUser();
await reportingFunctional.openSavedVisualization(VIS_TITLE);
await reportingFunctional.tryGeneratePngSuccess();
});
});

@exalate-issue-sync exalate-issue-sync bot added loe:medium Medium Level of Effort and removed loe:small Small Level of Effort labels Nov 3, 2021
@tsullivan
Copy link
Member Author

Fix on the way: #117443

@exalate-issue-sync exalate-issue-sync bot added loe:small Small Level of Effort and removed loe:medium Medium Level of Effort labels Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants