fix(form): asterisks ::before pseudoclass (#131)
This commit is contained in:
parent
facefc4da5
commit
c8ace159da
1 changed files with 3 additions and 2 deletions
|
@ -30,9 +30,10 @@ describe('Field.astro test', () => {
|
||||||
expect(actualResult).to.contain(expectedLabel);
|
expect(actualResult).to.contain(expectedLabel);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should render required fields with asterisk in label when showValidationHints is true', async () => {
|
it('Should render required fields with data required attribute when showValidationHints is true', async () => {
|
||||||
// arrange
|
// arrange
|
||||||
const expectedLabel = 'TestLabel';
|
const expectedLabel = 'TestLabel';
|
||||||
|
const expectedAttribute = 'data-validator-required="true"';
|
||||||
const props = {
|
const props = {
|
||||||
control: {
|
control: {
|
||||||
label: expectedLabel,
|
label: expectedLabel,
|
||||||
|
@ -49,7 +50,7 @@ describe('Field.astro test', () => {
|
||||||
|
|
||||||
// assert
|
// assert
|
||||||
expect(actualResult).to.contain(expectedLabel);
|
expect(actualResult).to.contain(expectedLabel);
|
||||||
expect(actualResult).to.contain('*');
|
expect(actualResult).to.contain(expectedAttribute);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should server-render validation error attributes', async () => {
|
it('Should server-render validation error attributes', async () => {
|
||||||
|
|
Loading…
Reference in a new issue