Skip to content

Commit

Permalink
Gui improvements 29 06 23 (#3393)
Browse files Browse the repository at this point in the history
* Update group selection
* Update NAT Gateway locators
  • Loading branch information
maryvictol authored Nov 8, 2023
1 parent 4a28572 commit c448857
Show file tree
Hide file tree
Showing 24 changed files with 127 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,10 @@ public void validateSelectPageButton() {
.cd(folder)
.selectPage()
.validateAllFilesAreSelected()
.ensureVisible(SELECTION_ACTIONS)
.click(SELECTION_ACTIONS)
.ensureVisible(REMOVE_ALL, CLEAR_SELECTION)
.ensure(SELECT_ALL, not(visible));
.ensure(SELECT_ALL, disabled);
}

@Test(dependsOnMethods = "validateSelectPageButton")
Expand All @@ -331,7 +333,7 @@ public void clearSelection() {
.clearSelection()
.validateNoElementsAreSelected()
.ensure(SELECT_ALL, visible)
.ensureNotVisible(REMOVE_ALL, CLEAR_SELECTION);
.ensureNotVisible(SELECTION_ACTIONS);
}

@Test(dependsOnMethods = {"createDataStorageAndValidate"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class DockerCommitTest
private final String defaultPriceType = Tools.defaultPriceType;
private final String testFileName = "test_file.txt";
private final String testFileContent = "This is a test file " + suffix;
private final String personalGroup = "personal";
private final String personalGroup = "Personal";
private final String toolInPersonalGroup = personalGroupActualName(login) + "/" + exactToolName(tool);
private final String customTag = "test_tag";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.epam.pipeline.autotests.ao.ToolTab;
import com.epam.pipeline.autotests.mixins.Navigation;
import com.epam.pipeline.autotests.utils.C;
import static com.epam.pipeline.autotests.utils.C.SEARCH_TIMEOUT;
import com.epam.pipeline.autotests.utils.TestCase;
import com.epam.pipeline.autotests.utils.Utils;
import org.testng.annotations.BeforeClass;
Expand Down Expand Up @@ -100,6 +101,7 @@ public void prepareForSearch() {
.configurationWithin(configuration, configuration ->
configuration.expandTabs(advancedTab)
.setValue(DISK, customDisk)
.ensure(INSTANCE_TYPE, enabled)
.selectValue(INSTANCE_TYPE, defaultInstanceType)
.setValue(NAME, customConfigurationProfile)
.selectDockerImage(dockerImage ->
Expand Down Expand Up @@ -141,7 +143,7 @@ public void prepareForSearch() {
.messageShouldAppear("The query string supports the following special characters:")
.close();

sleep(2, MINUTES);
sleep(SEARCH_TIMEOUT, MINUTES);
}

@BeforeMethod
Expand Down Expand Up @@ -355,7 +357,7 @@ public void searchForStorageWithChangedName() {
.clickEditStorageButton()
.setAlias(storageAlias)
.ok();
home().sleep(C.SEARCH_TIMEOUT + 2, MINUTES);
home().sleep(SEARCH_TIMEOUT + 2, MINUTES);
search()
.search(storageAlias)
.enter()
Expand Down Expand Up @@ -390,7 +392,7 @@ public void searchForPipelineRunOverStoragePath() {
.launch(this)
.showLog(getLastRunId())
.waitForCompletion();
home().sleep(C.SEARCH_TIMEOUT, MINUTES);
home().sleep(SEARCH_TIMEOUT, MINUTES);
search()
.click(RUNS)
.search(storage)
Expand Down Expand Up @@ -486,6 +488,7 @@ public void searchForToolRun() {
endpointPage.closeTab();
}
}
sleep(SEARCH_TIMEOUT, MINUTES);
LogAO logAO = new LogAO();
String endpointLink = logAO.getEndpointLink();
String[] instanceParam = new String[] {
Expand Down Expand Up @@ -540,7 +543,7 @@ public void searchForCompletedToolRun() {
runsMenu()
.activeRuns()
.stopRun(testRunID_2668);
home().sleep(C.SEARCH_TIMEOUT + 2, MINUTES);
home().sleep(SEARCH_TIMEOUT + 2, MINUTES);
search()
.click(RUNS)
.search(testRunID_2668)
Expand Down Expand Up @@ -583,7 +586,7 @@ public void issueSearch() {
.showIssues()
.clickNewIssue()
.addNewIssue(title, description);
home().sleep(C.SEARCH_TIMEOUT + 2, MINUTES);
home().sleep(SEARCH_TIMEOUT + 2, MINUTES);
search()
.search(title)
.enter()
Expand Down Expand Up @@ -616,7 +619,7 @@ public void identicalNamesSearch() {
library()
.cd(folder)
.createFolder(title);
home().sleep(C.SEARCH_TIMEOUT + 2, MINUTES);
home().sleep(SEARCH_TIMEOUT + 2, MINUTES);
search()
.ensureAll(enabled, FOLDERS, PIPELINES, RUNS, TOOLS, DATA, ISSUES)
.search(title)
Expand Down Expand Up @@ -712,7 +715,7 @@ public void searchWithSpecialExpressions() {
.library()
.cd(folder)
.createFolder(folderWithExpression);
home().sleep(C.SEARCH_TIMEOUT, MINUTES);
home().sleep(SEARCH_TIMEOUT, MINUTES);
search()
.search(innerFolder1 + "*")
.enter()
Expand Down Expand Up @@ -777,7 +780,7 @@ public void searchForDetachConfigByConfiguration() {
public void searchAfterDeleting() {
library()
.removeNotEmptyFolder(folder)
.sleep(C.SEARCH_TIMEOUT, MINUTES);
.sleep(SEARCH_TIMEOUT, MINUTES);
home();
search()
.search(pipeline)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class LaunchClusterTest extends AbstractAutoRemovingPipelineRunningTest i
private final String testingTool = C.ANOTHER_TESTING_TOOL_NAME;
private final String testingNode = C.ANOTHER_INSTANCE;
private final String instanceFamilyName = C.DEFAULT_INSTANCE_FAMILY_NAME;
private final String gridEngineAutoscalingTask = "GridEngineAutoscaling";
private final String gridEngineAutoscalingTask = "SGEAutoscaling";
private final String spotPrice = C.SPOT_PRICE_NAME;
private final String onDemandPrice = ON_DEMAND;
private final String mastersConfigPrice = "Master's config";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ public void setPreferences() {
);
});
initialLaunchSystemParameters = editLaunchSystemParameters();
navigationMenu()
.settings()
.switchToUserManagement()
.switchToUsers()
.searchUserEntry(userWithoutCompletedRuns.login)
.edit()
.deleteRoleOrGroupIfExist(USER_ROLE)
.ok();
}

@AfterClass(alwaysRun = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package com.epam.pipeline.autotests;

import static com.codeborne.selenide.Selectors.withText;
import com.epam.pipeline.autotests.ao.AbstractPipelineTabAO;
import com.epam.pipeline.autotests.ao.ConfirmationPopupAO;
import com.epam.pipeline.autotests.ao.PipelineCodeTabAO;
Expand All @@ -24,6 +25,7 @@
import com.epam.pipeline.autotests.utils.C;
import com.epam.pipeline.autotests.utils.ConfigurationProfile;
import com.epam.pipeline.autotests.utils.TestCase;
import static java.lang.String.format;
import org.testng.annotations.AfterClass;
import org.testng.annotations.Test;

Expand All @@ -39,7 +41,6 @@
import static com.codeborne.selenide.Selenide.open;
import static com.epam.pipeline.autotests.ao.LogAO.InstanceParameters.parameterWithName;
import static com.epam.pipeline.autotests.ao.LogAO.logMessage;
import static com.epam.pipeline.autotests.ao.LogAO.taskWithName;
import static com.epam.pipeline.autotests.ao.Primitive.*;
import static com.epam.pipeline.autotests.ao.Profile.profileWithName;
import static com.epam.pipeline.autotests.utils.Conditions.collapsedTab;
Expand Down Expand Up @@ -244,13 +245,14 @@ public void validationOfAddingNewConfigurationFeature() {
.ensure(profileWithName(configurationName), exist, visible)
.onTab(PipelineCodeTabAO.class)
.clickOnFile(configurationFileName)
.shouldContainInCode(String.format("\"name\" : \"%s\"", configurationName))
.shouldContainInCode(format("\"name\" : \"%s\"", configurationName))
.close();
}

@Test(priority = 3, dependsOnMethods = "validationOfAddingNewConfigurationFeature")
@TestCase("EPMCMBIBPC-797")
public void validationOfEditNewConfiguration() {
String updatemessage = format("Updating '%s' configuration", configurationName);
onPipelinePage()
.onTab(PipelineConfigurationTabAO.class)
.editConfiguration(configurationName, profile ->
Expand All @@ -263,7 +265,8 @@ public void validationOfEditNewConfiguration() {
.sleep(2, SECONDS)
.click(SAVE)
)
.messageShouldAppear(String.format("Updating '%s' configuration", configurationName))
.messageShouldAppear(updatemessage)
.ensure(withText(updatemessage), not(visible))
// Because the page refreshes
.sleep(5, SECONDS)
.onTab(PipelineCodeTabAO.class)
Expand Down Expand Up @@ -347,13 +350,13 @@ public void validationOfSettingAsDefaultBehavior() {
@Test(priority = 8, dependsOnMethods = "validationOfSettingAsDefaultBehavior")
@TestCase("EPMCMBIBPC-805")
public void validationOfConfigurationRemoving() {
final String expectedTitle = String.format(
final String expectedTitle = format(
"Are you sure you want to remove configuration '%s'?", configurationName
);
final String deletionWasCancelled = String.format(
final String deletionWasCancelled = format(
"Configuration with name %s supposed exists as deletion was cancelled.", configurationName
);
final String deletionWasConfirmed = String.format(
final String deletionWasConfirmed = format(
"Configuration with name %s supposed to be deleted.", configurationName
);
onPipelinePage()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public void luigiPipelineTabsShouldBeValid() {
public void shouldCreateFolderInPipeline() {
codeTab()
.createFolder(pipelineFolder)
.ensure(byText(pipelineFolder), visible)
.shouldContainElement(pipelineFolder);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
package com.epam.pipeline.autotests;

import com.codeborne.selenide.Condition;
import com.epam.pipeline.autotests.ao.LogAO;
import com.epam.pipeline.autotests.ao.ToolPageAO;
import com.epam.pipeline.autotests.ao.ToolTab;
import com.epam.pipeline.autotests.mixins.Authorization;
import com.epam.pipeline.autotests.mixins.Tools;
import com.epam.pipeline.autotests.utils.C;
import static com.epam.pipeline.autotests.utils.C.DEFAULT_CLOUD_REGION;
import com.epam.pipeline.autotests.utils.TestCase;
import com.epam.pipeline.autotests.utils.Utils;
import org.testng.annotations.BeforeMethod;
Expand Down Expand Up @@ -240,7 +242,7 @@ public void shareSSHSession() {
.ensureVisible(SERVICES)
.checkEndpointsLinkOnServicesPanel(name[name.length - 1])
.checkSSHLinkIsDisplayedOnServicesPanel(runID)
.openSSHLink(runID)
.openSSHLink(runID, DEFAULT_CLOUD_REGION)
.waitUntilTextLoads(runID)
.execute("cat test.file")
.assertPageContains("123")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ public void checkAccessToSSHByDirectLinkForNonOwnerUser() {
.switchToMyProfile()
.validateUserName(user.login);
ShellAO.open(sshLink)
.waitUntilTextAppears(getLastRunId())
.execute("ls -la")
.assertOutputDoesNotContain("ls -la");
open(C.ROOT_ADDRESS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class ToolsParametersTest
private static final String SYSTEM_D = "SystemD";
private static final String TOOLTIP_2 = "This capability is not allowed\nSupported OS versions:\ncentos*";
private static final String TOOLTIP_1 = "This capability is not allowed\nSupported OS versions:\ndebian 10\n" +
"centos*";
"centos 8";
private static final String CUSTOM_CAPABILITY_DESC_1 = "Custom test capability 1";
private static final String CUSTOM_CAPABILITY_DESC_2 = "Custom test capability 2";
private static final String CUSTOM_CAPABILITY_DESC_3 = "Custom test capability 3";
Expand Down Expand Up @@ -222,9 +222,8 @@ public void customCapabilitiesForToolDockerImageOS() {
.checkCustomCapability(CUSTOM_CAPABILITY_3, false)
.checkCustomCapability(CUSTOM_CAPABILITY_4, false)
.checkCustomCapability(CUSTOM_CAPABILITY_2, true)
.checkCustomCapability(SYSTEM_D, true)
.checkCustomCapability(SYSTEM_D, false)
.checkCapabilityTooltip(CUSTOM_CAPABILITY_2, TOOLTIP_1)
.checkCapabilityTooltip(SYSTEM_D, TOOLTIP_2)
.click(byTitle(RUN_CAPABILITIES_TITLE))
.selectRunCapability(CUSTOM_CAPABILITY_1)
.click(byTitle(RUN_CAPABILITIES_TITLE))
Expand All @@ -240,9 +239,8 @@ public void customCapabilitiesForToolDockerImageOS() {
.checkCustomCapability(CUSTOM_CAPABILITY_1, false)
.checkCustomCapability(CUSTOM_CAPABILITY_3, false)
.checkCustomCapability(CUSTOM_CAPABILITY_2, true)
.checkCustomCapability(SYSTEM_D, true)
.checkCustomCapability(SYSTEM_D, false)
.checkCapabilityTooltip(CUSTOM_CAPABILITY_2, TOOLTIP_1)
.checkCapabilityTooltip(SYSTEM_D, TOOLTIP_2)
.click(byTitle(RUN_CAPABILITIES_TITLE))
.selectRunCapability(CUSTOM_CAPABILITY_1)
.click(byTitle(RUN_CAPABILITIES_TITLE))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class ToolsTest
private final String defaultRegistryId = C.DEFAULT_REGISTRY_IP;
private final String testingTool = C.TESTING_TOOL_NAME;
private final String dockerImage = String.format("%s/%s", defaultRegistryId, testingTool);
private final String personalGroup = "personal";
private final String personalGroup = "Personal";
private final String defaultGroup = C.DEFAULT_GROUP;
private final String command = "echo \"Hi, I'm nginx!\"";
private final String disk = "23";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ default ELEMENT_TYPE selectValue(final Primitive combobox, final String option)
* @return The origin access object.
*/
default ELEMENT_TYPE selectValue(final Primitive combobox, final By optionQualifier) {
get(combobox).shouldBe(visible).click();
get(combobox).shouldBe(visible, enabled).click();
$(visible(byClassName("ant-select-dropdown"))).find(optionQualifier).shouldBe(visible).click();
return (ELEMENT_TYPE) this;
}
Expand Down
11 changes: 11 additions & 0 deletions e2e/gui/src/test/java/com/epam/pipeline/autotests/ao/LogAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.epam.pipeline.autotests.utils.Conditions;
import com.epam.pipeline.autotests.utils.Utils;
import org.openqa.selenium.By;
import static org.openqa.selenium.By.className;
import org.openqa.selenium.WebElement;

import java.util.*;
Expand Down Expand Up @@ -86,6 +87,16 @@ public LogAO waitForSshLink() {
return this;
}

private void openRegionSelector() {
get(SSH_LINK).parent().find(className("ultizone-url__expander")).click();
}

public String getBestRegion() {
openRegionSelector();
return $$(className("rc-dropdown-menu-item")).get(0).find("a")
.text().replace("(best)", "");
}

public ShellAO clickOnSshLink() {
return ShellAO.open(getSshLink());
}
Expand Down
Loading

0 comments on commit c448857

Please sign in to comment.