2626import org .labkey .test .categories .Reports ;
2727import org .labkey .test .components .html .BootstrapMenu ;
2828import org .labkey .test .util .LogMethod ;
29- import org .labkey .test .util .OptionalFeatureHelper ;
3029import org .labkey .test .util .PortalHelper ;
3130import org .labkey .test .util .RReportHelper ;
3231import org .labkey .test .util .ext4cmp .Ext4FileFieldRef ;
3332
3433import java .io .File ;
3534
3635import static org .junit .Assert .assertEquals ;
37- import static org .junit .Assert .assertFalse ;
36+ import static org .junit .Assert .assertNotEquals ;
3837import static org .junit .Assert .assertTrue ;
3938import 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 {
0 commit comments