Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 2 additions & 51 deletions src/org/labkey/test/tests/NonStudyReportsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@
import org.labkey.test.categories.Reports;
import org.labkey.test.components.html.BootstrapMenu;
import org.labkey.test.util.LogMethod;
import org.labkey.test.util.OptionalFeatureHelper;
import org.labkey.test.util.PortalHelper;
import org.labkey.test.util.RReportHelper;
import org.labkey.test.util.ext4cmp.Ext4FileFieldRef;

import java.io.File;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import static org.labkey.test.util.PermissionsHelper.EDITOR_ROLE;

Expand All @@ -51,11 +50,6 @@ public class NonStudyReportsTest extends ReportTest
private static final String UPDATE_ATTACHMENT_REPORT = "Update Attachment Report";
private static final String ATTACHMENT_REPORT2_DESCRIPTION = BaseWebDriverTest.INJECT_CHARS_2;
private static final File ATTACHMENT_REPORT2_FILE = TestFileUtils.getSampleData("Microarray/test2.jpg"); // arbitrary image file
private static final String DISCUSSED_REPORT = "Blank R Report";
private static final String DISCUSSION_BODY_1 = "Starting a discussion";
private static final String DISCUSSION_TITLE_1 = "Discussion about R report";
private static final String DISCUSSION_BODY_2 = "Responding to a discussion";
private static final String DISCUSSION_BODY_3 = "Editing a discussion response";
private static final String LINK_REPORT1_NAME = "Link report 1" + BaseWebDriverTest.INJECT_CHARS_2;
private static final String LINK_REPORT1_DESCRIPTION = "Link report 1" + BaseWebDriverTest.INJECT_CHARS_2;
private static final String LINK_REPORT1_URL = "/home/project-begin.view";
Expand All @@ -67,7 +61,6 @@ public class NonStudyReportsTest extends ReportTest
protected void doCleanup(boolean afterTest) throws TestTimeoutException
{
_userHelper.deleteUsers(false, ATTACHMENT_USER);
OptionalFeatureHelper.disableOptionalFeature(createDefaultConnection(), "deprecatedObjectLevelDiscussions");
super.doCleanup(afterTest);
}

Expand All @@ -90,7 +83,6 @@ protected void doVerifySteps()
doAttachmentReportTest();
doLinkReportTest();
doThumbnailChangeTest();
doReportDiscussionTest();
}

@LogMethod
Expand Down Expand Up @@ -229,7 +221,7 @@ private void doUpdateAttachmentReportTest()
// verify we can set a property
clickAndWait(Locator.linkContainingText("Edit Report"));
waitForText(UPDATE_ATTACHMENT_REPORT);
assertFalse("Locked".equals(getFormElement(statusElement)));
assertNotEquals("Locked", getFormElement(statusElement));
setFormElement(Locator.name("status"), "Locked");
clickButton("Save");
waitForText(ATTACHMENT_REPORT3_NAME);
Expand Down Expand Up @@ -258,47 +250,6 @@ private void doThumbnailChangeTest()
//no way to verify, unfortunately
}

@LogMethod
private void doReportDiscussionTest()
{
// Issue 51620: Remove the UI for Object-level discussions
OptionalFeatureHelper.enableOptionalFeature(createDefaultConnection(), "deprecatedObjectLevelDiscussions");

clickProject(getProjectName());

goToManageViews();
BootstrapMenu.find(getDriver(), "Add Report").clickSubMenu(true, "R Report");
RReportHelper RReportHelper = new RReportHelper(this);
RReportHelper.executeScript("# Placeholder script for discussion", "");
click(Locator.linkWithText("Source"));
RReportHelper.saveReport(DISCUSSED_REPORT);
clickReportGridLink(DISCUSSED_REPORT);

clickMenuButton(true, Locator.tagWithClass("div", "discussion-toggle").findElement(getDriver()), false, "Start new discussion");
waitForElement(Locator.id("title"), WAIT_FOR_JAVASCRIPT);
setFormElement(Locator.id("title"), DISCUSSION_TITLE_1);
setFormElement(Locator.id("body"), DISCUSSION_BODY_1);
clickButton("Submit");

clickMenuButton(true, Locator.tagWithClass("div", "discussion-toggle").findElement(getDriver()), false, DISCUSSION_TITLE_1);
waitForText(DISCUSSION_TITLE_1);
assertTextPresent(DISCUSSION_BODY_1);

clickButton("Respond");
waitForElement(Locator.id("body"));
setFormElement(Locator.id("body"), DISCUSSION_BODY_2);
clickButton("Submit");

assertTextPresent(DISCUSSION_BODY_2);

clickAndWait(Locator.linkContainingText("edit"));
waitForElement(Locator.id("body"));
setFormElement(Locator.id("body"), DISCUSSION_BODY_3);
clickButton("Submit");

assertTextPresent(DISCUSSION_BODY_3);
}

