-
Notifications
You must be signed in to change notification settings - Fork 69
test(ws): Add workspaces tests #188
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
test(ws): Add workspaces tests #188
Conversation
5feeff6 to
6aac5ce
Compare
9ba35a6 to
d356044
Compare
|
@paulovmr would mind to take a look on this one? |
|
/assign @paulovmr |
ebfda26 to
9ab07f3
Compare
|
/ok-to-test |
|
@yehudit1987 this can be rebased now that #213 is merged. The backend changes from this PR should no longer be needed, but the frontend will need to understand the new "services" part of the API from that PR. |
c15e8e5 to
6814730
Compare
paulovmr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @yehudit1987 , thanks for the PR! I've made a partial review, and will test it as well after the backend PR is merged and this one is rebased. I've left a few comments inline. Also:
- A
.gitignoreentry was added and already merged in thenotebooks-v2branch to avoid theworkspaces/frontend/src/__tests__/cypress/cypress/downloads/downloads.htmfile to be versioned. Your PR is trying to add the file. My guess is that because when you opened the PR the.gitignoreentry did not exist, thedownload.htmfile was already added to your commit, so you might need to remove it manually in your branch.
| podConfigDisplayName: string, | ||
| pvcName: string, | ||
| ): { | ||
| name: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this return type be replaced by the Workspace type directly?
| workspace, | ||
| }) => { | ||
| const { activity, pauseTime, pendingRestart } = workspace.status; | ||
| const { activity, pausedTime: pauseTime, pendingRestart } = workspace; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to keep the consistency, please consider keeping all usages as pausedTime (also label and usage in lines 38 to 40).
| const { activity, pausedTime: pauseTime, pendingRestart } = workspace; | |
| const { activity, pausedTime, pendingRestart } = workspace; |
| <DescriptionListTerm>Labels</DescriptionListTerm> | ||
| <DescriptionListDescription> | ||
| {workspace.podTemplate.podMetadata.labels.join(', ')} | ||
| {workspace.podTemplate.options.podConfig.current.labels.length > 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we could leverage PatternFly Label component to better list the labels here. Since it is out of the scope of this PR, I've created a different issue for it: #232
| <DescriptionListTerm>Pod config</DescriptionListTerm> | ||
| <DescriptionListDescription>{workspace.options.podConfig}</DescriptionListDescription> | ||
| <DescriptionListDescription> | ||
| {JSON.stringify(workspace.podTemplate.options.podConfig, null, 2)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| {JSON.stringify(workspace.podTemplate.options.podConfig, null, 2)} | |
| {workspace.podTemplate.options.podConfig.current.displayName} |
61c4593 to
bfade6d
Compare
paulovmr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paulovmr @yehudit1987 my suggestion is to hold this until we:
- Have a better controller installation/setup with #220
- Figure out where we should mock. I suggest we discuss mocking this on BFF layer to avoid dependency on controller for front-end development. After we finish a feature we can always test it integrated (ideally with automated tests and at least with tilt)
|
/hold |
04ba978 to
5f22655
Compare
caponetto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yehudit1987 I left one comment on the code, and I think we are good to go.
In addition:
- Could you please use the
testprefix for this PR instead offeat? - Could you please squash the 12 commits into a single one?
Thank you!
| "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", | ||
| "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", | ||
| "dev": true, | ||
| "license": "MIT", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this change required? It seems unnecessary for this PR.
5f22655 to
f27f745
Compare
|
/lgtm @paulovmr there are some flaky tests on this PR that we're turning off for now. In a follow-up PR, we need to upload cypress screenshots and videos to the CI output so we're able to revisit these tests and verify what's going on. |
|
@caponetto: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com> feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com> feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com> feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com> feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com> feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com> feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com> feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com> feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com> feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com> feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com> fix cypress tests Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com>
f27f745 to
88fab63
Compare
paulovmr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ederign 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 |
|
/unhold |
feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces fix cypress tests Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com> Co-authored-by: Yehudit Kerido <yehudit.kerido@nokia.com> Signed-off-by: CI Bot <mkoushni@redhat.com>
feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces fix cypress tests Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com> Co-authored-by: Yehudit Kerido <yehudit.kerido@nokia.com>
feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces fix cypress tests Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com> Co-authored-by: Yehudit Kerido <yehudit.kerido@nokia.com> Signed-off-by: CI Bot <mkoushni@redhat.com>
feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces feat(ws): Notebooks 2.0 // Frontend // Fetch workspaces fix cypress tests Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com> Co-authored-by: Yehudit Kerido <yehudit.kerido@nokia.com>
This PR resolve issue #142