Skip to content

Commit bf580cb

Browse files
mrsaicharan1abhinavk96
authored andcommitted
Added billing info and payments section for invoices (#3131)
fixed tests settings->account changed to acceptance tests
1 parent 99fcd13 commit bf580cb

File tree

11 files changed

+92
-0
lines changed

11 files changed

+92
-0
lines changed

app/router.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ router.map(function() {
112112
this.route('email-preferences');
113113
this.route('applications');
114114
this.route('danger-zone');
115+
this.route('billing-info', function() {
116+
this.route('payment-info');
117+
this.route('invoices');
118+
});
115119
});
116120
this.route('explore');
117121
this.route('my-tickets', function() {

app/routes/account/billing-info.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import Route from '@ember/routing/route';
2+
3+
export default Route.extend({
4+
});
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import Route from '@ember/routing/route';
2+
3+
export default Route.extend({
4+
});
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import Route from '@ember/routing/route';
2+
3+
export default Route.extend({
4+
});

app/templates/account.hbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
{{#link-to 'account.contact-info' class='item'}}
88
{{t 'Contact Info'}}
99
{{/link-to}}
10+
{{#link-to 'account.billing-info' class='item'}}
11+
{{t 'Billing Info'}}
12+
{{/link-to}}
1013
{{#link-to 'account.password' class='item'}}
1114
{{t 'Password'}}
1215
{{/link-to}}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<div class="ui grid">
2+
<div class="row">
3+
<div class="{{if device.isMobile 'sixteen' 'three'}} wide column">
4+
{{#tabbed-navigation isVertical=true}}
5+
{{#link-to 'account.billing-info.payment-info' class='item'}}
6+
{{t 'Payment Information'}}
7+
{{/link-to}}
8+
{{#link-to 'account.billing-info.invoices' class='item'}}
9+
{{t 'Invoices'}}
10+
{{/link-to}}
11+
{{/tabbed-navigation}}
12+
</div>
13+
<div class="{{if device.isMobile 'sixteen' 'thirteen'}} wide column">
14+
{{outlet}}
15+
</div>
16+
</div>
17+
</div>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<div class="ui grid stackable">
2+
<div class="thirteen wide column">
3+
<h2 class="ui header column">{{t 'Due Invoices'}}</h2>
4+
</div>
5+
<div class="ui hidden divider"></div>
6+
<div class="thirteen wide column">
7+
<h2 class="ui header column">{{t 'Upcoming Invoices'}}</h2>
8+
</div>
9+
<div class="ui hidden divider"></div>
10+
<div class="thirteen wide column">
11+
<h2 class="ui header column">{{t 'Paid Invoices'}}</h2>
12+
</div>
13+
<div class="ui hidden divider"></div>
14+
</div>

app/templates/account/billing-info/payment-info.hbs

Whitespace-only changes.

tests/acceptance/billing-info-test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { module, test } from 'qunit';
2+
import { setupApplicationTest } from 'ember-qunit';
3+
import { currentURL, visit } from '@ember/test-helpers';
4+
5+
6+
module('Acceptance | account/billing-info', function(hooks) {
7+
setupApplicationTest(hooks);
8+
9+
10+
test('visiting account/billing-info', async function(assert) {
11+
await visit('account/billing-info');
12+
assert.equal(currentURL(), 'account/billing-info');
13+
});
14+
});

tests/acceptance/invoices-test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { module, test } from 'qunit';
2+
import { setupApplicationTest } from 'ember-qunit';
3+
import { currentURL, visit } from '@ember/test-helpers';
4+
5+
6+
module('Acceptance | account/billing-info/invoices', function(hooks) {
7+
setupApplicationTest(hooks);
8+
9+
10+
test('visiting account/billing-info/invoices login', async function(assert) {
11+
await visit('account/billing-info/invoices');
12+
assert.equal(currentURL(), 'account/billing-info/invoices');
13+
});
14+
});

0 commit comments

Comments
 (0)