Skip to content

Commit c9a7a09

Browse files
committed
test: add integration tests for paytm modals
1 parent f87d084 commit c9a7a09

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { module, test } from 'qunit';
2+
import { setupIntegrationTest } from 'open-event-frontend/tests/helpers/setup-integration-test';
3+
import hbs from 'htmlbars-inline-precompile';
4+
import { render } from '@ember/test-helpers';
5+
6+
module('Integration | Component | modals/paytm otp modal', function(hooks) {
7+
setupIntegrationTest(hooks);
8+
9+
test('it renders', async function(assert) {
10+
this.set('isOpen', false);
11+
this.set('currency', 'USD');
12+
this.set('amount', 100);
13+
await render(hbs`{{modals/paytm-otp isOpen=isOpen currency=currency amount=amount}}`);
14+
assert.ok(this.element.innerHTML.trim().includes('Enter OTP sent to mobile number'));
15+
});
16+
});
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { module, test } from 'qunit';
2+
import { setupIntegrationTest } from 'open-event-frontend/tests/helpers/setup-integration-test';
3+
import hbs from 'htmlbars-inline-precompile';
4+
import { render } from '@ember/test-helpers';
5+
6+
module('Integration | Component | modals/paytm payment options modal', function(hooks) {
7+
setupIntegrationTest(hooks);
8+
9+
test('it renders', async function(assert) {
10+
this.set('isOpen', false);
11+
this.set('currency', 'USD');
12+
this.set('amount', 100);
13+
await render(hbs`{{modals/paytm-payment-options isOpen=isOpen currency=currency amount=amount}}`);
14+
assert.ok(this.element.innerHTML.trim().includes('Select an option to pay'));
15+
});
16+
});

0 commit comments

Comments
 (0)