@LogMethod
private void doLinkReportTest()
{
Expand Down
118 changes: 0 additions & 118 deletions src/org/labkey/test/tests/announcements/DiscussionLinkTest.java

This file was deleted.

36 changes: 1 addition & 35 deletions src/org/labkey/test/tests/wiki/WikiLongTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.labkey.test.categories.Daily;
import org.labkey.test.categories.Wiki;
import org.labkey.test.pages.LabkeyErrorPage;
import org.labkey.test.util.OptionalFeatureHelper;
import org.labkey.test.util.PortalHelper;
import org.labkey.test.util.WikiHelper;
import org.openqa.selenium.WebElement;
Expand Down Expand Up @@ -67,8 +66,6 @@ public class WikiLongTest extends BaseWebDriverTest
private static final String WIKI_PAGE8_NAME= "Page 8 Name For Delete Subtree Test " + BaseWebDriverTest.INJECT_CHARS_1;
private static final String WIKI_PAGE9_NAME= "Page 9 _blank " + BaseWebDriverTest.INJECT_CHARS_1;

private static final String DISC1_TITLE = "Let's Talk";
private static final String DISC1_BODY = "I don't know how normal this wiki is";
private static final String RESP1_TITLE = "Let's Keep Talking";
private static final String RESP1_BODY = "I disagree";
private static final String USER1 = "wikilong_user1@wikilong.test";
Expand Down Expand Up @@ -177,9 +174,6 @@ protected String getProjectName()
@Test
public void testSteps()
{
// Issue 51620: Remove the UI for Object-level discussions
OptionalFeatureHelper.enableOptionalFeature(createDefaultConnection(), "deprecatedObjectLevelDiscussions");

enableEmailRecorder();
_containerHelper.createProject(PROJECT2_NAME, null);
_containerHelper.enableModule(PROJECT2_NAME, "MS2");
Expand Down Expand Up @@ -352,33 +346,6 @@ public void testSteps()
clickAndWait(Locator.linkWithText("next"));
assertTextPresent("Some HTML content");

log("Check that discussion board works");
clickAndWait(Locator.linkWithText(WIKI_PAGE1_TITLE));
_ext4Helper.waitForOnReady();
click(Locator.linkWithText("discussions"));
waitForElement(Locator.linkWithText("Start new discussion"), defaultWaitForPage);
clickAndWait(Locator.linkWithText("Start new discussion"));
_wikiHelper.setWikiTitle(DISC1_TITLE);
setFormElement(Locator.id("body"), DISC1_BODY);
submit();
_ext4Helper.waitForOnReady();
clickMenuButton(true, Locator.linkWithText("discussions")
.findElement(getDriver()), false, DISC1_TITLE);

assertTextPresent(DISC1_TITLE,
DISC1_BODY);

log("Check response on discussion board works");
clickButton("Respond");
_wikiHelper.setWikiTitle(RESP1_TITLE);
setFormElement(Locator.id("body"), RESP1_BODY);
submit();
assertTextPresent(RESP1_TITLE,
RESP1_BODY);
clickButton("Delete Message");
clickButton("Delete");
assertTextNotPresent(DISC1_TITLE, DISC1_BODY);

log("test navTree and header");
_wikiHelper.createNewWikiPage("RADEOX");
_wikiHelper.setWikiName("_navTree");
Expand Down Expand Up @@ -619,7 +586,7 @@ public void testSteps()
clickAndWait(Locator.linkWithText("Edit"));
deleteWikiPage(true);
clickAndWait(Locator.linkWithText(WIKI_PAGE1_TITLE));
assertElementPresent(Locator.linkWithText(WIKI_PAGE1_TITLE), 1);
assertElementPresent(Locator.linkWithText(WIKI_PAGE1_TITLE), 2);
assertElementNotPresent(Locator.linkWithText(WIKI_PAGE3_ALTTITLE));
assertElementNotPresent(Locator.linkWithText(WIKI_PAGE8_TITLE));

Expand Down Expand Up @@ -820,7 +787,6 @@ protected void selectRenderType(String renderType)
@Override
protected void doCleanup(boolean afterTest) throws TestTimeoutException
{
OptionalFeatureHelper.disableOptionalFeature(createDefaultConnection(), "deprecatedObjectLevelDiscussions");
deleteUsersIfPresent(USER1);
_containerHelper.deleteProject(PROJECT2_NAME, afterTest);
_containerHelper.deleteProject(PROJECT_NAME, afterTest);
Expand Down