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 custom capabilities testcases #2287

Merged
merged 25 commits into from
Nov 22, 2021
Merged

Conversation

maryvictol
Copy link
Collaborator

@maryvictol maryvictol commented Nov 8, 2021

This PR provides tests for "Custom" capabilities implementation #2234 and #2295

@maryvictol maryvictol added sys/docs Requires changes to the documentation sys/e2e Issues related to the e2e tests automation labels Nov 8, 2021
Copy link
Collaborator

@NShaforostov NShaforostov left a comment

Choose a reason for hiding this comment

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

Fix remarks, please.

Copy link
Collaborator

@NShaforostov NShaforostov left a comment

Choose a reason for hiding this comment

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

Fix remarks, please

"MY_NUMBER_PARAM": 2
}
}
}
Copy link
Contributor

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

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

"echo 'testLine2' >> ~/testFile1.txt"
]
}
}
Copy link
Contributor

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

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

Comment on lines 51 to 52
private static final String CUSTOM_CAPABILITIES_1_JSON = "/customCapabilities1.json";
private static final String CUSTOM_CAPABILITIES_2_JSON = "/customCapabilities2.json";
Copy link
Contributor

Choose a reason for hiding this comment

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

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

public String getPreference(String preference) {
searchPreference(preference);
String[] strings = context().$(byClassName("CodeMirror-code"))
.findAll(byClassName("CodeMirror-line")).texts().toArray(new String[0]);
Copy link
Contributor

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?

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

searchPreference(preference);
String[] strings = context().$(byClassName("CodeMirror-code"))
.findAll(byClassName("CodeMirror-line")).texts().toArray(new String[0]);
return String.join("\n", strings);
Copy link
Contributor

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

Comment on lines 1190 to 1192
for (int i = 0; i < 100; i++) {
actions().sendKeys(Keys.DELETE).perform();
}
Copy link
Contributor

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);
Copy link
Contributor

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)
Copy link
Contributor

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

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

.waitForSshLink()
.click(taskWithName("Console"))
.waitForLog("start.sh")
.ensure(log(), matchText(format("Running '%s' commands:", custCapability1)))
Copy link
Contributor

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

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

@maryvictol maryvictol requested a review from kamyshova November 16, 2021 08:29
Signed-off-by: kamyshova <yulia_kamyshova@epam.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sys/docs Requires changes to the documentation sys/e2e Issues related to the e2e tests automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants