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

22 lines
528 B
Plaintext
Raw Normal View History

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