@Test public void checkNewPackageInExplorers() throws Exception { // step one run two browsers. In first browser (owner tenant) wait package explorer and expand // main items initSecondBrowser(); IDE.EXPLORER.waitOpened(); IDE.OPEN.openProject(PROJECT); IDE.PACKAGE_EXPLORER.waitPackageExplorerOpened(); IDE.MENU.runCommand( MenuCommands.Project.PROJECT, MenuCommands.Project.ENABLE_COLLABORATION_MODE); IDE.PACKAGE_EXPLORER.waitItemInPackageExplorer("src/main/java"); IDE.PACKAGE_EXPLORER.openItemWithDoubleClick("src"); IDE.PACKAGE_EXPLORER.waitItemInPackageExplorer("pom.xml"); expandMainItemsInPackageExplorer(); // step two In second (ivited user browser) wait project explorer and expand main nodes IDE2.EXPLORER.waitOpened(); IDE2.OPEN.openProject(PROJECT); IDE2.PACKAGE_EXPLORER.waitPackageExplorerOpened(); IDE2.MENU.waitForMenuItemPresent( MenuCommands.Project.PROJECT, MenuCommands.Project.DISABLE_COLLABORATION_MODE); IDE2.PACKAGE_EXPLORER.closePackageExplorer(); IDE2.PACKAGE_EXPLORER.waitPackageExplorerClosed(); IDE2.EXPLORER.waitForItem(PROJECT + "/src"); IDE2.EXPLORER.waitForItem(PROJECT + "/pom.xml"); expandProjectInInviteBrowser(); // step three, create new package in owner browser and check creation in two browsers IDE.PACKAGE_EXPLORER.selectItemInPackageExplorer("src/main/java"); IDE.MENU.runCommand(MenuCommands.File.FILE, MenuCommands.New.NEW, MenuCommands.New.PACKAGE); IDE.LOADER.waitClosed(); IDE.PACKAGE_EXPLORER.waitCreateNewPackageForm(); IDE.PACKAGE_EXPLORER.typeNewPackageName(PACKAGE_NAME); IDE.PACKAGE_EXPLORER.clickCreateNewPackageButton(); IDE.PACKAGE_EXPLORER.waitItemInPackageExplorer(PACKAGE_NAME); // checking creation in the browser by invited user IDE2.EXPLORER.waitForItem(PROJECT + "/src/main/java/org"); IDE2.EXPLORER.openItem(PROJECT + "/src/main/java/org"); IDE2.EXPLORER.waitForItem(PROJECT + "/src/main/java/org/ua"); IDE2.EXPLORER.openItem(PROJECT + "/src/main/java/org/ua"); IDE2.EXPLORER.waitForItem(PROJECT + "/src/main/java/org/ua/codenvy"); IDE2.EXPLORER.selectItem(PROJECT + "/src/main/java/org/ua/codenvy"); // step four create new class in the browser by invited use and check in the two browsers IDE2.TOOLBAR.runCommandFromNewPopupMenu(MenuCommands.New.JAVA_CLASS); IDE2.CREATE_NEW_CLASS.waitCreateFormIsPresent(); IDE2.CREATE_NEW_CLASS.waitItemIsPresentInKindList("Class"); IDE2.CREATE_NEW_CLASS.waitItemIsPresentInPackageList("sumcontroller"); IDE2.CREATE_NEW_CLASS.waitItemIsPresentInSourceFolderList("src/main/java"); IDE2.CREATE_NEW_CLASS.typeClassName(NEW_CLASS_NAME); IDE2.CREATE_NEW_CLASS.waitCreateButtonIsEnabled(); IDE2.CREATE_NEW_CLASS.clickCreateBtn(); IDE2.CREATE_NEW_CLASS.waitFormIsClosed(); IDE2.EXPLORER.waitForItem(PROJECT + "/src/main/java/org/ua/codenvy/" + "CollabCheck.java"); IDE.PACKAGE_EXPLORER.openItemWithDoubleClick("org.ua.codenvy"); IDE.PACKAGE_EXPLORER.waitItemInPackageExplorer(NEW_CLASS_NAME + ".java"); // delete calc file by owner and check in two browsers IDE.PACKAGE_EXPLORER.selectItemInPackageExplorer("calc.jsp"); IDE.TOOLBAR.runCommand(ToolbarCommands.File.DELETE); IDE.DELETE.waitOpened(); IDE.DELETE.clickOkButton(); IDE.DELETE.waitClosed(); IDE.PACKAGE_EXPLORER.waitItemInPackageExplorerIsNotPresent("calc.jsp"); IDE2.EXPLORER.waitItemNotPresent(PROJECT + "/src" + "/main" + "/webapp" + "/calc.jsp"); }