-
Notifications
You must be signed in to change notification settings - Fork 59
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 custom capabilities testcases #2287
Conversation
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.
Fix remarks, please.
docs/testcases/UI/Run_tools_in_sandbox/Launch_parameters/2234.md
Outdated
Show resolved
Hide resolved
docs/testcases/UI/Run_tools_in_sandbox/Launch_parameters/2234.md
Outdated
Show resolved
Hide resolved
docs/testcases/UI/Run_tools_in_sandbox/Launch_parameters/2234.md
Outdated
Show resolved
Hide resolved
docs/testcases/UI/Run_tools_in_sandbox/Launch_parameters/2234.md
Outdated
Show resolved
Hide resolved
docs/testcases/UI/Run_tools_in_sandbox/Launch_parameters/2234.md
Outdated
Show resolved
Hide resolved
docs/testcases/UI/Run_tools_in_sandbox/Launch_parameters/2234.md
Outdated
Show resolved
Hide resolved
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.
Fix remarks, please
docs/testcases/UI/Run_tools_in_sandbox/Launch_parameters/2234.md
Outdated
Show resolved
Hide resolved
docs/testcases/UI/Run_tools_in_sandbox/Launch_parameters/2234.md
Outdated
Show resolved
Hide resolved
docs/testcases/UI/Run_tools_in_sandbox/Launch_parameters/2295.md
Outdated
Show resolved
Hide resolved
docs/testcases/UI/Run_tools_in_sandbox/Launch_parameters/2295.md
Outdated
Show resolved
Hide resolved
"MY_NUMBER_PARAM": 2 | ||
} | ||
} | ||
} |
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.
Add a new line, please
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.
Done
"echo 'testLine2' >> ~/testFile1.txt" | ||
] | ||
} | ||
} |
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.
Add a new line, please
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.
Done
private static final String CUSTOM_CAPABILITIES_1_JSON = "/customCapabilities1.json"; | ||
private static final String CUSTOM_CAPABILITIES_2_JSON = "/customCapabilities2.json"; |
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.
Let's move constants over instance variables
https://www.oracle.com/java/technologies/javase/codeconventions-fileorganization.html
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.
Done
public String getPreference(String preference) { | ||
searchPreference(preference); | ||
String[] strings = context().$(byClassName("CodeMirror-code")) | ||
.findAll(byClassName("CodeMirror-line")).texts().toArray(new String[0]); |
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.
Why should we result in String[] instead of 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.
Done
searchPreference(preference); | ||
String[] strings = context().$(byClassName("CodeMirror-code")) | ||
.findAll(byClassName("CodeMirror-line")).texts().toArray(new String[0]); | ||
return String.join("\n", strings); |
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.
What if strings
are empty or contain just one value? We should check it before joining with \n
for (int i = 0; i < 100; i++) { | ||
actions().sendKeys(Keys.DELETE).perform(); | ||
} |
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.
Do we really need this?
@AfterClass(alwaysRun = true) | ||
public void fallBackToDefaultToolSettings() { | ||
logoutIfNeeded(); | ||
loginAs(admin); | ||
open(C.ROOT_ADDRESS); |
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.
Should we open the root address twice (we already open it in loginAs())?
.launch(this) | ||
.showLog(getLastRunId()) | ||
.expandTab(PARAMETERS) | ||
.ensure(configurationParameter(format("CP_CAP_CUSTOM_%s", custCapability1), "true"), exist) |
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.
"CP_CAP_CUSTOM_%s" can be constant
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.
Done
.waitForSshLink() | ||
.click(taskWithName("Console")) | ||
.waitForLog("start.sh") | ||
.ensure(log(), matchText(format("Running '%s' commands:", custCapability1))) |
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.
"Running '%s' commands:" can be constant
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.
Done
Signed-off-by: kamyshova <yulia_kamyshova@epam.com>
This PR provides tests for "Custom" capabilities implementation #2234 and #2295