Temporary fix for group tests. (#1223)

This commit is contained in:
Stan Silvert 2021-09-26 06:41:42 -04:00 committed by GitHub
parent 642503e26a
commit 1432b2712b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,7 +82,14 @@ describe("Group test", () => {
groupModal.fillGroupForm(groupName).clickCreate();
sidebarPage.waitForPageLoad();
groupModal.open().fillGroupForm(targetGroupName).clickCreate();
groupModal
.open("openCreateGroupModal")
.fillGroupForm(targetGroupName)
.clickCreate();
// For some reason, this fixes clickDetailMenu
sidebarPage.goToEvents();
sidebarPage.goToGroups();
listingPage.clickRowDetails(groupName).clickDetailMenu("Move to");
moveGroupModal
@ -102,13 +109,18 @@ describe("Group test", () => {
masthead.checkNotificationMessage("Group deleted");
});
// This test doesn't seem to do anything. The "Move to" dialog never opens.
// But the test somehow still passes.
it("Should move group to root", async () => {
const groups = ["group1", "group2"];
groupModal
.open("no-groups-in-this-realm-empty-action")
.fillGroupForm(groups[0])
.clickCreate();
groupModal.open().fillGroupForm(groups[1]).clickCreate();
groupModal
.open("openCreateGroupModal")
.fillGroupForm(groups[1])
.clickCreate();
listingPage.clickRowDetails(groups[0]).clickDetailMenu("Move to");
moveGroupModal.clickRoot().clickMove();
@ -163,7 +175,10 @@ describe("Group test", () => {
detailPage.checkListSubGroup([groups[1]]);
const added = "addedGroup";
groupModal.open().fillGroupForm(added).clickCreate();
groupModal
.open("openCreateGroupModal")
.fillGroupForm(added)
.clickCreate();
detailPage.checkListSubGroup([added, groups[1]]);
});