diff --git a/app/templates/app/generator.hbs b/app/templates/app/generator.hbs index 0c8d91f..8159c14 100644 --- a/app/templates/app/generator.hbs +++ b/app/templates/app/generator.hbs @@ -57,6 +57,7 @@ loading={{this.meshGenerating}} icon-start="download" {{on 'click' this.exportSTL}} + data-test-export-stl > {{t 'export_stl'}} diff --git a/tests/acceptance/visual-test.ts b/tests/acceptance/visual-test.ts index c364144..6bdc713 100644 --- a/tests/acceptance/visual-test.ts +++ b/tests/acceptance/visual-test.ts @@ -1,6 +1,6 @@ /* eslint-disable no-await-in-loop */ import { module, test } from 'qunit'; -import { visit } from '@ember/test-helpers'; +import { visit, waitFor } from '@ember/test-helpers'; import { setupApplicationTest } from 'ember-qunit'; import testsSettings from './_tests-settings'; import percySnapshot from '@percy/ember'; @@ -22,10 +22,7 @@ module('Acceptance | visual', function (hooks) { // Load test settings through QP await visit(`/en-us/generator?modelSettings=${settingsQP}`); await waitCalciteReady(); - - await new Promise(function (resolve) { - setTimeout(resolve, 250); - }); + await waitFor('[data-test-export-stl]:not([loading])'); await percySnapshot(`visual test #${testIdx + 1}`); assert.true(true); });