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

Merged
merged 57 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 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
62d3fca
Update parameters methods
maryvictol Nov 20, 2024
3f44cb6
Small fix locator
maryvictol Nov 20, 2024
68381f6
Add debug to run.sh
maryvictol Nov 25, 2024
795b9a0
Add debug to run.sh
maryvictol Nov 26, 2024
f24137d
Add vnc2flv3 to run.sh
maryvictol Dec 17, 2024
52aa805
Update run.sh
maryvictol Dec 18, 2024
15c971c
Update E2E run.sh to record several video
kamyshova Dec 24, 2024
7407b00
Update E2E run.sh to record several video 2
kamyshova Dec 24, 2024
556f60d
Update recording
kamyshova Dec 25, 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=
56 changes: 56 additions & 0 deletions e2e/gui/recording.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash

# Copyright 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.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

PASSWORD_FILE=$USER_HOME_DIR/e2e/gui/password.txt
CURRENT_DATE=$(date +"%Y-%m-%d")
STAND_NAME=$(grep -i "e2e.ui.root.address=https://" /$USER_HOME_DIR/e2e/gui/default.conf | sed -n 's/.*https:\x2F\x2F*//p' | awk -F. '{print $1}')
RECORDING_LOG="/var/log/recording.log"
ITERATION=1

function sig_handler {
echo "Received SIGTERM, stopping current recording and starting a new one."
if [ $APP_PID -ne 0 ]; then
kill -SIGTERM "$APP_PID" 2>/dev/null
wait "$APP_PID"
fi
ITERATION=$((ITERATION + 1))
recording &
}

function recording() {
output_file="${STAND_NAME}_${CURRENT_DATE}_${ITERATION}.flv"
echo "Starting recording: $output_file"
nohup /tmp/vnc2flv-20100207/tools/flvrec.py -d -o "${output_file}" -P "${PASSWORD_FILE}" localhost:1 &> $RECORDING_LOG &
RECORD_PID=$!
echo "Started recording with pid: $RECORD_PID"
wait $RECORD_PID
RECORD_EXIT_STATUS=$?
if [ $RECORD_EXIT_STATUS -eq 0 ]; then
echo "Recording $output_file completed successfully."
exit 0
else
ITERATION=$((ITERATION + 1))
echo "Recording $output_file failed."
fi
}

trap 'sig_handler' SIGTERM SIGINT
while true; do
recording
done &

tail -F $RECORDING_LOG &
wait
6 changes: 1 addition & 5 deletions e2e/gui/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@ set -e

_RECORDING="$1"

PASSWORD_FILE=$USER_HOME_DIR/e2e/gui/password.txt
CURRENT_DATE=$(date +"%Y-%m-%d")
STAND_NAME=$(grep -i "e2e.ui.root.address=https://" /$USER_HOME_DIR/e2e/gui/default.conf | sed -n 's/.*https:\x2F\x2F*//p' | awk -F. '{print $1}')

if [ "$_RECORDING" == "true" ]; then
/tmp/vnc2flv-20100207/tools/flvrec.py -o "${STAND_NAME}_${CURRENT_DATE}.flv" -P "${PASSWORD_FILE}" localhost:1 & \
chmod +x recording.sh && bash recording.sh &
./gradlew clean test
else
./gradlew clean test
Expand Down
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 @@ -43,7 +43,7 @@ public void preparePipeline() {
.replace("{{instance_type}}", C.DEFAULT_INSTANCE));
}

@Test
@Test(dependsOnMethods = "preparePipeline")
@TestCase("EPMCMBIBPC-367")
public void validateParameters() {
new PipelineCodeTabAO(getPipelineName())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ public void launchPipelineWithNewParameter() {
new PipelineCodeTabAO(getPipelineName())
.sleep(2, SECONDS)
.runPipeline()
.addOutputParameter("output", pathToFile)
.clickAddOutputParameter()
.setName("output")
.setValue(pathToFile)
.close()
.waitUntilLaunchButtonAppear()
.launchAndWaitUntilFinished(this);
}
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,20 @@ 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)
.selectStorage(storage1)
.searchStorage(storage2)
.selectStorage(storage2)
.ok()
.launch(this)
.ensure(tabWithName("Active Runs"), visible, selectedTab)
.ensure(runWithId(getLastRunId()), visible);
Expand Down Expand Up @@ -239,6 +255,7 @@ public void runShouldNotAppearInActiveRuns() {
.clickOnPipeline(pipeline312)
.firstVersion()
.runPipeline()
.setPriceType(ON_DEMAND)
.launch(this)
.showLog(getLastRunId())
.waitForCompletion();
Expand All @@ -253,11 +270,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 +286,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 +321,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"))));
}
}
Loading