generated from Tinkoff/angular-open-source-starter
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(demo-integrations): added e2e tests for number minus sign prop
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
projects/demo-integrations/src/tests/kit/number/number-minus-sign.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import {openNumberPage} from './utils'; | ||
|
||
describe('Properly using custom minus sign', () => { | ||
describe('correctly applies \u002D as minus sign', () => { | ||
beforeEach(() => { | ||
openNumberPage('minusSign=\u002D'); | ||
}); | ||
|
||
it('-32412 => \u002D32 412', () => { | ||
cy.get('@input').type('-32412').should('have.value', '\u002D32 412'); | ||
}); | ||
|
||
it('\u002D32412 => \u002D32 412', () => { | ||
cy.get('@input').type('-32412').should('have.value', '\u002D32 412'); | ||
}); | ||
|
||
it('\u30FC32412 => \u002D32 412', () => { | ||
cy.get('@input').type('\u30FC32412').should('have.value', '\u002D32 412'); | ||
}); | ||
|
||
it('\u201332412 => \u002D32 412', () => { | ||
cy.get('@input').type('\u201332412').should('have.value', '\u002D32 412'); | ||
}); | ||
}); | ||
|
||
describe('correctly works with decimal, and minus sign is i', () => { | ||
beforeEach(() => { | ||
openNumberPage('minusSign=i&precision=Infinity'); | ||
}); | ||
|
||
it('-324,12 => i324.12', () => { | ||
cy.get('@input').type('-324,12').should('have.value', 'i 324.12'); | ||
}); | ||
|
||
it('\u002D324,12 => i324.12', () => { | ||
cy.get('@input').type('\u002D324,12').should('have.value', 'i 324.12'); | ||
}); | ||
|
||
it('\u30FC324,12 => i324.12', () => { | ||
cy.get('@input').type('\u30FC324,12').should('have.value', 'i 324.12'); | ||
}); | ||
|
||
it('\u2013324,12 => i324.12', () => { | ||
cy.get('@input').type('\u2013324,12').should('have.value', 'i 324.12'); | ||
}); | ||
}); | ||
}); |