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');
|
2017-02-12 23:31:31 -05:00
|
|
|
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');
|
2017-02-12 23:31:31 -05:00
|
|
|
|
|
|
|
click('.choice-btn');
|
|
|
|
|
|
|
|
andThen(() => {
|
|
|
|
ok(exists('.choice-response'), 'Response happens');
|
2017-02-12 19:35:59 -05:00
|
|
|
});
|
|
|
|
});
|