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] Convert test code to Typescript #65155

Merged
merged 5 commits into from
May 5, 2020

Conversation

tsullivan
Copy link
Member

Summary

This PR converts the Reporting functional tests code (report generation, usage collection) to Typescript.

@elasticmachine
Copy link
Contributor

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

@tsullivan tsullivan added the release_note:skip Skip the PR/issue when compiling release notes label May 4, 2020
@tsullivan tsullivan marked this pull request as ready for review May 4, 2020 19:25
const esArchiver = getService('esArchiver');
const reportingAPI = getService('reportingAPI');
const usageAPI = getService('usageAPI');
const usageAPI = getService('usageAPI' as any);
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: this service is mistakenly using /api/stats?extended and returning the data in a different format where all the fields are snake_cased.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

}

interface UsageStats {
reporting: ReportingUsageStats;
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'd like to use the ReportingUsageType interface that is exposed in the Reporting plugin code. However, the structure returned by the service API endpoint is has some post-processing that converts all the field names to snake_case. It's a separate issue that requires cleanup.

Copy link
Member Author

Choose a reason for hiding this comment

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

Filed an issue: #65338

@tsullivan
Copy link
Member Author

Yet another PR to convert test code to Typescript. Since the PR is passing, I'm just going to merge with no reviewers since the changes are straightforward.

The non-straightforward part is about why we can't use ReportingUsageType to type the response data from the Usage API service. It's a separate issue for which I've filed this bug: #65338

@tsullivan tsullivan merged commit 76d8ffe into elastic:master May 5, 2020
@tsullivan tsullivan deleted the reporting/api-tests-to-ts branch May 5, 2020 18:54
tsullivan added a commit to tsullivan/kibana that referenced this pull request May 5, 2020
* convert tests to typescript

* comment note

* add type for api integration test

* fix import
tsullivan added a commit that referenced this pull request May 5, 2020
* convert tests to typescript

* comment note

* add type for api integration test

* fix import
@sophiec20 sophiec20 added the (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead release_note:skip Skip the PR/issue when compiling release notes v7.8.0 v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants