DEV: prevents prop override and simplifies test (#17457)

This commit is contained in:
Joffrey JAFFEUX 2022-07-13 00:20:48 +02:00 committed by GitHub
parent a939609d32
commit 638bbf8f7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 26 deletions

View File

@ -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");