Skip to content

Commit

Permalink
test(demo-integrations): added e2e tests for number minus sign prop
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanslav Zaytsev authored and splincode committed Mar 4, 2024
1 parent b990735 commit 2129290
Showing 1 changed file with 47 additions and 0 deletions.
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');
});
});
});

0 comments on commit 2129290

Please sign in to comment.