Skip to content

Commit

Permalink
fix jests since each option is in a div instead of a span
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhamidawan committed May 22, 2024
1 parent c4b51c6 commit 659c2fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/components/Form/Elements/FormSelect.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const defaultOptions = [

function testDefaultOptions(wrapper) {
const target = wrapper.findComponent(MountTarget);
const options = target.findAll("li > span > span");
const options = target.findAll("li > span > div");
expect(options.length).toBe(4);
for (let i = 0; i < options.length; i++) {
expect(options.at(i).text()).toBe(`label_${i + 1}`);
Expand All @@ -52,7 +52,7 @@ describe("FormSelect", () => {
optional: true,
});
const target = wrapper.findComponent(MountTarget);
const options = target.findAll("li > span > span");
const options = target.findAll("li > span > div");
expect(options.length).toBe(5);
expect(options.at(0).text()).toBe("Nothing selected");
const selectedDefault = wrapper.find(".multiselect__option--selected");
Expand Down

0 comments on commit 659c2fa

Please sign in to comment.