fix(form): asterisks ::before pseudoclass (#131)

This commit is contained in:
Woramat Ngamkham 2022-10-25 13:35:34 +07:00 committed by GitHub
parent facefc4da5
commit c8ace159da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 () => {