-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Rework selenium tests from organizations package #7389
Conversation
…ganizationTests
…ganizationTests
…ganizationTests
* | ||
* @author Ann Shumilova | ||
*/ | ||
public class DeleteOrganizationTest { | ||
private static final String PARENT_ORG_NAME = generate("organization", 5); |
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 add "parent-" prefix to the name to simplify test result review.
* | ||
* @author Ann Shumilova | ||
*/ | ||
public class DeleteOrganizationTest { | ||
private static final String PARENT_ORG_NAME = generate("organization", 5); | ||
private static final String CHILD_ORG_NAME = generate("organization", 5); |
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 add "child-" prefix to the name to simplify test result review.
testOrganizationServiceClient.deleteById(childOrganization.getId()); | ||
testOrganizationServiceClient.deleteById(parentOrganization.getId()); | ||
for (OrganizationDto organization : organizations) | ||
testOrganizationServiceClient.deleteById(organization.getId()); |
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.
Such code can affect organizations which are created in parallel threads of test execution.
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.
The Organizations list includes only organizations from this test.
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.
I see.
organizations
field is used for tearDown() method only.
To simplify the code, we could avoid usage of organizations
field at all and to remove two organizations explicitly instead:
testOrganizationServiceClient.deleteById(childOrganization.getId());
testOrganizationServiceClient.deleteById(parentOrganization.getId());
public void testSubOrganizationRename() { | ||
String organizationPath = NEW_PARENT_ORG_NAME + "/" + CHILD_ORG_NAME; | ||
String path = NEW_PARENT_ORG_NAME + "/" + NEW_CHILD_ORG_NAME; |
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.
assertFalse(organizationPage.isWorkspaceCapReadonly()); | ||
assertFalse(organizationPage.isRunningCapReadonly()); | ||
assertFalse(organizationPage.isRAMCapReadonly()); | ||
assertFalse(organizationPage.isWorkspaceCapReadonly()); |
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.
Good catch!
It seems the most notices from previous pull request were fixed in the request. |
* reworked deleting organizations in AfterClass, deleted unused user, deleted test methods with similar use cases, created selenium test for checking organization creation. * selenium tests reworked for starting in test suites
What does this PR do?
We need rework selenium tests from organizations package:
What issues does this PR fix or reference?
#7121