Skip to content

Commit

Permalink
try fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
romgere committed Mar 6, 2024
1 parent 4583769 commit ae6c37c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const {
} = config;
import TextMakerSettings from 'text2stl/models/text-maker-settings';
import { ModelType } from 'text2stl/services/text-maker';
import wait from 'text2stl/tests/helpers/wait';

module('Integration | Component | settings-form/select-type', function (hooks) {
setupRenderingTest(hooks);
Expand All @@ -27,6 +28,9 @@ module('Integration | Component | settings-form/select-type', function (hooks) {
.dom(`calcite-segmented-control-item[data-test-type="${ModelType.TextOnly}"]`)
.hasAttribute('data-test-checked', '', 'Correct type is checked');

// double click is a CI failing workaround
await click(`calcite-segmented-control-item[data-test-type="${ModelType.TextWithSupport}"]`);
await wait(500);
await click(`calcite-segmented-control-item[data-test-type="${ModelType.TextWithSupport}"]`);
await waitUntil(() => model.type === ModelType.TextWithSupport, { timeout: 5000 });
assert.strictEqual(model.type, ModelType.TextWithSupport, 'It change model type');
Expand Down

0 comments on commit ae6c37c

Please sign in to comment.