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

[ML] Transforms: Adds functional tests for transform cloning and editing. #69933

Merged
merged 15 commits into from
Jun 26, 2020

Conversation

walterra
Copy link
Contributor

Summary

Adds functional tests for transform cloning and editing.

Checklist

@walterra walterra added :ml test_xpack_functional v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Feature:Transforms ML transforms v7.9.0 labels Jun 25, 2020
@walterra walterra requested a review from a team as a code owner June 25, 2020 13:50
@walterra walterra self-assigned this Jun 25, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@qn895
Copy link
Member

qn895 commented Jun 25, 2020

LGTM

Copy link
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

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

Great to see functional tests for transform cloning and editing coming! 🎉
Left a few comments.

x-pack/test/functional/services/transform/edit_flyout.ts Outdated Show resolved Hide resolved
x-pack/test/functional/services/transform/edit_flyout.ts Outdated Show resolved Hide resolved
x-pack/test/functional/services/transform/edit_flyout.ts Outdated Show resolved Hide resolved
x-pack/test/functional/apps/transform/cloning.ts Outdated Show resolved Hide resolved
x-pack/test/functional/apps/transform/cloning.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

A few minor text edits needed, but otherwise LGTM

expect(rows.filter((row) => row.id === transformConfig.id)).to.have.length(1);
});

it('should display details for the update job in the job list', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

It isn't clear to me what this test is for from the description, which refers to job and job list. Looks like it is checking each of the fields in the row for the updated transform. In which case, something like should display the updated fields for the transform in the transforms list ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in a037c8d. It now says should display the updated job in the job list row cells.

const testSubjects = getService('testSubjects');

return {
async assertTransfromEditFlyoutExists() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo! Should be assertTransformEditFlyoutExists

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in a2613ee.

await testSubjects.existOrFail('transformEditFlyout');
},

async assertTransfromEditFlyoutMissing() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo! Should be assertTransformEditFlyoutMissing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in a2613ee.

);
expect(actualValue).to.eql(
expectedValue,
`Transform ${input} input text should be '${expectedValue}' (got '${actualValue}')`
Copy link
Contributor

Choose a reason for hiding this comment

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

As well as the suggested edit, should start with should

Copy link
Member

@pheyos pheyos Jun 26, 2020

Choose a reason for hiding this comment

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

@peteharverson I'm not sure I get your suggestion right. How do you think this expectmessage should look like?
We usually have messages in the form of Expected xyz (got abc) (example) or xyz should be ... (got abc) (example).

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, you're right @pheyos , I was thinking this was one of test descriptions. Agree we should stick with the same format for these expect messages.

@walterra walterra requested a review from pheyos June 26, 2020 09:43
@pheyos
Copy link
Member

pheyos commented Jun 26, 2020

Checked test stability in a flaky test runner CI job -> No failure in 50 runs ✔️

@walterra walterra requested a review from pheyos June 26, 2020 13:16
Copy link
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

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

LGTM - great stuff and thanks for adding those tests @walterra! 🎉

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

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

@walterra walterra merged commit eea33a0 into elastic:master Jun 26, 2020
@walterra walterra deleted the ml-e2e-transform-clone-edit branch June 26, 2020 15:03
walterra added a commit to walterra/kibana that referenced this pull request Jun 26, 2020
…ing. (elastic#69933)

Adds functional tests for transform cloning and editing.
walterra added a commit that referenced this pull request Jun 29, 2020
…ing. (#69933) (#70080)

Adds functional tests for transform cloning and editing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants