Skip to content

Commit 9968963

Browse files
uds5501abhinavk96
authored andcommitted
test: add integration tests for paytm modals (#3469)
* test: add integration tests for paytm modals * feat: update integration tests
1 parent 42b5bcc commit 9968963

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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.setProperties({
11+
'isOpen' : false,
12+
'currency' : 'USD',
13+
'amount' : 100,
14+
'verifyOtp' : () => {}
15+
});
16+
await render(hbs`{{modals/paytm-otp isOpen=isOpen currency=currency amount=amount verifyOtp=(action verifyOtp)}}`);
17+
assert.ok(this.element.innerHTML.trim().includes('Enter OTP sent to mobile number'));
18+
});
19+
});
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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.setProperties({
11+
'isOpen' : false,
12+
'currency' : 'USD',
13+
'amount' : 100,
14+
'openOTPController' : () => {}
15+
});
16+
await render(hbs`{{modals/paytm-payment-options isOpen=isOpen currency=currency amount=amount openOTPController=(action openOTPController)}}`);
17+
assert.ok(this.element.innerHTML.trim().includes('Select an option to pay'));
18+
});
19+
});

0 commit comments

Comments
 (0)