initial spec for donation-row component
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
import { acceptance } from 'helpers/qunit-helpers';
|
||||
|
||||
acceptance('Discourse Donations', {
|
||||
loggedIn: true,
|
||||
settings: {
|
||||
discourse_donations_enabled: true,
|
||||
discourse_donations_types: '',
|
||||
discourse_donations_amounts: '1',
|
||||
},
|
||||
});
|
||||
|
||||
QUnit.test("donate page has a form on it", async assert => {
|
||||
await visit("/donate");
|
||||
assert.ok(exists(".donations-page-donations"));
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
import componentTest from 'helpers/component-test';
|
||||
|
||||
moduleForComponent('donation-row', { integration: true });
|
||||
|
||||
componentTest('donation-row', {
|
||||
template: `{{donation-row currency=3 amount=21 period='monthly'}}`,
|
||||
|
||||
test(assert) {
|
||||
assert.equal(find('.donation-row-currency').text(), '3');
|
||||
assert.equal(find('.donation-row-amount').text(), '21');
|
||||
assert.equal(find('.donation-row-period').text(), 'monthly');
|
||||
},
|
||||
});
|
||||
|
||||
componentTest('donation-row cancels subscription', {
|
||||
template: `{{donation-row currentUser=currentUser subscription=subscription}}`,
|
||||
|
||||
beforeEach() {
|
||||
this.set('currentUser', true);
|
||||
this.set('subscription', true);
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
assert.ok(find('.donation-row-subscription').length);
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user