example(architecture/dart): drop currency pipe workaround (#2804)
Fixes #1898
This commit is contained in:
parent
52f6693f91
commit
f70ba97471
|
@ -11,10 +11,7 @@ import 'tax_rate_service.dart';
|
||||||
|
|
||||||
<div *ngIf="amountBox.value != ''">
|
<div *ngIf="amountBox.value != ''">
|
||||||
The sales tax is
|
The sales tax is
|
||||||
{{ getTax(amountBox.value) | currency:'USD':false:'1.2-2' }}
|
{{ getTax(amountBox.value) | currency:'USD':true:'1.2-2' }}
|
||||||
<!-- would like to write currency:'USD':true:'1.2-2' but
|
|
||||||
currency as symbol is not currently supported; see
|
|
||||||
https://github.com/dart-lang/intl/issues/59 -->
|
|
||||||
</div>
|
</div>
|
||||||
''',
|
''',
|
||||||
providers: const [SalesTaxService, TaxRateService])
|
providers: const [SalesTaxService, TaxRateService])
|
||||||
|
|
|
@ -71,9 +71,7 @@ function salesTaxTests() {
|
||||||
it('shows sales tax', async function () {
|
it('shows sales tax', async function () {
|
||||||
let page = getPageElts();
|
let page = getPageElts();
|
||||||
page.salesTaxAmountInput.sendKeys('10', protractor.Key.ENTER);
|
page.salesTaxAmountInput.sendKeys('10', protractor.Key.ENTER);
|
||||||
// Note: due to Dart bug USD is shown instead of $
|
expect(page.salesTaxDetail.getText()).toEqual('The sales tax is $1.00');
|
||||||
let re = /The sales tax is (\$|USD)1.00/;
|
|
||||||
expect(page.salesTaxDetail.getText()).toMatch(re);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue