Skip to content

Commit 506cd3d

Browse files
Fix Test timeout (#100)
* run test 100 times to check timeout issue on CI. * do not re-query for button * remove test repetition
1 parent e1c0719 commit 506cd3d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: frontends/mit-open/src/pages/learningpaths/LearningPathDetails.test.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ describe("LearningPathDetailsPage", () => {
9999
test("Clicking reorder makes items reorderable, clicking Done makes them static", async () => {
100100
const path = factories.learningResources.learningPath()
101101
setup({ path, userSettings: { is_learning_path_editor: true } })
102-
const reorderButton = await screen.findByRole("button", { name: "Reorder" })
102+
const reorderButton = await screen.findByRole("button", {
103+
name: "Reorder",
104+
})
103105
expectLastProps(spyItemsListing, { sortable: false })
104106
await user.click(reorderButton)
105107
expectLastProps(spyItemsListing, { sortable: true })
106108

107-
const doneButton = await screen.findByRole("button", {
108-
name: "Done ordering",
109-
})
110-
await user.click(doneButton)
109+
expect(reorderButton).toHaveAccessibleName("Done ordering")
110+
await user.click(reorderButton)
111111
expectLastProps(spyItemsListing, { sortable: false })
112112
})
113113

0 commit comments

Comments
 (0)