diff --git a/src/main/java/org/olat/course/nodes/en/ENRunController.java b/src/main/java/org/olat/course/nodes/en/ENRunController.java index 5b4e558fa611b8d3beae97a437ad15aec24d2456..8fea895493b1b5c8833f5f3321547fc54e37a7a2 100644 --- a/src/main/java/org/olat/course/nodes/en/ENRunController.java +++ b/src/main/java/org/olat/course/nodes/en/ENRunController.java @@ -218,7 +218,7 @@ public class ENRunController extends BasicController implements GenericEventList // fire event to indicate runmaincontroller that the menuview is to update doEnrollView(updateModel()); if (enrollStatus.isEnrolled() ) { - fireEvent(ureq, new BusinessGroupModifiedEvent(BusinessGroupModifiedEvent.IDENTITY_ADDED_EVENT, choosenGroup, getIdentity())); + fireEvent(ureq, new BusinessGroupModifiedEvent(BusinessGroupModifiedEvent.IDENTITY_ADDED_EVENT, choosenGroup, getIdentity(), null)); } else { fireEvent(ureq, Event.DONE_EVENT); } @@ -236,7 +236,7 @@ public class ENRunController extends BasicController implements GenericEventList } // fire event to indicate runmaincontroller that the menuview is to update - fireEvent(ureq, new BusinessGroupModifiedEvent(BusinessGroupModifiedEvent.IDENTITY_REMOVED_EVENT, choosenGroup, getIdentity())); + fireEvent(ureq, new BusinessGroupModifiedEvent(BusinessGroupModifiedEvent.IDENTITY_REMOVED_EVENT, choosenGroup, getIdentity(), null)); // events are already fired BusinessGroupManager level :: BusinessGroupModifiedEvent.fireModifiedGroupEvents(BusinessGroupModifiedEvent.IDENTITY_REMOVED_EVENT, group, ureq.getIdentity()); // but async doEnrollView(updateModel()); diff --git a/src/main/java/org/olat/course/nodes/projectbroker/service/ProjectGroupManagerImpl.java b/src/main/java/org/olat/course/nodes/projectbroker/service/ProjectGroupManagerImpl.java index 9c84861bf9c1631e91849b5982833bbf9536d107..539c51c1b31ed9c97bc348c76b64ba23db8618be 100644 --- a/src/main/java/org/olat/course/nodes/projectbroker/service/ProjectGroupManagerImpl.java +++ b/src/main/java/org/olat/course/nodes/projectbroker/service/ProjectGroupManagerImpl.java @@ -332,7 +332,7 @@ public class ProjectGroupManagerImpl implements ProjectGroupManager { public void sendGroupChangeEvent(Project project, Long courseResourceableId, Identity identity) { ICourse course = CourseFactory.loadCourse(courseResourceableId); RepositoryEntry ores = course.getCourseEnvironment().getCourseGroupManager().getCourseEntry(); - MultiUserEvent modifiedEvent = new BusinessGroupModifiedEvent(BusinessGroupModifiedEvent.IDENTITY_ADDED_EVENT, project.getProjectGroup(), identity); + MultiUserEvent modifiedEvent = new BusinessGroupModifiedEvent(BusinessGroupModifiedEvent.IDENTITY_ADDED_EVENT, project.getProjectGroup(), identity, null); CoordinatorManager.getInstance().getCoordinator().getEventBus().fireEventToListenersOf(modifiedEvent, ores); } diff --git a/src/main/java/org/olat/group/ui/edit/BusinessGroupEditController.java b/src/main/java/org/olat/group/ui/edit/BusinessGroupEditController.java index ef77de96e97db8e06493360ca81f166377aaef31..4b5c74b65770a14109fa93842a8edd38db4b89f6 100644 --- a/src/main/java/org/olat/group/ui/edit/BusinessGroupEditController.java +++ b/src/main/java/org/olat/group/ui/edit/BusinessGroupEditController.java @@ -259,7 +259,7 @@ public class BusinessGroupEditController extends BasicController implements Cont fireEvent(ureq, event); // notify current active users of this business group BusinessGroupModifiedEvent - .fireModifiedGroupEvents(BusinessGroupModifiedEvent.CONFIGURATION_MODIFIED_EVENT, currBusinessGroup, null); + .fireModifiedGroupEvents(BusinessGroupModifiedEvent.CONFIGURATION_MODIFIED_EVENT, currBusinessGroup, null, getIdentity()); } } else if (source == alreadyLockedDialogController) { //closed dialog box either by clicking ok, or closing the box @@ -276,7 +276,7 @@ public class BusinessGroupEditController extends BasicController implements Cont setAllTabs(ureq); // notify current active users of this business group BusinessGroupModifiedEvent - .fireModifiedGroupEvents(BusinessGroupModifiedEvent.CONFIGURATION_MODIFIED_EVENT, currBusinessGroup, null); + .fireModifiedGroupEvents(BusinessGroupModifiedEvent.CONFIGURATION_MODIFIED_EVENT, currBusinessGroup, null, getIdentity()); // do logging ThreadLocalUserActivityLogger.log(GroupLoggingAction.GROUP_CONFIGURATION_CHANGED, getClass()); } diff --git a/src/main/java/org/olat/group/ui/edit/BusinessGroupMembersController.java b/src/main/java/org/olat/group/ui/edit/BusinessGroupMembersController.java index d52423d4db208790fcf2b0b1fffc1939bf2c1445..65ff3c11527e1896b016abbf5225accfbc8d520a 100644 --- a/src/main/java/org/olat/group/ui/edit/BusinessGroupMembersController.java +++ b/src/main/java/org/olat/group/ui/edit/BusinessGroupMembersController.java @@ -169,7 +169,7 @@ public class BusinessGroupMembersController extends BasicController { fireEvent(ureq, event); // notify current active users of this business group - BusinessGroupModifiedEvent.fireModifiedGroupEvents(BusinessGroupModifiedEvent.CONFIGURATION_MODIFIED_EVENT, businessGroup, null); + BusinessGroupModifiedEvent.fireModifiedGroupEvents(BusinessGroupModifiedEvent.CONFIGURATION_MODIFIED_EVENT, businessGroup, null, getIdentity()); // do loggin ThreadLocalUserActivityLogger.log(GroupLoggingAction.GROUP_CONFIGURATION_CHANGED, getClass()); } @@ -180,7 +180,7 @@ public class BusinessGroupMembersController extends BasicController { fireEvent(ureq, event); // notify current active users of this business group - BusinessGroupModifiedEvent.fireModifiedGroupEvents(BusinessGroupModifiedEvent.CONFIGURATION_MODIFIED_EVENT, businessGroup, null); + BusinessGroupModifiedEvent.fireModifiedGroupEvents(BusinessGroupModifiedEvent.CONFIGURATION_MODIFIED_EVENT, businessGroup, null, getIdentity()); // do loggin ThreadLocalUserActivityLogger.log(GroupLoggingAction.GROUP_CONFIGURATION_CHANGED, getClass()); } diff --git a/src/main/java/org/olat/group/ui/edit/BusinessGroupModifiedEvent.java b/src/main/java/org/olat/group/ui/edit/BusinessGroupModifiedEvent.java index 8e6c2396e8fc359a0801eee7ebd28943eb7460dd..9ea16843561f9446098450f121ffdf875f34835a 100644 --- a/src/main/java/org/olat/group/ui/edit/BusinessGroupModifiedEvent.java +++ b/src/main/java/org/olat/group/ui/edit/BusinessGroupModifiedEvent.java @@ -30,6 +30,7 @@ import java.util.Iterator; import java.util.List; import org.olat.basesecurity.GroupRoles; +import org.olat.basesecurity.IdentityRef; import org.olat.core.CoreSpringFactory; import org.olat.core.id.Identity; import org.olat.core.util.coordinate.CoordinatorManager; @@ -66,17 +67,18 @@ public class BusinessGroupModifiedEvent extends MultiUserEvent { private Long groupKey; private Long identityKey; private boolean isTutor = false; - + private Long senderKey; /** * @param command one of the class constants * @param group * @param identity */ - public BusinessGroupModifiedEvent(String command, BusinessGroup group, Identity identity) { + public BusinessGroupModifiedEvent(String command, BusinessGroup group, IdentityRef identity, IdentityRef sender) { super(command); this.groupKey = group.getKey(); this.identityKey = (identity == null ? null : identity.getKey()); + this.senderKey = (sender == null ? null : sender.getKey()); if (identity != null) { if (command.equals(MYSELF_ASOWNER_REMOVED_EVENT)) { isTutor = true; // Removed myself as tutor/owner from group @@ -92,6 +94,10 @@ public class BusinessGroupModifiedEvent extends MultiUserEvent { public Long getModifiedGroupKey() { return this.groupKey; } + + public boolean isSender(IdentityRef identity) { + return senderKey != null && identity != null && senderKey.equals(identity.getKey()); + } /** * @return The key of the affected identity @@ -138,7 +144,6 @@ public class BusinessGroupModifiedEvent extends MultiUserEvent { if (added) { // load the business group and add it to the groups list BusinessGroup nGroup = CoreSpringFactory.getImpl(BusinessGroupService.class).loadBusinessGroup(modKey); - // if (SyncHelper.) if(nGroup != null) { businessGroups.add(nGroup); } @@ -165,8 +170,8 @@ public class BusinessGroupModifiedEvent extends MultiUserEvent { * @param group The group affected by the modification * @param identity The identity affected by the modification */ - public static void fireModifiedGroupEvents(String command, BusinessGroup group, Identity identity) { - BusinessGroupModifiedEvent modifiedEvent = new BusinessGroupModifiedEvent(command, group, identity); + public static void fireModifiedGroupEvents(String command, BusinessGroup group, Identity identity, IdentityRef sender) { + BusinessGroupModifiedEvent modifiedEvent = new BusinessGroupModifiedEvent(command, group, identity, sender); EventBus eventBus = CoordinatorManager.getInstance().getCoordinator().getEventBus(); // 1) notify listeners of group events eventBus.fireEventToListenersOf(modifiedEvent, group); @@ -180,15 +185,14 @@ public class BusinessGroupModifiedEvent extends MultiUserEvent { } public static Deferred createDeferredEvent(String command, BusinessGroup group, Identity identity) { - Deferred modifiedEvent = new Deferred(command, group, identity); - return modifiedEvent; + return new Deferred(command, group, identity); } public static void fireDeferredEvents(List<Deferred> events) { if(events == null || events.isEmpty()) return; for(Deferred deferedEvent:events) { - fireModifiedGroupEvents(deferedEvent.command, deferedEvent.group, deferedEvent.identity); + fireModifiedGroupEvents(deferedEvent.command, deferedEvent.group, deferedEvent.identity, null); } } diff --git a/src/main/java/org/olat/group/ui/run/BusinessGroupMainRunController.java b/src/main/java/org/olat/group/ui/run/BusinessGroupMainRunController.java index ed10bd29e4f493a82d5d972848f814fb15c01728..30421204cabf5346599ea105acd4ed773909236a 100644 --- a/src/main/java/org/olat/group/ui/run/BusinessGroupMainRunController.java +++ b/src/main/java/org/olat/group/ui/run/BusinessGroupMainRunController.java @@ -1014,6 +1014,9 @@ public class BusinessGroupMainRunController extends MainLayoutBasicController im } else if (event instanceof BusinessGroupModifiedEvent) { BusinessGroupModifiedEvent bgmfe = (BusinessGroupModifiedEvent) event; if (event.getCommand().equals(BusinessGroupModifiedEvent.CONFIGURATION_MODIFIED_EVENT)) { + if(bgmfe.isSender(getIdentity())) { + return;// receive event by other means + } // reset business group property manager // update reference to update business group object businessGroup = businessGroupService.loadBusinessGroup(businessGroup); @@ -1124,7 +1127,18 @@ public class BusinessGroupMainRunController extends MainLayoutBasicController im gtnChild.setUserObject(ACTIVITY_MENUSELECT_MEMBERSLIST); gtnChild.setAltText(translate("menutree.members.alt")); gtnChild.setIconCssClass("o_icon_group"); - gtnChild.setCssClass("o_sel_group_members"); + StringBuilder selCss = new StringBuilder(); + selCss.append("o_sel_group_members"); + if(businessGroup.isOwnersVisibleIntern()) { + selCss.append(" o_sel_group_owners_members"); + } + if(businessGroup.isParticipantsVisibleIntern()) { + selCss.append(" o_sel_group_participants_members"); + } + if(businessGroup.isWaitingListVisibleIntern()) { + selCss.append(" o_sel_group_waiting_members"); + } + gtnChild.setCssClass(selCss.toString()); root.addChild(gtnChild); nodeGroupOwners = gtnChild; } diff --git a/src/test/java/org/olat/group/test/BusinessGroupMembershipProcessorTest.java b/src/test/java/org/olat/group/test/BusinessGroupMembershipProcessorTest.java index 24bc35c5b9dfc03d14d46350d1d9fffa9aab41a7..91bcbe9653215ffcd50dd63498f9a12451566789 100644 --- a/src/test/java/org/olat/group/test/BusinessGroupMembershipProcessorTest.java +++ b/src/test/java/org/olat/group/test/BusinessGroupMembershipProcessorTest.java @@ -130,7 +130,7 @@ public class BusinessGroupMembershipProcessorTest extends OlatTestCase { dbInstance.commitAndCloseSession(); //manually trigger the event - businessGroupMembershipProcessor.event(new BusinessGroupModifiedEvent(BusinessGroupModifiedEvent.IDENTITY_REMOVED_EVENT, businessGroup, member)); + businessGroupMembershipProcessor.event(new BusinessGroupModifiedEvent(BusinessGroupModifiedEvent.IDENTITY_REMOVED_EVENT, businessGroup, member, null)); dbInstance.commitAndCloseSession(); //check that subscription of member was not deleted because it's still coach diff --git a/src/test/java/org/olat/selenium/BusinessGroupTest.java b/src/test/java/org/olat/selenium/BusinessGroupTest.java index 7603e273a2773ff14b796cefa3cfd6970d2e5efa..b36f819238df39d83f1330e0327ba836b004109e 100644 --- a/src/test/java/org/olat/selenium/BusinessGroupTest.java +++ b/src/test/java/org/olat/selenium/BusinessGroupTest.java @@ -867,15 +867,14 @@ public class BusinessGroupTest extends Deployments { .quickPublish(UserAccess.registred); courseEditor.clickToolbarBack(); - for(String groupName:groups){ - navBar - .openGroups(browser) - .selectGroup(groupName) - .openAdministration() - .openAdminMembers() - .setVisibility(true, true, false) - .openMembers(); + navBar + .openGroups(browser) + .selectGroup(groupName) + .openAdministration() + .openAdminMembers() + .setVisibility(true, true, false) + .openMembers(); } //Ryomou open the course @@ -907,8 +906,9 @@ public class BusinessGroupTest extends Deployments { //assert that that no more enrollment is allowed enrollmentPage .assertNoEnrollmentAllowed(); - } + + /** * An author create a course and a business group in the members * management. It has max. participants set to 1 and no waiting list. diff --git a/src/test/java/org/olat/selenium/page/core/ContactPage.java b/src/test/java/org/olat/selenium/page/core/ContactPage.java index 58461d5abbb28e6432cab9fee4503c37d8fd731c..d3e87f6e67e82afc75621f7d5101a6eb87eaea94 100644 --- a/src/test/java/org/olat/selenium/page/core/ContactPage.java +++ b/src/test/java/org/olat/selenium/page/core/ContactPage.java @@ -26,6 +26,7 @@ import org.olat.selenium.page.graphene.OOGraphene; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.firefox.FirefoxDriver; /** * @@ -64,10 +65,13 @@ public class ContactPage { public ContactPage send() { By buttonsBy = By.xpath("//div[contains(@class,'o_sel_contact_buttons')]"); OOGraphene.scrollTo(buttonsBy, browser); + if(browser instanceof FirefoxDriver) { + OOGraphene.waitingALittleLonger(); + } By sendBy = By.cssSelector("fieldset.o_sel_contact_form button.btn-primary"); browser.findElement(sendBy).click(); By disabledBy = By.cssSelector("fieldset.o_sel_contact_form div.o_sel_contact_body div.o_disabled"); - OOGraphene.waitElement(disabledBy, browser); + OOGraphene.waitElementSlowly(disabledBy, 10, browser); OOGraphene.moveTop(browser); OOGraphene.waitAndCloseBlueMessageWindow(browser); diff --git a/src/test/java/org/olat/selenium/page/graphene/Position.java b/src/test/java/org/olat/selenium/page/graphene/Position.java index ccb62e1119566ed65a4b6369a1d8d18e7d15ceef..3a7480c2fda9dff150571a8afea632ea43ca8c73 100644 --- a/src/test/java/org/olat/selenium/page/graphene/Position.java +++ b/src/test/java/org/olat/selenium/page/graphene/Position.java @@ -23,7 +23,6 @@ import java.util.List; import org.olat.ims.qti21.model.xml.AssessmentItemFactory; import org.openqa.selenium.Dimension; -import org.openqa.selenium.WebDriver; /** * @@ -49,7 +48,7 @@ public class Position { return y; } - public static Position valueOf(String coords, Dimension dimension, WebDriver browser) { + public static Position valueOf(String coords, Dimension dimension) { List<Integer> coordList = AssessmentItemFactory.coordsList(coords); int x = 0; @@ -71,13 +70,13 @@ public class Position { return new Position(x, y); } - public static Position valueOf(int x, int y, Dimension dimension, WebDriver browser) { + public static Position valueOf(int x, int y, Dimension dimension) { x = x - Math.round(dimension.getWidth() / 2.0f); y = y - Math.round(dimension.getHeight() / 2.0f); return new Position(x, y); } - public static Position valueOf(int x, int y, int firefoxCorrection, Dimension dimension, WebDriver browser) { + public static Position valueOf(int x, int y, int firefoxCorrection, Dimension dimension) { x = x - Math.round(dimension.getWidth() / 2.0f); y = y - Math.round(dimension.getHeight() / 2.0f); x += firefoxCorrection; @@ -85,7 +84,7 @@ public class Position { return new Position(x, y); } - public static Position valueOf(int x, int y, int width, int height, WebDriver browser) { + public static Position valueOf(int x, int y, int width, int height) { x = x - Math.round(width / 2.0f); y = y - Math.round(height / 2.0f); return new Position(x, y); diff --git a/src/test/java/org/olat/selenium/page/group/GroupPage.java b/src/test/java/org/olat/selenium/page/group/GroupPage.java index 37ab6a1235df4d63c675196660e317e187fba784..56622d6fae2d69e66b30f6a0d31bc5588ba7282e 100644 --- a/src/test/java/org/olat/selenium/page/group/GroupPage.java +++ b/src/test/java/org/olat/selenium/page/group/GroupPage.java @@ -50,7 +50,6 @@ public class GroupPage { private static final By toolsBy = By.className("o_sel_collab_tools"); private static final By editDetails = By.className("o_sel_group_edit_title"); private static final By bookingConfigBy = By.className("o_sel_accesscontrol_create"); - private static final By memberMenuItem = By.cssSelector("li.o_sel_group_members a"); private static final Tool calendarTool = new Tool( By.cssSelector("li.o_sel_group_calendar a"), @@ -124,19 +123,19 @@ public class GroupPage { public IMPage openChat() { openMenuItem(chatTool); - OOGraphene.waitElement(By.cssSelector("a.o_sel_im_open_tool_chat"), 2, browser); + OOGraphene.waitElement(By.cssSelector("a.o_sel_im_open_tool_chat"), browser); return new IMPage(browser); } public CalendarPage openCalendar() { openMenuItem(calendarTool); - OOGraphene.waitElement(CalendarPage.calendarToolbatBy, 2, browser); + OOGraphene.waitElement(CalendarPage.calendarToolbatBy, browser); return new CalendarPage(browser); } public ContactPage openContact() { openMenuItem(contactTool); - OOGraphene.waitElement(By.cssSelector("fieldset.o_sel_contact_form"), 5, browser); + OOGraphene.waitElement(By.cssSelector("fieldset.o_sel_contact_form"), browser); return new ContactPage(browser); } @@ -147,35 +146,36 @@ public class GroupPage { public InfoMessageCEPage openNews() { openMenuItem(newsTool); - OOGraphene.waitElement(By.className("o_infomsg"), 5, browser); + OOGraphene.waitElement(By.className("o_infomsg"), browser); return new InfoMessageCEPage(browser); } public FolderPage openFolder() { openMenuItem(folderTool); - OOGraphene.waitElement(FolderPage.folderBy, 5, browser); + OOGraphene.waitElement(FolderPage.folderBy, browser); return new FolderPage(browser); } public ForumPage openForum() { openMenuItem(forumTool); - OOGraphene.waitElement(ForumPage.threadTableBy, 5, browser); + OOGraphene.waitElement(ForumPage.threadTableBy, browser); return ForumPage.getGroupForumPage(browser); } public WikiPage openWiki() { openMenuItem(wikiTool); - OOGraphene.waitElement(WikiPage.wikiWrapperBy, 5, browser); + OOGraphene.waitElement(WikiPage.wikiWrapperBy, browser); return WikiPage.getGroupWiki(browser); } public BinderPage openPortfolio() { openMenuItem(portfolioTool); - OOGraphene.waitElement(BinderPage.portfolioBy, 5, browser); + OOGraphene.waitElement(BinderPage.portfolioBy, browser); return new BinderPage(browser); } private GroupPage openMenuItem(Tool tool) { + OOGraphene.waitElement(tool.getMenuItemBy(), browser); browser.findElement(tool.getMenuItemBy()).click(); OOGraphene.waitBusy(browser); return this; @@ -206,21 +206,24 @@ public class GroupPage { By showOwnersBy = By.cssSelector(".o_sel_group_show_owners input[type='checkbox']"); browser.findElement(showOwnersBy).click(); OOGraphene.waitBusy(browser); - OOGraphene.waitElement(memberMenuItem, browser); + By withOwnersBy = By.cssSelector("li.o_sel_group_members.o_sel_group_owners_members a"); + OOGraphene.waitElement(withOwnersBy, browser); } if(participants) { By showParticipants = By.cssSelector(".o_sel_group_show_participants input[type='checkbox']"); browser.findElement(showParticipants).click(); OOGraphene.waitBusy(browser); - OOGraphene.waitElement(memberMenuItem, browser); + By withParticipantsBy = By.cssSelector("li.o_sel_group_members.o_sel_group_participants_members a"); + OOGraphene.waitElement(withParticipantsBy, browser); } if(waitingList) { By showWaitingListBy = By.cssSelector(".o_sel_group_show_waiting_list input[type='checkbox']"); browser.findElement(showWaitingListBy).click(); OOGraphene.waitBusy(browser); - OOGraphene.waitElement(memberMenuItem, browser); + By withWaitingBy = By.cssSelector("li.o_sel_group_members.o_sel_group_waiting_members a"); + OOGraphene.waitElement(withWaitingBy, browser); } return this; } diff --git a/src/test/java/org/olat/selenium/page/portfolio/EntriesPage.java b/src/test/java/org/olat/selenium/page/portfolio/EntriesPage.java index 6b5a045b0a42d9c798709ac7dfc472aec12c1426..c8bdb582a2df1118629b1ec979ec0112cdff7e60 100644 --- a/src/test/java/org/olat/selenium/page/portfolio/EntriesPage.java +++ b/src/test/java/org/olat/selenium/page/portfolio/EntriesPage.java @@ -80,7 +80,7 @@ public class EntriesPage { public EntriesPage assertOnPageTableView(String title) { By pageTitleBy = By.xpath("//div[contains(@class,'o_binder_page_listing')]/table//a/span[contains(text(),'" + title + "')]"); - OOGraphene.waitElement(pageTitleBy, 5, browser); + OOGraphene.waitElement(pageTitleBy, browser); List<WebElement> pageTitleEls = browser.findElements(pageTitleBy); Assert.assertEquals(1, pageTitleEls.size()); return this; @@ -92,13 +92,13 @@ public class EntriesPage { OOGraphene.waitBusy(browser); By classicViewBy = By.cssSelector(".o_rendertype_classic"); - OOGraphene.waitElement(classicViewBy, 5, browser); + OOGraphene.waitElement(classicViewBy, browser); return this; } public EntriesPage assertEmptyTableView() { By emptyMessageBy = By.cssSelector("div.o_portfolio_entries div.o_info"); - OOGraphene.waitElement(emptyMessageBy, 5, browser); + OOGraphene.waitElement(emptyMessageBy, browser); return this; } diff --git a/src/test/java/org/olat/selenium/page/portfolio/PortfolioV2HomePage.java b/src/test/java/org/olat/selenium/page/portfolio/PortfolioV2HomePage.java index 3c669f06311e8d169cf8038aa976b2de55e33dca..3021f0ad86e4ffd5302e284eddfad88ad7ef8be4 100644 --- a/src/test/java/org/olat/selenium/page/portfolio/PortfolioV2HomePage.java +++ b/src/test/java/org/olat/selenium/page/portfolio/PortfolioV2HomePage.java @@ -86,15 +86,17 @@ public class PortfolioV2HomePage { browser.findElement(myEntriesLinkBy).click(); By myEntriesBy = By.cssSelector("div.o_portfolio_entries"); - OOGraphene.waitElement(myEntriesBy, 5, browser); + OOGraphene.waitElement(myEntriesBy, browser); return new EntriesPage(browser); } public EntriesPage openDeletedEntries() { By goToTrashBy = By.cssSelector("a.o_sel_pf_trash"); - OOGraphene.waitElement(goToTrashBy, 5, browser); + OOGraphene.waitElement(goToTrashBy, browser); browser.findElement(goToTrashBy).click(); OOGraphene.waitBusy(browser); + By entriesBy = By.cssSelector("div.o_portfolio_content div.o_portfolio_entries"); + OOGraphene.waitElement(entriesBy, browser); return new EntriesPage(browser); } diff --git a/src/test/java/org/olat/selenium/page/qti/QTI21HotspotEditorPage.java b/src/test/java/org/olat/selenium/page/qti/QTI21HotspotEditorPage.java index 21a29b1913504d5adca247d88f587569bfaf6c3e..aa3ddd3d2b10a3afc3ec8d2384b22f9c44b19f7f 100644 --- a/src/test/java/org/olat/selenium/page/qti/QTI21HotspotEditorPage.java +++ b/src/test/java/org/olat/selenium/page/qti/QTI21HotspotEditorPage.java @@ -95,7 +95,7 @@ public class QTI21HotspotEditorPage extends QTI21AssessmentItemEditorPage { WebElement circleEl = browser.findElement(circleBy); Dimension dim = circleEl.getSize(); - Position pos = Position.valueOf(10, 10, dim, browser); + Position pos = Position.valueOf(10, 10, dim); new Actions(browser) .moveToElement(circleEl, pos.getX(), pos.getY()) .clickAndHold() diff --git a/src/test/java/org/olat/selenium/page/qti/QTI21Page.java b/src/test/java/org/olat/selenium/page/qti/QTI21Page.java index 04d8a29654a75f2de9331e3f2f65a65b51069ead..25677844becd904c79b881f83b473e68a0095531 100644 --- a/src/test/java/org/olat/selenium/page/qti/QTI21Page.java +++ b/src/test/java/org/olat/selenium/page/qti/QTI21Page.java @@ -181,7 +181,7 @@ public class QTI21Page { OOGraphene.waitElementPresence(hotspotBy, 5, browser); WebElement element = browser.findElement(hotspotBy); Dimension dim = element.getSize(); - Position pos = Position.valueOf(coords, dim, browser); + Position pos = Position.valueOf(coords, dim); new Actions(browser) .moveToElement(element, pos.getX(), pos.getY()) .click() @@ -220,7 +220,7 @@ public class QTI21Page { By imgBy = By.xpath("//div[contains(@class,'graphicOrderInteraction')]/div/img"); WebElement element = browser.findElement(imgBy); Dimension dim = element.getSize(); - Position pos = Position.valueOf(coords, dim, browser); + Position pos = Position.valueOf(coords, dim); new Actions(browser) .moveToElement(element, pos.getX(), pos.getY()) .click() @@ -393,7 +393,7 @@ public class QTI21Page { By imgBy = By.xpath("//div[contains(@class,'graphicAssociateInteraction')]/div/div/img"); WebElement element = browser.findElement(imgBy); Dimension dim = element.getSize(); - Position pos = Position.valueOf(coords, dim, browser); + Position pos = Position.valueOf(coords, dim); new Actions(browser) .moveToElement(element, pos.getX(), pos.getY()) .click() @@ -425,8 +425,8 @@ public class QTI21Page { By targetBy = By.xpath("//div[@class='orderInteraction']//div[contains(@class,'target')]/ul"); WebElement targetEl = browser.findElement(targetBy); - Position sourcePos = Position.valueOf(30, 30, sourceEl.getSize(), browser); - Position targetPos = Position.valueOf(30, 30, targetEl.getSize(), browser); + Position sourcePos = Position.valueOf(30, 30, sourceEl.getSize()); + Position targetPos = Position.valueOf(30, 30, targetEl.getSize()); new Actions(browser) .moveToElement(sourceEl, sourcePos.getX(), sourcePos.getY()) .clickAndHold() @@ -472,7 +472,7 @@ public class QTI21Page { By imgBy = By.xpath("//div[contains(@class,'graphicGapMatchInteraction')]/div/div/img"); WebElement element = browser.findElement(imgBy); Dimension dim = element.getSize(); - Position pos = Position.valueOf(coords, dim, browser); + Position pos = Position.valueOf(coords, dim); new Actions(browser) .moveToElement(element, pos.getX(), pos.getY()) .click() @@ -488,7 +488,7 @@ public class QTI21Page { * @return Itself */ public QTI21Page answerSelectPoint(int x, int y, int width, int height) { - Position pos = Position.valueOf(x, y, width, height, browser); + Position pos = Position.valueOf(x, y, width, height); By canvasBy = By.xpath("//div[contains(@class,'selectPointInteraction')]/div/canvas"); WebElement canvasEl = browser.findElement(canvasBy); new Actions(browser) @@ -529,9 +529,9 @@ public class QTI21Page { By targetBy = By.xpath("//div[@class='positionObjectStage']//img[contains(@id,'qtiworks_id_container_')]"); WebElement targetEl = browser.findElement(targetBy); Dimension targetDim = targetEl.getSize(); - Position targetPos = Position.valueOf(x, y, firefoxCorrection, targetDim, browser); + Position targetPos = Position.valueOf(x, y, firefoxCorrection, targetDim); Dimension itemDim = itemEl.getSize(); - Position itemPos = Position.valueOf(5, 5, itemDim, browser); + Position itemPos = Position.valueOf(5, 5, itemDim); new Actions(browser) .moveToElement(itemEl, itemPos.getX(), itemPos.getY()) .clickAndHold() @@ -567,7 +567,7 @@ public class QTI21Page { Dimension size = sliderEl.getSize(); float height = (size.getHeight() / 100f) * val; int scaledY = Math.round(size.getHeight() - height); - Position pos = Position.valueOf(5, scaledY, size, browser); + Position pos = Position.valueOf(5, scaledY, size); new Actions(browser) .moveToElement(sliderEl, pos.getX(), pos.getY()) .click()