Files
discourse-subscriptions/test/javascripts/acceptance/choice-discourse-test.es6
T

30 lines
702 B
JavaScript
Raw Normal View History

2017-02-07 13:56:22 +11:00
import { acceptance } from 'helpers/qunit-helpers';
2017-02-14 10:11:10 +11:00
acceptance('Discourse Payments', { loggedIn: true });
2017-02-07 13:56:22 +11:00
2017-02-14 10:19:59 +11:00
test('Payments Link Exists', () => {
visit('/users/eviltrout');
andThen(() => {
ok(exists('.discourse-payments > a'), 'Link exists on profile page');
});
});
test('Payments Page Exists', () => {
2017-02-14 10:11:10 +11:00
visit('/users/eviltrout/payments');
2017-02-13 11:35:59 +11:00
andThen(() => {
2017-02-13 13:50:48 +11:00
ok(exists('h1'), 'Heading exists');
2017-02-13 15:31:31 +11:00
ok($.trim($('.payments').text()) == 'eviltrout', 'username is present on page');
});
});
2017-02-14 10:19:59 +11:00
test('Payments Page response happens', () => {
2017-02-14 10:11:10 +11:00
visit('/users/eviltrout/payments');
2017-02-13 15:31:31 +11:00
click('.choice-btn');
andThen(() => {
ok(exists('.choice-response'), 'Response happens');
2017-02-13 11:35:59 +11:00
});
});