From c8ace159daacc38aec9cc2cde8dd788d49d21020 Mon Sep 17 00:00:00 2001 From: Woramat Ngamkham Date: Tue, 25 Oct 2022 13:35:34 +0700 Subject: [PATCH] fix(form): asterisks ::before pseudoclass (#131) --- packages/form/test/Field.astro.test.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/form/test/Field.astro.test.js b/packages/form/test/Field.astro.test.js index 5ff26b2..bf5d552 100644 --- a/packages/form/test/Field.astro.test.js +++ b/packages/form/test/Field.astro.test.js @@ -30,9 +30,10 @@ describe('Field.astro test', () => { 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 const expectedLabel = 'TestLabel'; + const expectedAttribute = 'data-validator-required="true"'; const props = { control: { label: expectedLabel, @@ -49,7 +50,7 @@ describe('Field.astro test', () => { // assert expect(actualResult).to.contain(expectedLabel); - expect(actualResult).to.contain('*'); + expect(actualResult).to.contain(expectedAttribute); }); it('Should server-render validation error attributes', async () => {