@@ -8,51 +8,107 @@ import {TEXT_CONTENT_SPEC} from './helpers';
88test . describe ( 'Text Content' , ( ) => {
99 test . describe ( 'Text' , ( ) => {
1010 test ( 'default' , async ( { mount, expectScreenshot} ) => {
11- await mount ( < DynamicForm spec = { TEXT_CONTENT_SPEC . defaultText } /> ) ;
11+ const component = await mount ( < DynamicForm spec = { TEXT_CONTENT_SPEC . defaultText } /> ) ;
12+
13+ await component
14+ . locator (
15+ '.g-text.g-text_variant_body-1.g-color-text.g-color-text_color_warning.df-text-content__icon' ,
16+ )
17+ . waitFor ( ) ;
1218
1319 await expectScreenshot ( ) ;
1420 } ) ;
1521
1622 test ( 'layout row' , async ( { mount, expectScreenshot} ) => {
17- await mount ( < DynamicForm spec = { TEXT_CONTENT_SPEC . textLayoutRow } /> ) ;
23+ const component = await mount ( < DynamicForm spec = { TEXT_CONTENT_SPEC . textLayoutRow } /> ) ;
24+
25+ await component
26+ . locator (
27+ '.g-text.g-text_variant_body-1.g-color-text.g-color-text_color_warning.df-text-content__icon' ,
28+ )
29+ . waitFor ( ) ;
1830
1931 await expectScreenshot ( ) ;
2032 } ) ;
2133
2234 test ( 'layout row verbose' , async ( { mount, expectScreenshot} ) => {
23- await mount ( < DynamicForm spec = { TEXT_CONTENT_SPEC . textLayoutRowVerbose } /> ) ;
35+ const component = await mount (
36+ < DynamicForm spec = { TEXT_CONTENT_SPEC . textLayoutRowVerbose } /> ,
37+ ) ;
38+
39+ await component
40+ . locator (
41+ '.g-text.g-text_variant_body-1.g-color-text.g-color-text_color_warning.df-text-content__icon' ,
42+ )
43+ . waitFor ( ) ;
2444
2545 await expectScreenshot ( ) ;
2646 } ) ;
2747
2848 test ( 'layout transparent' , async ( { mount, expectScreenshot} ) => {
29- await mount ( < DynamicForm spec = { TEXT_CONTENT_SPEC . textLayoutTransparent } /> ) ;
49+ const component = await mount (
50+ < DynamicForm spec = { TEXT_CONTENT_SPEC . textLayoutTransparent } /> ,
51+ ) ;
52+
53+ await component
54+ . locator (
55+ '.g-text.g-text_variant_body-1.g-color-text.g-color-text_color_warning.df-text-content__icon' ,
56+ )
57+ . waitFor ( ) ;
3058
3159 await expectScreenshot ( ) ;
3260 } ) ;
3361 } ) ;
3462
3563 test . describe ( 'Label' , ( ) => {
3664 test ( 'default' , async ( { mount, expectScreenshot} ) => {
37- await mount ( < DynamicForm spec = { TEXT_CONTENT_SPEC . defaultLabel } /> ) ;
65+ const component = await mount ( < DynamicForm spec = { TEXT_CONTENT_SPEC . defaultLabel } /> ) ;
66+
67+ await component
68+ . locator (
69+ '.g-text.g-text_variant_body-1.g-color-text.g-color-text_color_warning.df-text-content__icon' ,
70+ )
71+ . waitFor ( ) ;
3872
3973 await expectScreenshot ( ) ;
4074 } ) ;
4175
4276 test ( 'layout row' , async ( { mount, expectScreenshot} ) => {
43- await mount ( < DynamicForm spec = { TEXT_CONTENT_SPEC . labelLayoutRow } /> ) ;
77+ const component = await mount ( < DynamicForm spec = { TEXT_CONTENT_SPEC . labelLayoutRow } /> ) ;
78+
79+ await component
80+ . locator (
81+ '.g-text.g-text_variant_body-1.g-color-text.g-color-text_color_warning.df-text-content__icon' ,
82+ )
83+ . waitFor ( ) ;
4484
4585 await expectScreenshot ( ) ;
4686 } ) ;
4787
4888 test ( 'layout row verbose' , async ( { mount, expectScreenshot} ) => {
49- await mount ( < DynamicForm spec = { TEXT_CONTENT_SPEC . labelLayoutRowVerbose } /> ) ;
89+ const component = await mount (
90+ < DynamicForm spec = { TEXT_CONTENT_SPEC . labelLayoutRowVerbose } /> ,
91+ ) ;
92+
93+ await component
94+ . locator (
95+ '.g-text.g-text_variant_body-1.g-color-text.g-color-text_color_warning.df-text-content__icon' ,
96+ )
97+ . waitFor ( ) ;
5098
5199 await expectScreenshot ( ) ;
52100 } ) ;
53101
54102 test ( 'layout transparent' , async ( { mount, expectScreenshot} ) => {
55- await mount ( < DynamicForm spec = { TEXT_CONTENT_SPEC . labelLayoutTransparent } /> ) ;
103+ const component = await mount (
104+ < DynamicForm spec = { TEXT_CONTENT_SPEC . labelLayoutTransparent } /> ,
105+ ) ;
106+
107+ await component
108+ . locator (
109+ '.g-text.g-text_variant_body-1.g-color-text.g-color-text_color_warning.df-text-content__icon' ,
110+ )
111+ . waitFor ( ) ;
56112
57113 await expectScreenshot ( ) ;
58114 } ) ;
@@ -64,7 +120,15 @@ test.describe('Text Content', () => {
64120 } ) ;
65121
66122 test ( 'default value' , async ( { mount, expectScreenshot} ) => {
67- await mount ( < DynamicForm spec = { TEXT_CONTENT_SPEC . labelDefaultValue } /> ) ;
123+ const component = await mount (
124+ < DynamicForm spec = { TEXT_CONTENT_SPEC . labelDefaultValue } /> ,
125+ ) ;
126+
127+ await component
128+ . locator (
129+ '.g-text.g-text_variant_body-1.g-color-text.g-color-text_color_warning.df-text-content__icon' ,
130+ )
131+ . waitFor ( ) ;
68132
69133 await expectScreenshot ( ) ;
70134 } ) ;
0 commit comments