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

Adds tests for the ExperimentDetails page #404

Merged
merged 2 commits into from
Nov 28, 2018

Conversation

rileyjbauer
Copy link
Contributor

@rileyjbauer rileyjbauer commented Nov 28, 2018

The only real functional changes are adding more granularity to the try/catch in ExperimentDetails and calling refresh on the runlistRef as part of load() rather than as a callback for setState since it doesn't depend on state.


This change is Reviewable

frontend/src/pages/AllRunsList.test.tsx Show resolved Hide resolved
frontend/src/pages/ExperimentDetails.test.tsx Show resolved Hide resolved
frontend/src/pages/ExperimentDetails.test.tsx Outdated Show resolved Hide resolved

it('uses an empty string if the experiment has no description', async () => {
const experiment = newMockExperiment();
experiment.description = undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I think what you want here is delete experiment.description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

just to avoid = undefined ?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is very nit-picky in this context, but it's a technical difference. If you set the field to undefined, it still exists on the object, and things like expect(x).not.toHaveProperty for example will fail. If we have logic that does something like if 'description' in experiment or if experiment.hasOwnProperty(description), the test won't be testing that.
Again, very nit-picky. :)

frontend/src/pages/ExperimentDetails.test.tsx Show resolved Hide resolved
frontend/src/pages/ExperimentDetails.test.tsx Show resolved Hide resolved
frontend/src/pages/ExperimentDetails.test.tsx Show resolved Hide resolved
frontend/src/pages/ExperimentDetails.tsx Outdated Show resolved Hide resolved
frontend/src/pages/ExperimentDetails.tsx Show resolved Hide resolved
frontend/src/pages/ExperimentDetails.tsx Outdated Show resolved Hide resolved
@yebrahim
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yebrahim

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1 similar comment
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yebrahim

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 1da72fc into master Nov 28, 2018
@IronPan IronPan deleted the experiment-details-tests branch June 28, 2019 18:47
Linchin pushed a commit to Linchin/pipelines that referenced this pull request Apr 11, 2023
* add cleanup_target_http_proxies

* ignore too-many-lines
HumairAK pushed a commit to red-hat-data-services/data-science-pipelines that referenced this pull request Mar 11, 2024
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.

3 participants