Skip to content

Commit

Permalink
Merge pull request #868 from hmcts/PAY-6931-New-Column-For-Jurisdicti…
Browse files Browse the repository at this point in the history
…on-2

PAY-6931 Add column for jurisdiction 2
  • Loading branch information
chrisworthcgi authored Apr 29, 2024
2 parents 5f2fdb6 + 28bfa0f commit e536771
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
5 changes: 5 additions & 0 deletions acceptance-tests/test/end-to-end/pages/add_fees.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ module.exports = {
I.click('Jurisdiction 2');
I.click({ css: '#'.concat(jurisdiction2) });
I.click('Apply filters');
I.see('Jurisdiction 2');
if (jurisdiction2 === 'family_court'){
I.see('Family Court');
}
I.see('Family Court');
I.click('Select');
I.wait(CCPBConstants.fiveSecondWaitTime);
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<table *ngIf="(fees | filterFees: searchFilter: jurisdictionsFilter).length >= 1">
<thead>
<tr>
<th>Jurisdiction 2</th>
<th>Fee Code</th>
<th>Description</th>
<th>Amount</th>
Expand All @@ -9,9 +10,10 @@
</thead>
<tbody>
<tr *ngFor="let fee of fees | filterFees: searchFilter: jurisdictionsFilter | paginate: { itemsPerPage: 15, currentPage: p }">
<td>{{ capitalise(fee.jurisdiction2.name)}}</td>
<td>{{ fee.code }}</td>
<td>

<span *ngIf="!fee.current_version?.description || fee.current_version?.description === ''">
{{fee?.discontinued_list[fee?.discontinued_list.length-1]?.description}}
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,15 @@
.fee-current-version-amount-field {
width: 20%;
}

th:nth-child(1){
width: 25%;
}

th:nth-child(2){
width: 18%;
}

th:nth-child(3){
width: 60%;
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,8 @@ describe('Fee list component', () => {
const debugElement = fixture.debugElement.queryAll(By.css('.fee-current-version-amount'));
expect(debugElement[0].nativeElement.innerText).toEqual('£10,000.00');
});

it('Should convert to upper case', () => {
expect(component.capitalise('probate registry')).toEqual('Probate Registry');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ export class FeeListComponent {
selectFee(fee: IFee) {
this.selectedFeeEvent.emit(fee);
}
capitalise(str: string): string {
return str
.split(' ')
.map(word => word[0].toUpperCase() + word.slice(1))
.join(' ')
}
}

0 comments on commit e536771

Please sign in to comment.