Skip to content

Commit

Permalink
chore: try to fix this f******* test
Browse files Browse the repository at this point in the history
  • Loading branch information
romgere committed May 31, 2024
1 parent c925c95 commit 7ed84e9
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions tests/integration/components/settings-form/text-test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, click, waitUntil } from '@ember/test-helpers';
import { render, click } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
import config from 'text2stl/config/environment';
const {
Expand Down Expand Up @@ -83,27 +83,18 @@ module('Integration | Component | settings-form/text', function (hooks) {
const model = new TextMakerSettings({
...textMakerDefault,
type: ModelType.TextOnly,
text: 'some\nmultiline\ntext',
});
this.set('model', model);

await render(hbs`<SettingsForm::Text @model={{this.model}} />`);
assert.dom('[data-test-settings-text-alignment]').doesNotExist();
assert.dom('[data-test-settings-vspacing]').doesNotExist();

await fillCalciteInput('[data-test-settings-text]', 'some\nmultiline\ntext');

assert.dom('[data-test-settings-text-alignment]').exists();
assert
.dom(
`[data-test-settings-text-alignment] calcite-radio-button[data-test-value="${model.alignment}"]`,
)
.isChecked('current textAlignment radio is checked');
await click(
'[data-test-settings-text-alignment] calcite-radio-button[data-test-value="right"]',
);

await waitUntil(() => model.alignment === 'right', { timeout: 5000 });
assert.strictEqual(model.alignment, 'right', 'model.alignment was updated');

assert
.dom('[data-test-settings-vspacing]')
Expand Down

0 comments on commit 7ed84e9

Please sign in to comment.