import componentTest from "helpers/component-test";
moduleForComponent("text-overflow", { integration: true });
componentTest("default", {
template: `
{{text-overflow class='overflow' text=text}}
`,
beforeEach() {
this.set(
"text",
"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\nFusce convallis faucibus tortor quis vestibulum.
\nPhasellus pharetra dolor eget imperdiet tempor.
\nQuisque hendrerit magna id consectetur rutrum.
\nNulla vel tortor leo.
\nFusce ullamcorper lacus quis sodales ornare.
"
);
},
test(assert) {
const text = find(".overflow")
.text()
.trim();
assert.ok(text.startsWith("Lorem ipsum dolor sit amet"));
assert.ok(text.endsWith("..."));
}
});