DEV: prevents prop override and simplifies test (#17457)
This commit is contained in:
parent
a939609d32
commit
638bbf8f7e
|
@ -5,23 +5,6 @@ import { hbs } from "ember-cli-htmlbars";
|
|||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
import { paste, query } from "discourse/tests/helpers/qunit-helpers";
|
||||
|
||||
const DEFAULT_CONTENT = [
|
||||
{ id: 1, name: "foo" },
|
||||
{ id: 2, name: "bar" },
|
||||
{ id: 3, name: "baz" },
|
||||
];
|
||||
|
||||
const setDefaultState = (ctx, options) => {
|
||||
const properties = Object.assign(
|
||||
{
|
||||
content: DEFAULT_CONTENT,
|
||||
value: null,
|
||||
},
|
||||
options || {}
|
||||
);
|
||||
ctx.setProperties(properties);
|
||||
};
|
||||
|
||||
module(
|
||||
"Integration | Component | select-kit/email-group-user-chooser",
|
||||
function (hooks) {
|
||||
|
@ -32,15 +15,7 @@ module(
|
|||
});
|
||||
|
||||
test("pasting", async function (assert) {
|
||||
setDefaultState(this);
|
||||
|
||||
await render(hbs`
|
||||
<EmailGroupUserChooser
|
||||
@value={{this.value}}
|
||||
@content={{this.content}}
|
||||
@options={{hash maximum=2}}
|
||||
/>
|
||||
`);
|
||||
await render(hbs`<EmailGroupUserChooser/>`);
|
||||
|
||||
await this.subject.expand();
|
||||
await paste(query(".filter-input"), "foo,bar");
|
||||
|
|
Loading…
Reference in New Issue