diff --git a/tests/integration/components/identity/blocked.js b/tests/integration/components/identity/blocked.js new file mode 100644 index 00000000..83b9051c --- /dev/null +++ b/tests/integration/components/identity/blocked.js @@ -0,0 +1,26 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'website-www/tests/helpers'; +import { render, click } from '@ember/test-helpers'; +import { hbs } from 'ember-cli-htmlbars'; + +module('Integration | Component | identity/blocked', function (hooks) { + setupRenderingTest(hooks); + + test('it renders the initial state correctly', async function (assert) { + await render(hbs``); + + assert.dom('[data-test-blocked-heading]').hasText('Status Blocked'); + assert.dom('[data-test-blocked-desc]').exists(); + assert.dom('[data-test-blocked-button]').hasText('Retry'); + }); + + test('it handles retry button click', async function (assert) { + let retryClicked = false; + this.set('setState', () => (retryClicked = true)); + await render(hbs``); + + await click('[data-test-blocked-button]'); + + assert.true(retryClicked, 'Retry button should trigger setState'); + }); +}); diff --git a/tests/integration/components/identity/verified.js b/tests/integration/components/identity/verified.js new file mode 100644 index 00000000..da908c34 --- /dev/null +++ b/tests/integration/components/identity/verified.js @@ -0,0 +1,19 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'website-www/tests/helpers'; +import { render } from '@ember/test-helpers'; +import { hbs } from 'ember-cli-htmlbars'; + +module('Integration | Component | identity/verified', function (hooks) { + setupRenderingTest(hooks); + + test('it renders the success message correctly', async function (assert) { + await render(hbs``); + + assert.dom('[data-test-verified-heading]').hasText('Verified'); + assert.dom('[data-test-verified-desc]').exists(); + assert + .dom('[data-test-verified-desc] span') + .hasClass('identity-box-desc-bold'); + assert.dom('[data-test-verified-desc] span').hasText('Congratulations!!!'); + }); +});