Skip to content

Commit

Permalink
work for the surveyjs/service#1346 (func test)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-kurmanov committed Aug 25, 2023
1 parent 81d04b0 commit b3e1d2f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions testCafe/questions/ranking.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,4 +281,32 @@ frameworks.forEach((framework) => {
"one"
]);
});

test("ranking: work with flexbox layout", async (t) => {
const addFlexboxLayout = ClientFunction(() => {
const stylesheet = document.styleSheets[0];
stylesheet.addRule(".sv-ranking.sv-ranking.sv-ranking.sv-ranking.sv-ranking", "display:flex;flex-direction: column", 0);
});
const removeFlexboxLayout = ClientFunction(() => {
const stylesheet = document.styleSheets[0];
stylesheet.removeRule(0);
});

await addFlexboxLayout();

await t.dragToElement(PriceItem, BatteryItem);

let data = await getData();
await t.expect(data["smartphone-features"]).eql([
"Price",
"Battery life",
"Screen size",
"Storage space",
"Camera quality",
"Durability",
"Processor power",
]);

await removeFlexboxLayout();
});
});

0 comments on commit b3e1d2f

Please sign in to comment.