-
Couldn't load subscription status.
- Fork 28
Create UI test to verify Developer perspective #206
base: master
Are you sure you want to change the base?
Create UI test to verify Developer perspective #206
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: If they are not already assigned, you can assign the PR to them by writing 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 |
|
Hi @pmacik. Thanks for your PR. I'm waiting for a redhat-developer member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
/ok-to-test |
|
@pratikjagrut: Cannot trigger testing until a trusted user reviews the PR and leaves an 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. |
|
/ok-to-test |
This PR installs `chromium-headless` and `chromedriver` packages from `epel-release` to the `root` image. These are the dependencies needed to run the UI tests (#206) on CI.
This PR installs missing `chromium` package to the `root` image. This is a dependency needed to run the UI tests (#206) on CI.
| "github.com/tebeka/selenium" | ||
| ) | ||
|
|
||
| //FindElementBy look for a web element by a given selector and returs it back when found. |
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.
One suggestion - I have noticed that there are intermittent timing issues related to the appearance of the UI elements in the Developer Perspective in the UI - I assume that this is due to the DOM being updated.
It would be a good idea for the test to be robust enough to avoid 'element not fund' errors. I'd suggest making this change:
// MaxCount = Max count for loop used to discover UI elements
const MaxCount = 10
//FindElementBy look for a web element by a given selector and returs it back when found.
func FindElementBy(t *testing.T, wd selenium.WebDriver, by string, selector string) selenium.WebElement {
var elems []selenium.WebElement
elems, err := wd.FindElements(by, selector)
// To avoid a problem where the element is yet not present
counter := 0
for {
if len(elems) > 0 || counter > MaxCount {
break
}
counter++
time.Sleep(100 * time.Millisecond)
}
elem, err := wd.FindElement(by, selector)
require.NoError(t, err, fmt.Sprintf("Find element by %s=%s", by, selector))
return elem
}
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.
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.
On May 20, we discussed how we wanted the UI test to always begin from a "clean" starting point. In the context of the UI test this requires that a new console be created. Pavel suggested that we could clone/copy the test setup steps defined for the OLM integration test (test-olm-integration) as these steps do create a new cluster. I'd vote for this approach instead of appending the UI test(s) to the OLM integration test target as we should keep the tests separated by function/goal.
… switch user to non-admin.
…ElementBy function.
…e test local only for now.
|
/retest |
This PR adds a new UI test that:
Developerperspective is presentDepends on: