Skip to content
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

Gui improvements 28 06 2024 #3762

Open
wants to merge 48 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
6c29965
Update user status locator
maryvictol Jun 28, 2024
5cf709e
Add Apply button to Permission form
maryvictol Jul 25, 2024
522cdbf
Add Apply button to Permission form
maryvictol Jul 25, 2024
f26fa23
Add Apply button to Permission form
maryvictol Jul 25, 2024
124423d
Add Apply button to Permission form
maryvictol Jul 25, 2024
5422cd0
Update addNewUser method
maryvictol Jul 25, 2024
7953157
Add Apply button to Permission form
maryvictol Jul 25, 2024
2139155
Add Apply button to Permission form
maryvictol Jul 25, 2024
0c98364
update delete user/group from permissions
maryvictol Jul 25, 2024
a342949
Update waitForMountBuckets method
maryvictol Aug 12, 2024
abcf4d9
Update setCommand method
maryvictol Aug 13, 2024
9a445ba
Add login as admin before each LaunchLimitMounts test
maryvictol Aug 13, 2024
83818a2
Update waitForMountBuckets method
maryvictol Aug 13, 2024
46fb54f
Update selectRunCapability method
maryvictol Aug 16, 2024
602202b
Disable luigiGraphTabShouldBeValid test
maryvictol Aug 19, 2024
17f29dd
Update deleteStorageRule method
maryvictol Aug 19, 2024
a255523
Update selectRunCapability method
maryvictol Aug 20, 2024
a3d7d0c
Update Confirmation popup locators
maryvictol Aug 27, 2024
d3655d0
Fix Confirmation popup locator
maryvictol Aug 27, 2024
79e80d9
Update AutopauseTest
maryvictol Sep 4, 2024
93e4dc5
Update selectRunCapability method
maryvictol Sep 11, 2024
5d1e008
Update Parameters locators
maryvictol Sep 12, 2024
77e3777
Update Parameters locators
maryvictol Sep 12, 2024
236e084
Update REMOVE_PARAMETER locator
maryvictol Sep 13, 2024
a17b7b3
Update PARAMETER_PATH locator
maryvictol Sep 13, 2024
5c6faec
Update ssh method to open selected region
maryvictol Sep 20, 2024
2765b86
Fix SamplesMetadataTest
maryvictol Sep 23, 2024
b5716dd
Update SamplesMetadataTest
maryvictol Sep 23, 2024
8e83600
Update SamplesMetadataTest
maryvictol Sep 24, 2024
ea1b1a3
Update SamplesMetadataTest
maryvictol Sep 24, 2024
7422153
Update SamplesMetadataTest
maryvictol Sep 24, 2024
91cd3e4
Update LaunchParametersTest and PauseResumeTest
maryvictol Sep 25, 2024
df0b8ab
Update LaunchParametersTest
maryvictol Sep 25, 2024
b961f56
Update Parameters locators
maryvictol Sep 26, 2024
d0b1192
Update VersionControlTest, ToolsTest
maryvictol Sep 27, 2024
15cdaa9
Add label for master node
maryvictol Oct 8, 2024
4dec563
Update parameters index
maryvictol Oct 18, 2024
63e2929
Update VersionControlTest, disabled tests for luigi graph, add multip…
maryvictol Oct 30, 2024
5092599
Merge branch 'develop' into gui_improvements_28-06-2024
maryvictol Nov 6, 2024
d696f82
Small fixes
maryvictol Nov 6, 2024
8a425f1
Update Cluster All Nodes tab locator
maryvictol Nov 7, 2024
b1d91ed
Add sorting nodes
maryvictol Nov 8, 2024
e2c58a5
Update ssh()
kamyshova Nov 8, 2024
b963892
Update after review
maryvictol Nov 8, 2024
1310929
Update after review
maryvictol Nov 8, 2024
8cae5fc
Add sorting nodes
maryvictol Nov 8, 2024
06d457b
Add ToolParameterAO class
maryvictol Nov 11, 2024
e53cebc
Merge branch 'develop' into gui_improvements_28-06-2024
maryvictol Nov 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions e2e/gui/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,4 @@ e2e.ui.backup.storage.path=
e2e.ui.backup.storage.offset=
e2e.ui.cluster.aws.ebs.type=
e2e.ui.test.run.tag=
e2e.ssh.cloud.region=
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2021 EPAM Systems, Inc. (https://www.epam.com/)
* Copyright 2017-2024 EPAM Systems, Inc. (https://www.epam.com/)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -145,10 +145,10 @@ private void setSystemPreferences(final String maxIdleTimeout,
.settings()
.switchToPreferences()
.switchToSystem()
.setMaxIdleTimeout(maxIdleTimeout)
.setIdleActionTimeout(idleActionTimeout)
.setIdleCpuThreshold(idleCpuThreshold)
.setIdleAction(idleAction)
.setMaxIdleTimeout(maxIdleTimeout)
.saveIfNeeded()
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ public void setPreferences() {
@BeforeMethod
public void openPage() {
open(C.ROOT_ADDRESS);
logoutIfNeeded();
loginAs(admin);
}

@AfterClass(alwaysRun = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.epam.pipeline.autotests.utils.PipelinePermission;
import com.epam.pipeline.autotests.utils.SystemParameter;
import com.epam.pipeline.autotests.utils.TestCase;

import com.epam.pipeline.autotests.utils.Utils;
import com.epam.pipeline.autotests.utils.listener.Cloud;
import com.epam.pipeline.autotests.utils.listener.CloudProviderOnly;
import org.testng.annotations.AfterClass;
Expand Down Expand Up @@ -95,9 +95,7 @@ public class LaunchParametersTest extends AbstractSeveralPipelineRunningTest
private static final int DEFAULT_TERMINATE_RUN_TIMEOUT = 1;
private static final int TEST_TERMINATE_RUN_TIMEOUT = DEFAULT_TERMINATE_RUN_TIMEOUT + 2;
private static final String UNMOUNTING_STARTED = "Unmounting all storage mounts";
private static final String CLEANUP_WORNING = "Will wait for %smin to let the run stop normally. " +
"Otherwise it will be terminated";
private static final String CLEANUP_FINISH_MESSAGE = "Run #%s is still running after %smin. Terminating a node.";
private static final String CLEANUP_WORNING = "Marking run as finished.";
private static final String CONSOLE = "Console";
private static final String CLEANUP_ENVIRONMENT_TASK = "CleanupEnvironment";
private static final String FILESYSTEM_AUTOSCALING = "FilesystemAutoscaling";
Expand All @@ -111,7 +109,7 @@ public class LaunchParametersTest extends AbstractSeveralPipelineRunningTest
private final String registry = C.DEFAULT_REGISTRY;
private final String group = C.DEFAULT_GROUP;
private final String tool = C.TESTING_TOOL_NAME;
private final String customTag = "test_tag";
private final String customTag = "test_tag" + Utils.randomSuffix();
private final String testProfile = "testprofile.q";
private static String testInstance = "r6i.%s";
private int[] scaling = new int[4];
Expand Down Expand Up @@ -200,6 +198,7 @@ public void checkSystemParametersForToolAndLaunchForm() {
.cancel()
.clickCustomParameter()
.setName(CP_FSBROWSER_ENABLED)
.close()
.messageShouldAppear(PARAMETER_IS_NOT_ALLOWED_FOR_USE)
);
tools()
Expand All @@ -211,6 +210,7 @@ public void checkSystemParametersForToolAndLaunchForm() {
.cancel()
.clickAddStringParameter()
.setName(CP_FSBROWSER_ENABLED)
.close()
.messageShouldAppear(PARAMETER_IS_NOT_ALLOWED_FOR_USE)
);
}
Expand All @@ -233,6 +233,7 @@ public void checkSystemParametersForPipelineAndDetachConfiguration() {
.cancel();
profile.clickAddStringParameter()
.setName(CP_FSBROWSER_ENABLED)
.setValue("")
.messageShouldAppear(PARAMETER_IS_NOT_ALLOWED_FOR_USE)
.click(REMOVE_PARAMETER);
});
Expand Down Expand Up @@ -264,6 +265,7 @@ public void checkAllowedSystemParametersForToolAndLaunchForm() {
.cancel()
.clickCustomParameter()
.setName(CP_FSBROWSER_ENABLED)
.close()
.messageShouldAppear(PARAMETER_IS_RESERVED)
);
tools()
Expand All @@ -274,6 +276,7 @@ public void checkAllowedSystemParametersForToolAndLaunchForm() {
.cancel()
.clickAddStringParameter()
.setName(CP_FSBROWSER_ENABLED)
.close()
.messageShouldAppear(NAME_IS_RESERVED)
);
}
Expand All @@ -293,6 +296,7 @@ public void checkAllowedSystemParametersForPipelineAndDetachConfiguration() {
.cancel();
profile.clickAddStringParameter()
.setName(CP_FSBROWSER_ENABLED)
.setValue("")
.messageShouldAppear(NAME_IS_RESERVED)
.click(REMOVE_PARAMETER);
});
Expand Down Expand Up @@ -443,12 +447,10 @@ public void forcibleTerminateInstancesIfJobIsStuckInUmount() {
.waitForLog(UNMOUNTING_STARTED)
.waitForTask(CLEANUP_ENVIRONMENT_TASK)
.clickTaskWithName(CLEANUP_ENVIRONMENT_TASK)
.ensure(log(), containsMessages(format(CLEANUP_WORNING, valueOf(TEST_TERMINATE_RUN_TIMEOUT))))
.ensure(log(), containsMessages(CLEANUP_WORNING))
.sleep(TEST_TERMINATE_RUN_TIMEOUT, MINUTES)
.refresh()
.shouldHaveStatus(STOPPED)
.ensure(log(), containsMessages(format(CLEANUP_FINISH_MESSAGE,
getLastRunId(), valueOf(TEST_TERMINATE_RUN_TIMEOUT))));
.shouldHaveStatus(STOPPED);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void dockerExtraMultiValidation() {
log
.waitForPauseButton()
.clickOnPauseButton()
.validateException("This operation may fail due to 'Out of disk' error")
.validateException("Free disk space is not enough")
.click(button(CANCEL.name()))
.shouldHaveStatus(LogAO.Status.WORKING)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,11 @@ public void parametersDoesntChangeOnSwitchingConfigurations() {
})
.sleep(5, SECONDS)
.editConfiguration(defaultProfile, profile ->
profile.refresh().ensure(byValue(firstParameter), visible)
profile.refresh().ensure(byValue(firstParameter), exist)
.ensure(byValue(firstParameterValue), visible)
)
.editConfiguration(anotherProfile, profile ->
profile.refresh().ensure(byValue(secondParameter), visible)
profile.refresh().ensure(byValue(secondParameter), exist)
.ensure(byValue(secondParameterValue), visible)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,18 @@ public void shouldCreateFileInSubfolder() {
.ensure(byText(pipelineFile), visible);
}

@Test(dependsOnMethods = {"shouldCreateFileInSubfolder"})
@Test(enabled = false, dependsOnMethods = {"shouldCreateFileInSubfolder"})
@TestCase(value = {"EPMCMBIBPC-344"})
public void luigiGraphTabShouldBeValid() {
codeTab()
.graphTab()
.ensure(CANVAS, exist);
}

@Test(dependsOnMethods = {"luigiGraphTabShouldBeValid"})
@Test(dependsOnMethods = {"shouldCreateFileInSubfolder"})
@TestCase(value = {"EPMCMBIBPC-345"})
public void documentTabShouldBeValid() {
graphTab()
codeTab()
.documentsTab()
.ensure(UPLOAD, visible, enabled)
.ensure(byText("README.md"), visible)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void python() {
pipelineFromTemplateFinishesCorrectly(Template.PYTHON, "Running python pipeline");
}

@Test
@Test(enabled = false)
@TestCase("EPMCMBIBPC-542")
public void luigi() {
pipelineFromTemplateFinishesCorrectly(Template.LUIGI, "Running luigi pipeline");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
*/
package com.epam.pipeline.autotests;

import com.epam.pipeline.autotests.ao.ClusterMenuAO;
import com.epam.pipeline.autotests.ao.LogAO;
import com.epam.pipeline.autotests.ao.NodePage;
import static com.epam.pipeline.autotests.ao.Primitive.ESTIMATED_PRICE;
import static com.epam.pipeline.autotests.ao.Primitive.SHOW_TIMINGS;
import com.epam.pipeline.autotests.ao.Template;
import com.epam.pipeline.autotests.mixins.Authorization;
import com.epam.pipeline.autotests.utils.C;
Expand Down Expand Up @@ -46,11 +45,15 @@
import static com.epam.pipeline.autotests.ao.LogAO.Status.SUCCESS;
import static com.epam.pipeline.autotests.ao.NodePage.*;
import static com.epam.pipeline.autotests.ao.Primitive.STATUS;
import static com.epam.pipeline.autotests.ao.Primitive.ESTIMATED_PRICE;
import static com.epam.pipeline.autotests.ao.Primitive.SHOW_TIMINGS;
import static com.epam.pipeline.autotests.ao.Primitive.NEXT_PAGE;
import static com.epam.pipeline.autotests.utils.Conditions.contains;
import static com.epam.pipeline.autotests.utils.Conditions.*;
import static com.epam.pipeline.autotests.utils.PipelineSelectors.*;
import static com.epam.pipeline.autotests.utils.Utils.resourceName;
import static com.epam.pipeline.autotests.utils.Utils.sleep;
import static com.epam.pipeline.autotests.utils.Utils.ON_DEMAND;
import static java.util.concurrent.TimeUnit.SECONDS;
import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toSet;
Expand All @@ -64,6 +67,8 @@ public class RunPipelineTest extends AbstractSeveralPipelineRunningTest implemen
private final String pipeline314 = resourceName("epmcmbibpc-314");
private final String pipeline306 = resourceName("epmcmbibpc-306");
private final String pipeline312 = resourceName("epmcmbibpc-312");
private String storage1 = "runPipelineTestStorage" + Utils.randomSuffix();
private String storage2 = "runPipelineTestStorage" + Utils.randomSuffix();

@AfterClass(alwaysRun = true)
public void removePipelines() {
Expand All @@ -76,7 +81,9 @@ public void removePipelines() {
.removePipelineIfExists(pipeline303)
.removePipelineIfExists(pipeline314)
.removePipelineIfExists(pipeline306)
.removePipelineIfExists(pipeline312);
.removePipelineIfExists(pipeline312)
.removeStorageIfExists(storage1)
.removeStorageIfExists(storage2);
}

@Test
Expand Down Expand Up @@ -124,11 +131,19 @@ public void cmdTemplateShouldBeCorrect() {
@TestCase("EPMCMBIBPC-100")
public void shouldLaunchPipeline() {
library()
.createStorage(storage1)
.createStorage(storage2)
.createPipeline(Template.PYTHON, pipeline100)
.clickOnPipeline(pipeline100)
.firstVersion()
.runPipeline()
.setLaunchOptions("20", C.DEFAULT_INSTANCE, "")
.selectDataStoragesToLimitMounts()
.clearSelection()
.searchStorage(storage1)
.clearSelection()
.searchStorage(storage2)
.ok()
.launch(this)
.ensure(tabWithName("Active Runs"), visible, selectedTab)
.ensure(runWithId(getLastRunId()), visible);
Expand Down Expand Up @@ -239,6 +254,7 @@ public void runShouldNotAppearInActiveRuns() {
.clickOnPipeline(pipeline312)
.firstVersion()
.runPipeline()
.setPriceType(ON_DEMAND)
.launch(this)
.showLog(getLastRunId())
.waitForCompletion();
Expand All @@ -253,11 +269,14 @@ public void runShouldNotAppearInActiveRuns() {
@Test(priority = 2, dependsOnMethods = "runShouldNotAppearInActiveRuns")
@TestCase({"EPMCMBIBPC-300", "EPMCMBIBPC-267"})
public void clusterNodePageShouldBeValid() {
clusterMenu()
ClusterMenuAO clusterMenuAO = clusterMenu()
.ensure(className("cluster__node-main-info"), visible, have(text("Cluster nodes")))
.ensure(button("Refresh"), visible, enabled)
.ensureAll(Combiners.select(not(master()), node(), "non-master node"), contains(button("TERMINATE")))
.ensureAll(Combiners.select(master(), node(), "master node"), not(contains(button("TERMINATE"))));
.ensure(button("Refresh"), visible, enabled);
while(clusterMenuAO.nextPageIsExist()) {
checkNodes();
clusterMenuAO.click(NEXT_PAGE);
}
checkNodes();
}

@Test(priority = 2, dependsOnMethods = "runShouldNotAppearInActiveRuns")
Expand All @@ -266,6 +285,7 @@ public void nodePageShouldBeValid() {
final By nonMasterNode = Combiners.select(
and("node neither master nor windows", not(master()), not(windows())),
node(), "any non-master node");
refresh();
clusterMenu()
.click(nonMasterNode, NodePage::new)
.ensure(button("Refresh"), visible, enabled)
Expand Down Expand Up @@ -300,4 +320,10 @@ private static Stream<String> prepareExpectedLogMessages(final String pipelineNa
private static LogAO onRunPage() {
return new LogAO();
}

private void checkNodes() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it will be better to use just one forEach() where we check the condition for each node() instead of the same two stream

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

clusterMenu().context().$$(node()).stream()
.forEach(node -> clusterMenu().ensure(node, node.is(master()) ?
not(contains(button("TERMINATE"))) : contains(button("TERMINATE"))));
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2023 EPAM Systems, Inc. (https://www.epam.com/)
* Copyright 2017-2024 EPAM Systems, Inc. (https://www.epam.com/)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,6 +17,7 @@

import com.epam.pipeline.autotests.ao.LogAO;
import com.epam.pipeline.autotests.ao.PipelineRunFormAO;
import static com.epam.pipeline.autotests.ao.Primitive.START_IDLE;
import com.epam.pipeline.autotests.ao.ToolDescription;
import com.epam.pipeline.autotests.ao.ToolPageAO;
import com.epam.pipeline.autotests.mixins.Authorization;
Expand All @@ -25,6 +26,7 @@
import com.epam.pipeline.autotests.utils.TestCase;
import java.util.function.Function;

import static com.epam.pipeline.autotests.utils.Utils.ON_DEMAND;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
Expand Down Expand Up @@ -211,6 +213,8 @@ public void validationOfDinDLaunchAndFunctionality() {
tools()
.perform(registry, group, tool, runTool())
.selectRunCapability("DinD")
.click(START_IDLE)
.setPriceType(ON_DEMAND)
.launch(this)
.showLog(getLastRunId())
.expandTab(PARAMETERS)
Expand Down Expand Up @@ -239,6 +243,8 @@ public void validationOfSingularityLaunchAndFunctionality() {
tools()
.perform(registry, group, tool, runTool())
.selectRunCapability("Singularity")
.click(START_IDLE)
.setPriceType(ON_DEMAND)
.launch(this)
.showLog(getLastRunId())
.expandTab(PARAMETERS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,10 @@ public void setParametersFromMetadataFilesSampleSet() {
byText(sampleNameAutocomplete))
)
.click(byText(sampleNameAutocomplete), in(comboboxDropdown()))
.click(save())
.sleep(2, SECONDS)
.ensure(SAVE, enabled)
.click(SAVE)
.ensureDisable(SAVE)
);
}

Expand All @@ -664,7 +667,6 @@ public void validateSampleSetPopup() {
.click(run(), MetadataSelection::new)
)
.ensure(byText(project), visible)
.cd(project)
.ensure(byText(metadataFolder), visible)
.ensure(MetadataSelection.header, text(project))
.ensure(MetadataSelection.folders, text(metadataFolder))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ public void validateEstimatedPriceAvailabilityForFilledTool() {
.ensure(PRICE_TABLE, visible)
.expandTab(PARAMETERS_PANEL)
.clickAddStringParameter()
.ensureVisible(PARAMETER_NAME, PARAMETER_VALUE, REMOVE_PARAMETER);
.ensureAll(exist, PARAMETER_NAME, PARAMETER_VALUE, REMOVE_PARAMETER);
}

private By message(final String text) {
Expand Down
Loading
Loading