Skip to content

Commit 1eec0cb

Browse files
authored
Remove object-level discussions (#2719)
1 parent 3cb43f3 commit 1eec0cb

File tree

3 files changed

+3
-204
lines changed

3 files changed

+3
-204
lines changed

src/org/labkey/test/tests/NonStudyReportsTest.java

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,14 @@
2626
import org.labkey.test.categories.Reports;
2727
import org.labkey.test.components.html.BootstrapMenu;
2828
import org.labkey.test.util.LogMethod;
29-
import org.labkey.test.util.OptionalFeatureHelper;
3029
import org.labkey.test.util.PortalHelper;
3130
import org.labkey.test.util.RReportHelper;
3231
import org.labkey.test.util.ext4cmp.Ext4FileFieldRef;
3332

3433
import java.io.File;
3534

3635
import static org.junit.Assert.assertEquals;
37-
import static org.junit.Assert.assertFalse;
36+
import static org.junit.Assert.assertNotEquals;
3837
import static org.junit.Assert.assertTrue;
3938
import static org.labkey.test.util.PermissionsHelper.EDITOR_ROLE;
4039

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

@@ -90,7 +83,6 @@ protected void doVerifySteps()
9083
doAttachmentReportTest();
9184
doLinkReportTest();
9285
doThumbnailChangeTest();
93-
doReportDiscussionTest();
9486
}
9587

9688
@LogMethod
@@ -229,7 +221,7 @@ private void doUpdateAttachmentReportTest()
229221
// verify we can set a property
230222
clickAndWait(Locator.linkContainingText("Edit Report"));
231223
waitForText(UPDATE_ATTACHMENT_REPORT);
232-
assertFalse("Locked".equals(getFormElement(statusElement)));
224+
assertNotEquals("Locked", getFormElement(statusElement));
233225
setFormElement(Locator.name("status"), "Locked");
234226
clickButton("Save");
235227
waitForText(ATTACHMENT_REPORT3_NAME);
@@ -258,47 +250,6 @@ private void doThumbnailChangeTest()
258250
//no way to verify, unfortunately
259251
}
260252

