Skip to content

Commit

Permalink
Merge pull request #270 from aodn/bugs/6092-fix-sometime-build-fail
Browse files Browse the repository at this point in the history
Minor fix on build
  • Loading branch information
utas-raymondng authored Jan 20, 2025
2 parents 6824489 + bcd9a5f commit b2e99ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const AbstractAndDownloadPanel: FC<AbstractAndDownloadPanelProps> = ({
id={mapContainerId}
sx={{
width: "100%",
minHeight: "700px",
minHeight: "550px",
marginY: padding.large,
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,16 @@ describe("AssociatedRecordsPanel", async () => {
});

it("should render AssociatedRecordsPanel", () => {
waitFor(() => screen.findAllByText("Parent Record")).then(() => {
waitFor(() => screen.findAllByText("Parent Record"), {
timeout: 5000,
}).then(() => {
const parentRecordText = screen.queryAllByText("Parent Record");
// one is button, another is list title
expect(parentRecordText).toHaveLength(2);
});
});

it("should open a new tab when clicking on a record abstract", () => {
it("should open a new tab when clicking on a record abstract", async () => {
waitFor(() =>
screen.findAllByText(
"Northern Australia Automated Marine Weather and Oceanographic Stations"
Expand All @@ -86,7 +88,7 @@ describe("AssociatedRecordsPanel", async () => {
);
expect(parentTitle).to.exist;

parentTitle && userEvent.click(parentTitle);
parentTitle && (await userEvent.click(parentTitle));
const parentAbstract = screen.queryByText(/weather stations have been/i);
expect(parentAbstract).to.exist;

Expand Down

0 comments on commit b2e99ab

Please sign in to comment.