-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Selenium: adapt dashboard selenium tests for OSIO #9448
Conversation
…shboardTestsForOSIO
…shboardTestsForOSIO
ci-test |
ci-test build report: |
ci-test |
ci-test build report: |
…shboardTestsForOSIO
…shboardTestsForOSIO
…shboardTestsForOSIO
@@ -155,6 +158,7 @@ public void shouldCreatingFactoryFromWorkspace() { | |||
createFactoryPage.clickOnSourceTab(WORKSPACE_TAB_ID); | |||
createFactoryPage.typeFactoryName(FACTORY_CREATED_FROM_WORKSPACE_NAME); | |||
createFactoryPage.clickOnWorkspaceFromList(WORKSPACE_NAME); | |||
WaitUtils.sleepQuietly(1); |
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.
Please, comment why we need sleep here.
|
||
public void waitToastLoaderAndClickButton(String buttonName) { | ||
projectExplorer.waitProjectExplorer(); | ||
WaitUtils.sleepQuietly(5); |
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.
It's better to use helper method SeleniumWebDriverHelper#waitInvisibility(WebElement webElement, int timeout)
and handle TimeoutException by calling clickOnToastLoaderButton(buttonName)
method to shorten 5 seconds timeout.
It also requires clear documentation on this method.
@@ -85,6 +90,7 @@ public void createAndDeleteProjectTest() throws ExecutionException, InterruptedE | |||
newWorkspace.clickOnCreateButtonAndOpenInIDE(); | |||
|
|||
String dashboardWindow = seleniumWebDriverHelper.switchToIdeFrameAndWaitAvailability(); | |||
toastLoader.waitToastLoaderAndClickButton("Start"); |
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.
IMHO we can involve separate method waitToastLoaderAndClickStartButton()
to leave list of arguments an empty.
@@ -196,9 +200,9 @@ private void createWorkspaceWithProject(String workspaceName) { | |||
workspaces.clickOnAddWorkspaceBtn(); | |||
newWorkspace.waitToolbar(); | |||
loader.waitOnClosed(); | |||
newWorkspace.clickOnAllStacksTab(); |
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.
please, comment on why we can't rely on Quick Start stack list.
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.
The Java stack, which we use for creating test workspaces, not exist in Quick Start stacks list on OSIO.
@@ -67,6 +70,10 @@ public void waitToastLoaderIsOpen() { | |||
seleniumWebDriverHelper.waitVisibility(mainForm, UPDATING_PROJECT_TIMEOUT_SEC); | |||
} | |||
|
|||
public Boolean isToastLoaderIsOpened() { |
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.
correct name is isToastLoaderOpened
@@ -76,6 +80,7 @@ public void createAndDeleteProjectTest() throws ExecutionException, InterruptedE | |||
workspaces.clickOnAddWorkspaceBtn(); | |||
newWorkspace.waitToolbar(); | |||
|
|||
newWorkspace.clickOnAllStacksTab(); |
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.
please, leave comment about why we can't rely on Quick Start
stack list.
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.
The Java stack, which we use for creating test workspaces, not exist in Quick Start stacks list on OSIO.
@@ -133,13 +133,13 @@ public void checkFiltersStacksFeature() { | |||
newWorkspace.clickOnMultiMachineTab(); | |||
assertFalse(newWorkspace.isStackVisible(JAVA.getId())); | |||
|
|||
// filter stacks by 'php' value and check filtered stacks list | |||
// filter stacks by 'blank' value and check filtered stacks list |
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.
please, leave comment about why we need to user blank
stack name
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.
We used here Blank stack because PHP stack not exist on OSIO.
@@ -61,6 +66,7 @@ public void checkAbilityImportMavenProjectTest() throws ExecutionException, Inte | |||
|
|||
workspaces.clickOnAddWorkspaceBtn(); | |||
newWorkspace.waitToolbar(); | |||
newWorkspace.clickOnAllStacksTab(); |
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.
please, leave comment about why we can't rely on Quick Start stack list.
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.
The Java stack, which we use for creating test workspaces, not exist in Quick Start stacks list on OSIO.
@@ -81,6 +85,7 @@ public void checkAbilityImportProjectFromGithub() throws Exception { | |||
dashboard.selectWorkspacesItemOnDashboard(); | |||
workspaces.clickOnAddWorkspaceBtn(); | |||
newWorkspace.waitToolbar(); | |||
newWorkspace.clickOnAllStacksTab(); |
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.
please, leave comment about why we can't rely on Quick Start stack list.
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.
The Java stack, which we use for creating test workspaces, not exist in Quick Start stacks list on OSIO.
@@ -61,6 +66,7 @@ public void importProjectFromZipTest() throws ExecutionException, InterruptedExc | |||
|
|||
workspaces.clickOnAddWorkspaceBtn(); | |||
newWorkspace.waitToolbar(); | |||
newWorkspace.clickOnAllStacksTab(); |
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.
please, leave comment about why we can't rely on Quick Start stack list.
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.
The Java stack, which we use for creating test workspaces, not exist in Quick Start stacks list on OSIO.
@@ -215,6 +216,7 @@ private void createWorkspace(String name) { | |||
|
|||
workspaces.clickOnAddWorkspaceBtn(); | |||
newWorkspace.waitToolbar(); | |||
newWorkspace.clickOnAllStacksTab(); |
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.
please, leave comment about why we can't rely on Quick Start stack list.
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.
The Java stack, which we use for creating test workspaces, not exist in Quick Start stacks list on OSIO.
ci-test |
ci-test build report: |
Could you, please, leave command to start OSIO specific tests in description to this PR? |
…shboardTestsForOSIO
What does this PR do?
This PR adapt selenium test from dashboard package for OSIO.
What issues does this PR fix or reference?
#9455
Host to run Che 6 on OSIO: https://rhche.prod-preview.openshift.io