261-
@LogMethod
262-
private void doReportDiscussionTest()
263-
{
264-
// Issue 51620: Remove the UI for Object-level discussions
265-
OptionalFeatureHelper.enableOptionalFeature(createDefaultConnection(), "deprecatedObjectLevelDiscussions");
266-
267-
clickProject(getProjectName());
268-
269-
goToManageViews();
270-
BootstrapMenu.find(getDriver(), "Add Report").clickSubMenu(true, "R Report");
271-
RReportHelper RReportHelper = new RReportHelper(this);
272-
RReportHelper.executeScript("# Placeholder script for discussion", "");
273-
click(Locator.linkWithText("Source"));
274-
RReportHelper.saveReport(DISCUSSED_REPORT);
275-
clickReportGridLink(DISCUSSED_REPORT);
276-
277-
clickMenuButton(true, Locator.tagWithClass("div", "discussion-toggle").findElement(getDriver()), false, "Start new discussion");
278-
waitForElement(Locator.id("title"), WAIT_FOR_JAVASCRIPT);
279-
setFormElement(Locator.id("title"), DISCUSSION_TITLE_1);
280-
setFormElement(Locator.id("body"), DISCUSSION_BODY_1);
281-
clickButton("Submit");
282-
283-
clickMenuButton(true, Locator.tagWithClass("div", "discussion-toggle").findElement(getDriver()), false, DISCUSSION_TITLE_1);
284-
waitForText(DISCUSSION_TITLE_1);
285-
assertTextPresent(DISCUSSION_BODY_1);
286-
287-
clickButton("Respond");
288-
waitForElement(Locator.id("body"));
289-
setFormElement(Locator.id("body"), DISCUSSION_BODY_2);
290-
clickButton("Submit");
291-
292-
assertTextPresent(DISCUSSION_BODY_2);
293-
294-
clickAndWait(Locator.linkContainingText("edit"));
295-
waitForElement(Locator.id("body"));
296-
setFormElement(Locator.id("body"), DISCUSSION_BODY_3);
297-
clickButton("Submit");
298-
299-
assertTextPresent(DISCUSSION_BODY_3);
300-
}
301-
302253
@LogMethod
303254
private void doLinkReportTest()
304255
{

src/org/labkey/test/tests/announcements/DiscussionLinkTest.java

Lines changed: 0 additions & 118 deletions
This file was deleted.

src/org/labkey/test/tests/wiki/WikiLongTest.java

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import org.labkey.test.categories.Daily;
2727
import org.labkey.test.categories.Wiki;
2828
import org.labkey.test.pages.LabkeyErrorPage;
29-
import org.labkey.test.util.OptionalFeatureHelper;
3029
import org.labkey.test.util.PortalHelper;
3130
import org.labkey.test.util.WikiHelper;
3231
import org.openqa.selenium.WebElement;
@@ -67,8 +66,6 @@ public class WikiLongTest extends BaseWebDriverTest
6766
private static final String WIKI_PAGE8_NAME= "Page 8 Name For Delete Subtree Test " + BaseWebDriverTest.INJECT_CHARS_1;
6867
private static final String WIKI_PAGE9_NAME= "Page 9 _blank " + BaseWebDriverTest.INJECT_CHARS_1;
6968

70-
private static final String DISC1_TITLE = "Let's Talk";
71-
private static final String DISC1_BODY = "I don't know how normal this wiki is";
7269
private static final String RESP1_TITLE = "Let's Keep Talking";
7370
private static final String RESP1_BODY = "I disagree";
7471
private static final String USER1 = "wikilong_user1@wikilong.test";
@@ -177,9 +174,6 @@ protected String getProjectName()
177174
@Test
178175
public void testSteps()
179176
{
180-
// Issue 51620: Remove the UI for Object-level discussions
181-
OptionalFeatureHelper.enableOptionalFeature(createDefaultConnection(), "deprecatedObjectLevelDiscussions");
182-
183177
enableEmailRecorder();
184178
_containerHelper.createProject(PROJECT2_NAME, null);
185179
_containerHelper.enableModule(PROJECT2_NAME, "MS2");
@@ -352,33 +346,6 @@ public void testSteps()
352346
clickAndWait(Locator.linkWithText("next"));
353347
assertTextPresent("Some HTML content");
354348

355-
log("Check that discussion board works");
356-
clickAndWait(Locator.linkWithText(WIKI_PAGE1_TITLE));
357-
_ext4Helper.waitForOnReady();
358-
click(Locator.linkWithText("discussions"));
359-
waitForElement(Locator.linkWithText("Start new discussion"), defaultWaitForPage);
360-
clickAndWait(Locator.linkWithText("Start new discussion"));
361-
_wikiHelper.setWikiTitle(DISC1_TITLE);
362-
setFormElement(Locator.id("body"), DISC1_BODY);
363-
submit();
364-
_ext4Helper.waitForOnReady();
365-
clickMenuButton(true, Locator.linkWithText("discussions")
366-
.findElement(getDriver()), false, DISC1_TITLE);
367-
368-
assertTextPresent(DISC1_TITLE,
369-
DISC1_BODY);
370-
371-
log("Check response on discussion board works");
372-
clickButton("Respond");
373-
_wikiHelper.setWikiTitle(RESP1_TITLE);
374-
setFormElement(Locator.id("body"), RESP1_BODY);
375-
submit();
376-
assertTextPresent(RESP1_TITLE,
377-
RESP1_BODY);
378-
clickButton("Delete Message");
379-
clickButton("Delete");
380-
assertTextNotPresent(DISC1_TITLE, DISC1_BODY);
381-
382349
log("test navTree and header");
383350
_wikiHelper.createNewWikiPage("RADEOX");
384351
_wikiHelper.setWikiName("_navTree");
@@ -619,7 +586,7 @@ public void testSteps()
619586
clickAndWait(Locator.linkWithText("Edit"));
620587
deleteWikiPage(true);
621588
clickAndWait(Locator.linkWithText(WIKI_PAGE1_TITLE));
622-
assertElementPresent(Locator.linkWithText(WIKI_PAGE1_TITLE), 1);
589+
assertElementPresent(Locator.linkWithText(WIKI_PAGE1_TITLE), 2);
623590
assertElementNotPresent(Locator.linkWithText(WIKI_PAGE3_ALTTITLE));
624591
assertElementNotPresent(Locator.linkWithText(WIKI_PAGE8_TITLE));
625592

@@ -820,7 +787,6 @@ protected void selectRenderType(String renderType)
820787
@Override
821788
protected void doCleanup(boolean afterTest) throws TestTimeoutException
822789
{
823-
OptionalFeatureHelper.disableOptionalFeature(createDefaultConnection(), "deprecatedObjectLevelDiscussions");
824790
deleteUsersIfPresent(USER1);
825791
_containerHelper.deleteProject(PROJECT2_NAME, afterTest);
826792
_containerHelper.deleteProject(PROJECT_NAME, afterTest);

0 commit comments

Comments
 (0)