fix jests since each option is in a div instead of a span

This commit is contained in:
Ahmed Awan
2024-05-22 12:24:23 -05:00
parent c4b51c6dc4
commit 659c2fa3e1
@@ -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}`);
@@ -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");