Skip to content

Commit

Permalink
extract constant, update test
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-hodgson committed Nov 19, 2024
1 parent 9ee2789 commit 9f272ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
import static org.sagebionetworks.web.client.utils.FutureUtils.getFuture;
import static org.sagebionetworks.web.client.widget.entity.browse.EntityFilter.CONTAINER;
import static org.sagebionetworks.web.client.widget.entity.browse.EntityFilter.PROJECT;
import static org.sagebionetworks.web.shared.WebConstants.FLAG_ISSUE_COLLECTOR_URL;
import static org.sagebionetworks.web.shared.WebConstants.FLAG_ISSUE_DESCRIPTION_PART_1;
import static org.sagebionetworks.web.shared.WebConstants.FLAG_ISSUE_DESCRIPTION_PART_2;
import static org.sagebionetworks.web.shared.WebConstants.FLAG_ISSUE_PRIORITY;
import static org.sagebionetworks.web.shared.WebConstants.REVIEW_DATA_REQUEST_COMPONENT_ID;

import com.google.common.util.concurrent.FluentFuture;
import com.google.common.util.concurrent.FutureCallback;
Expand Down Expand Up @@ -713,7 +708,7 @@ private void configureReportViolation() {
Action.REPORT_VIOLATION,
(action, event) -> {
popupUtils.openInNewWindow(
"https://sagebionetworks.jira.com/servicedesk/customer/portal/20"
WebConstants.PRIVACY_SECURITY_COMPLIANCE_HELP_CENTER_URL
);
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public class WebConstants {

public static final String DOCS_BASE_URL = "https://help.synapse.org/";
public static final String DOCS_URL = DOCS_BASE_URL + "docs/";
public static final String PRIVACY_SECURITY_COMPLIANCE_HELP_CENTER_URL =
"https://sagebionetworks.jira.com/servicedesk/customer/portal/20";
public static final String PROVENANCE_API_URL =
DOCS_URL + "Provenance.1972470373.html";
public static final String SHARING_SETTINGS_URL =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5330,20 +5330,9 @@ public void testReportViolation() {

// Call under test - invocation
actionListenerCaptor.getValue().onAction(Action.REPORT_VIOLATION, null);
verify(mockJsniUtils)
.showJiraIssueCollector(
"", // summary
FLAG_ISSUE_DESCRIPTION_PART_1 +
url +
WebConstants.FLAG_ISSUE_DESCRIPTION_PART_2, // description
FLAG_ISSUE_COLLECTOR_URL,
ownerId,
DisplayUtils.getDisplayName(firstName, lastName, username),
email,
entityId, // Synapse data object ID
REVIEW_DATA_REQUEST_COMPONENT_ID,
null, // Access requirement ID
FLAG_ISSUE_PRIORITY
verify(mockPopupUtils)
.openInNewWindow(
WebConstants.PRIVACY_SECURITY_COMPLIANCE_HELP_CENTER_URL
);
}
}

0 comments on commit 9f272ba

Please sign in to comment.