mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
DEV: [gjs-codemod] Convert automation/styleguide/other to gjs
Co-authored-by: Jarek Radosz <jarek@cvx.dev>
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
import { getOwner } from "@ember/owner";
|
||||
import { fillIn, render } from "@ember/test-helpers";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import AutomationField from "discourse/plugins/automation/admin/components/automation-field";
|
||||
import AutomationFabricators from "discourse/plugins/automation/admin/lib/fabricators";
|
||||
|
||||
module("Integration | Component | da-post-field", function (hooks) {
|
||||
@ -13,12 +13,19 @@ module("Integration | Component | da-post-field", function (hooks) {
|
||||
});
|
||||
|
||||
test("set value", async function (assert) {
|
||||
const self = this;
|
||||
|
||||
this.field = new AutomationFabricators(getOwner(this)).field({
|
||||
component: "post",
|
||||
});
|
||||
|
||||
await render(
|
||||
hbs`<AutomationField @automation={{this.automation}} @field={{this.field}} />`
|
||||
<template>
|
||||
<AutomationField
|
||||
@automation={{self.automation}}
|
||||
@field={{self.field}}
|
||||
/>
|
||||
</template>
|
||||
);
|
||||
await fillIn("textarea", "Hello World");
|
||||
|
||||
|
Reference in New Issue
Block a user