Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lakshayman committed Dec 22, 2023
1 parent bbb3e18 commit b261de8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 26 deletions.
3 changes: 2 additions & 1 deletion tests/integration/components/identity/step1-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ module('Integration | Component | identity/step1', function (hooks) {

await click('[data-test-step1-button]');

let resumeTest = this.resumeTest;
setTimeout(() => {
this.resumeTest();
resumeTest();
}, 500);
// eslint-disable-next-line ember/no-pause-test
await this.pauseTest();
Expand Down
26 changes: 1 addition & 25 deletions tests/integration/components/identity/step3-test.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, click } from '@ember/test-helpers';
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
import sinon from 'sinon';
import { Server } from 'ember-cli-mirage';
import ENV from 'website-my/config/environment';

module('Integration | Component | identity/step3', function (hooks) {
setupRenderingTest(hooks);

test('it renders the identity step3 component', async function (assert) {
let stub = sinon.stub(window, 'confirm');
stub.returns(true);

this.set('setState', (val) => {
assert.step(val);
});

let server = new Server({
models: {},
routes() {
this.namespace = ENV.BASE_API_URL;

this.post('/users/verify', {});
},
});

await render(hbs`<Identity::Step3 @setState={{this.setState}}/>`);

assert.dom('[data-test-step3-heading]').exists();
Expand All @@ -34,10 +15,5 @@ module('Integration | Component | identity/step3', function (hooks) {
.hasText('Step 3: Link Profile Service');

assert.dom('[data-test-step3-desc]').exists();

await click('[data-test-step3-button]');

stub.restore();
server.shutdown();
});
});

0 comments on commit b261de8

Please sign in to comment.