Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KnitrReportTest: use checkExpectedErrors() #2297

Merged
merged 4 commits into from
Feb 26, 2025
Merged
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
13 changes: 6 additions & 7 deletions src/org/labkey/test/tests/KnitrReportTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package org.labkey.test.tests;

import org.apache.hc.core5.http.HttpStatus;
import org.assertj.core.api.Assertions;
import org.jetbrains.annotations.Nullable;
import org.junit.Assume;
import org.junit.Test;
Expand Down Expand Up @@ -199,13 +200,11 @@ private void verifyAdhocReportDependencies(String viewName, String dependencies)

createKnitrReport(rmdDependenciesReport, RReportHelper.ReportOption.knitrMarkdown);

pauseJsErrorChecker(); // Don't fail due to "$ is not a function"
{
_rReportHelper.clickReportTab();
waitForElement(Locator.id("mtcars_table"));
assertElementNotPresent(Locator.id("mtcars_table_wrapper")); // Created by jQuery
}
resumeJsErrorChecker();
_rReportHelper.clickReportTab();
waitForElement(Locator.id("mtcars_table"));
assertElementNotPresent(Locator.id("mtcars_table_wrapper")); // Created by jQuery
Assertions.assertThat(getServerErrors()).as("Server errors").contains("$(...).dataTable is not a function");
checkExpectedErrors(1); // JavaScript error: "$(...).dataTable is not a function"

// now set the dependencies
_rReportHelper.clickSourceTab();
Expand Down