Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.labkey.remoteapi.CommandException;
import org.labkey.remoteapi.SimplePostCommand;
import org.labkey.test.BaseWebDriverTest;
import org.labkey.test.Locator;
import org.labkey.test.WebTestHelper;
import org.labkey.test.categories.Daily;
import org.labkey.test.components.domain.DomainFormPanel;
import org.labkey.test.components.dumbster.EmailRecordTable;
Expand All @@ -30,6 +33,7 @@
import org.labkey.test.util.DataRegionTable;
import org.labkey.test.util.PortalHelper;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;

Expand All @@ -40,7 +44,7 @@
public class StudyDatasetChangeEmailNotificationTest extends BaseWebDriverTest
{
@BeforeClass
public static void doSetup()
public static void doSetup() throws IOException, CommandException
{
StudyDatasetChangeEmailNotificationTest init = getCurrentTest();
init.doCreateSteps();
Expand All @@ -58,7 +62,7 @@ public List<String> getAssociatedModules()
return null;
}

private void doCreateSteps()
private void doCreateSteps() throws IOException, CommandException
{
_containerHelper.createProject(getProjectName(), "Study");
_studyHelper.startCreateStudy().createStudy();
Expand All @@ -74,7 +78,7 @@ private void doCreateSteps()
createDataset("D5", Arrays.asList("F11", "F24"), null);

log("Execute the script to send the email");
executeScript("LABKEY.Ajax.request({ url: '%s/home/reports-sendDailyDigest.view', method: 'POST' });".formatted(getContextPath()));
new SimplePostCommand("reports", "sendDailyDigest").execute(WebTestHelper.getRemoteApiConnection(), "home");
}

@Before
Expand Down