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
Bug 1878591: Added tests for lso ocs disk inventory #6606
Bug 1878591: Added tests for lso ocs disk inventory #6606
Conversation
|
@afreen23: This pull request references Bugzilla bug 1878591, which is invalid:
Comment 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. |
|
/bugzilla refresh |
|
@afreen23: This pull request references Bugzilla bug 1878591, which is invalid:
Comment 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. |
|
/bugzilla refresh |
|
@afreen23: This pull request references Bugzilla bug 1878591, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
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. |
| await browser.get(`${appHost}/`); | ||
| await clickNavLink(['Compute', 'Nodes']); | ||
| await isLoaded(); | ||
| $(`a[data-test-id="${nodeName}"]`).click(); |
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.
All the selectors should be moved to a corresponding view.ts file, similar to other tests.
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.
This takes in a dynamic value therefore I avoided creating anon functions and it wont be reused anywhere else.
...d/packages/local-storage-operator-plugin/integration-tests/tests/disks-list-page.scenario.ts
Outdated
Show resolved
Hide resolved
frontend/packages/local-storage-operator-plugin/src/components/disks-list/disks-list-page.tsx
Outdated
Show resolved
Hide resolved
...d/packages/local-storage-operator-plugin/integration-tests/tests/disks-list-page.scenario.ts
Outdated
Show resolved
Hide resolved
...d/packages/local-storage-operator-plugin/integration-tests/tests/disks-list-page.scenario.ts
Outdated
Show resolved
Hide resolved
...d/packages/local-storage-operator-plugin/integration-tests/tests/disks-list-page.scenario.ts
Outdated
Show resolved
Hide resolved
...d/packages/local-storage-operator-plugin/integration-tests/tests/disks-list-page.scenario.ts
Outdated
Show resolved
Hide resolved
| expect(firstRow.get(2).getAttribute('innerText')).toBe(firstDisk.type || '-'); | ||
| expect(firstRow.get(3).getAttribute('innerText')).toBe(firstDisk.model || '-'); |
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.
getText also returns the visible inner text of the element. I am not sure why we would want to do it this way.
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.
getAttribute returns text for hidden elements and on certain screens few of the columns will be hidden
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.
since it will be running headless if getText works on headless mode then let us keep it as getText
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.
getText , does not works therefore we are using getAttribute here.
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.
https://github.com/openshift/console/pull/6606/files#diff-1e194e3ba92229ea049eea86f7bf2e94R47
If all the headers(columns) are visible I am confused why exactly some of the elements are missing here.
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.
for headers the presence of DOM node is checked by the attribute data-label=.
We are not using protractor get() and getText() functions which work on element type
Edit: And these functions work for visible elements and return empty string for hidden elements
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 have posted the screenshot of running tests in description as well.
#6606 (comment)
...tend/packages/local-storage-operator-plugin/integration-tests/views/disks-list-page.views.ts
Outdated
Show resolved
Hide resolved
...tend/packages/local-storage-operator-plugin/integration-tests/views/disks-list-page.views.ts
Outdated
Show resolved
Hide resolved
7106599
to
aded576
Compare
| await browser.get(`${appHost}/`); | ||
| await clickNavLink(['Compute', 'Nodes']); | ||
| await isLoaded(); | ||
| click($(`a[data-test-id="${nodeName}"]`)); |
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.
You can create a function and pass this dynamic value in view.ts file.
It will be useful, if the selectors get changed in future version.
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.
| await textbox.sendKeys(discoveredDevices[0].path); | ||
| let updatedRows = resourceRows.count(); | ||
| expect(updatedRows).toBe(1); | ||
| // info: clear() is not triggering event to clear the filter and update rows |
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 don't see clear method being called here. So I guess this comment can be removed.
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.
See the lines 71-72, its for that and its valid here.
...tend/packages/local-storage-operator-plugin/integration-tests/views/disks-list-page.views.ts
Outdated
Show resolved
Hide resolved
...tend/packages/local-storage-operator-plugin/integration-tests/views/disks-list-page.views.ts
Outdated
Show resolved
Hide resolved
...tend/packages/local-storage-operator-plugin/integration-tests/views/disks-list-page.views.ts
Outdated
Show resolved
Hide resolved
...tend/packages/local-storage-operator-plugin/integration-tests/views/disks-list-page.views.ts
Outdated
Show resolved
Hide resolved
...tend/packages/local-storage-operator-plugin/integration-tests/views/disks-list-page.views.ts
Outdated
Show resolved
Hide resolved
| expect(firstRow.get(2).getAttribute('innerText')).toBe(firstDisk.type || '-'); | ||
| expect(firstRow.get(3).getAttribute('innerText')).toBe(firstDisk.model || '-'); |
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.
https://github.com/openshift/console/pull/6606/files#diff-1e194e3ba92229ea049eea86f7bf2e94R47
If all the headers(columns) are visible I am confused why exactly some of the elements are missing here.
...d/packages/local-storage-operator-plugin/integration-tests/tests/disks-list-page.scenario.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Afreen Rahman <afrahman@redhat.com>
aded576
to
0b89e9a
Compare
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
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afreen23, bipuladh 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 |
|
@afreen23: All pull requests linked via external trackers have merged: Bugzilla bug 1878591 has been moved to the MODIFIED state. 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: Afreen Rahman afrahman@redhat.com