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

Toolbar play from stopped #806

Merged
merged 1 commit into from
Nov 10, 2021

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Oct 13, 2021

built on #805

This completes the play-pause/resume-stop sequence in the workflow toolbar.

Requirements check-list

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Appropriate tests are included (unit and/or functional) - hard to test with mocked data
  • Appropriate change log entry included.
  • No documentation update required.

@oliver-sanders oliver-sanders added this to the 0.6.0 milestone Oct 13, 2021
@oliver-sanders oliver-sanders self-assigned this Oct 13, 2021
@oliver-sanders oliver-sanders mentioned this pull request Oct 13, 2021
6 tasks
@codecov-commenter
Copy link

codecov-commenter commented Oct 13, 2021

Codecov Report

Merging #806 (d9960a4) into master (a05f013) will decrease coverage by 0.26%.
The diff coverage is 28.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #806      +/-   ##
==========================================
- Coverage   91.69%   91.43%   -0.27%     
==========================================
  Files          86       86              
  Lines        1686     1693       +7     
  Branches      105      108       +3     
==========================================
+ Hits         1546     1548       +2     
- Misses        117      120       +3     
- Partials       23       25       +2     
Flag Coverage Δ
e2e 79.62% <28.57%> (-0.22%) ⬇️
unittests 78.37% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/components/cylc/workflow/Toolbar.vue 73.07% <28.57%> (-16.40%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a05f013...d9960a4. Read the comment docs.

Copy link
Member

@kinow kinow left a comment

Choose a reason for hiding this comment

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

Looks good to me, pending only a test for the new methods added in the components 😬 unit tests can be used to access those properties, see:

With that we should be able to create a small test copying the existing code that mounts the component, and gives it the necessary state for the play/stop/pause toggle.

src/components/cylc/gscan/GScan.vue Outdated Show resolved Hide resolved
src/styles/cylc/_toolbar.scss Outdated Show resolved Hide resolved
src/styles/cylc/_variables.scss Outdated Show resolved Hide resolved
@datamel datamel self-requested a review October 14, 2021 20:15
@datamel datamel mentioned this pull request Oct 15, 2021
6 tasks
Copy link
Contributor

@datamel datamel left a comment

Choose a reason for hiding this comment

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

This PR looks great. I understand there are tests to do and this is not maybe ready for final review. I have checked this out (in preparation for disabling unauthorised buttons) and have some observations, I think they are all appropriate to do in different PRs.

  • If I create a new workflow folder, this_is_new, when picked up and selected in the ui, the stop button is correctly shown and play button enabled:
    image
    However, if I select some existing workflows they have play disabled.
    image
    If we want this to behave in the same way for all "Not yet run" workflows, does this need a dependency on this state?
  • The icon for "Not yet run" on the left panel is the same as stopped, I think this was part of the built on pr.
    image
  • The stop and pause are disabled on stopping but still visible in mutation menu.
    image

@oliver-sanders
Copy link
Member Author

This should work for "not yet run" workflows.

The dependent cylc-flow and cylc-uiserver PRs have only just been merged so it might take a git pull.

@oliver-sanders
Copy link
Member Author

oliver-sanders commented Oct 15, 2021

Will rebase and re-test...

... looks good:

Screenshot 2021-10-15 at 10 31 30

Copy link
Member

@kinow kinow left a comment

Choose a reason for hiding this comment

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

Code looks good to me. Worth a quick test @AaronDCole , and not sure if we already have tests or if we need some unit/e2e tests. You'll inherit this one @AaronDCole 😬

@oliver-sanders
Copy link
Member Author

Testing this sort of thing without live data is going to be a bit tricky/limited, can have a go, will take a look next week.

Long term I think a system integration test suite for cylc-flow, cylc-uiserver and cylc-ui with Cypress might be a good way to go.

Would be good to slide this into the beta if possible so may need to go on manual testing for now and bump to an issue.

@MetRonnie
Copy link
Member

Does this close #748?

@oliver-sanders
Copy link
Member Author

I think #748 was closed by the related #805

@oliver-sanders oliver-sanders requested review from MetRonnie and removed request for MetRonnie October 28, 2021 13:41
* This completes the play-pause/resume-stop sequence in the workflow
  toolbar.
@oliver-sanders
Copy link
Member Author

Rebased, added changelog.

Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@datamel datamel left a comment

Choose a reason for hiding this comment

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

I have checked out the branch and tested the change. Looks great, thanks @oliver-sanders.
The change is not covered by a test, like you said it is a hard one to test and I'm not quite sure how I would go about it so I am merging having manually tested, I could open an issue for the testing if you think it would be fitting?

@datamel datamel merged commit 9c02f54 into cylc:master Nov 10, 2021
@oliver-sanders oliver-sanders deleted the toolbar-play-from-stopped branch November 10, 2021 10:18
@oliver-sanders
Copy link
Member Author

I think we have an issue on cylc-admin for system testing.

My best idea ATM is to use Cypress to test the UI but using live data provided by a UIS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants