Skip to content

Commit 0e5a423

Browse files
committed
fix
1 parent d4b9dfa commit 0e5a423

17 files changed

Lines changed: 264 additions & 304 deletions

src/visualBuilder/__test__/click/fields/boolean.test.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,12 @@ describe("When an element is clicked in visual builder mode", () => {
146146
expect(overlay).not.toBeNull();
147147
});
148148

149-
test("should have a field path dropdown", async () => {
150-
// waitFor needed for async component rendering
151-
await waitFor(() => {
152-
const toolbar = screen.getByTestId(
153-
"mock-field-label-wrapper"
154-
);
155-
expect(toolbar).toBeInTheDocument();
156-
});
149+
test("should have a field path dropdown", () => {
150+
// Component is already rendered from beforeAll setup
151+
const toolbar = screen.getByTestId(
152+
"mock-field-label-wrapper"
153+
);
154+
expect(toolbar).toBeInTheDocument();
157155
});
158156

159157
test("should contain a data-cslp-field-type attribute", async () => {

src/visualBuilder/__test__/click/fields/date.test.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,12 @@ describe("When an element is clicked in visual builder mode", () => {
146146
expect(overlay).not.toBeNull();
147147
});
148148

149-
test("should have a field path dropdown", async () => {
150-
// waitFor needed for async component rendering
151-
await waitFor(() => {
152-
const toolbar = screen.getByTestId(
153-
"mock-field-label-wrapper"
154-
);
155-
expect(toolbar).toBeInTheDocument();
156-
});
149+
test("should have a field path dropdown", () => {
150+
// Component is already rendered from beforeAll setup
151+
const toolbar = screen.getByTestId(
152+
"mock-field-label-wrapper"
153+
);
154+
expect(toolbar).toBeInTheDocument();
157155
});
158156

159157
test("should contain a data-cslp-field-type attribute", async () => {

src/visualBuilder/__test__/click/fields/file.test.tsx

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,10 @@ describe("When an element is clicked in visual builder mode", () => {
141141
expect(overlay).not.toBeNull();
142142
});
143143

144-
test("should have a field path dropdown", async () => {
145-
// waitFor needed for async component rendering
146-
await waitFor(() => {
147-
const toolbar = screen.getByTestId("mock-field-label-wrapper");
148-
expect(toolbar).toBeInTheDocument();
149-
});
144+
test("should have a field path dropdown", () => {
145+
// Component is already rendered from beforeAll setup
146+
const toolbar = screen.getByTestId("mock-field-label-wrapper");
147+
expect(toolbar).toBeInTheDocument();
150148
});
151149

152150
test("should contain a data-cslp-field-type attribute", async () => {
@@ -247,12 +245,10 @@ describe("When an element is clicked in visual builder mode", () => {
247245
expect(overlay).not.toBeNull();
248246
});
249247

250-
test("should have a field path dropdown", async () => {
251-
// waitFor needed for async component rendering
252-
await waitFor(() => {
253-
const toolbar = screen.getByTestId("mock-field-label-wrapper");
254-
expect(toolbar).toBeInTheDocument();
255-
});
248+
test("should have a field path dropdown", () => {
249+
// Component is already rendered from beforeAll setup
250+
const toolbar = screen.getByTestId("mock-field-label-wrapper");
251+
expect(toolbar).toBeInTheDocument();
256252
});
257253

258254
test("should contain a data-cslp-field-type attribute", async () => {

src/visualBuilder/__test__/click/fields/group.test.tsx

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,12 @@ describe("When an element is clicked in visual builder mode", () => {
138138
expect(overlay).not.toBeNull();
139139
});
140140

141-
test("should have a field path dropdown", async () => {
142-
// waitFor needed for async component rendering
143-
await waitFor(() => {
144-
const toolbar = screen.getByTestId(
145-
"mock-field-label-wrapper"
146-
);
147-
expect(toolbar).toBeInTheDocument();
148-
});
141+
test("should have a field path dropdown", () => {
142+
// Component is already rendered from beforeAll setup
143+
const toolbar = screen.getByTestId(
144+
"mock-field-label-wrapper"
145+
);
146+
expect(toolbar).toBeInTheDocument();
149147
});
150148

151149
test("should contain a data-cslp-field-type attribute", async () => {
@@ -243,14 +241,12 @@ describe("When an element is clicked in visual builder mode", () => {
243241
expect(overlay).not.toBeNull();
244242
});
245243

246-
test("should have a field path dropdown", async () => {
247-
// waitFor needed for async component rendering
248-
await waitFor(() => {
249-
const toolbar = screen.getByTestId(
250-
"mock-field-label-wrapper"
251-
);
252-
expect(toolbar).toBeInTheDocument();
253-
});
244+
test("should have a field path dropdown", () => {
245+
// Component is already rendered from beforeAll setup
246+
const toolbar = screen.getByTestId(
247+
"mock-field-label-wrapper"
248+
);
249+
expect(toolbar).toBeInTheDocument();
254250
});
255251

256252
test("should contain a data-cslp-field-type attribute", async () => {

src/visualBuilder/__test__/click/fields/html-rte.test.tsx

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,12 @@ describe("When an element is clicked in visual builder mode", () => {
135135
expect(overlay).not.toBeNull();
136136
});
137137

138-
test("should have a field path dropdown", async () => {
139-
// waitFor needed for async component rendering
140-
await waitFor(() => {
141-
const toolbar = screen.getByTestId(
142-
"mock-field-label-wrapper"
143-
);
144-
expect(toolbar).toBeInTheDocument();
145-
});
138+
test("should have a field path dropdown", () => {
139+
// Component is already rendered from beforeAll setup
140+
const toolbar = screen.getByTestId(
141+
"mock-field-label-wrapper"
142+
);
143+
expect(toolbar).toBeInTheDocument();
146144
});
147145

148146
test("should contain a data-cslp-field-type attribute", async () => {
@@ -229,14 +227,12 @@ describe("When an element is clicked in visual builder mode", () => {
229227
expect(overlay).not.toBeNull();
230228
});
231229

232-
test("should have a field path dropdown", async () => {
233-
// waitFor needed for async component rendering
234-
await waitFor(() => {
235-
const toolbar = screen.getByTestId(
236-
"mock-field-label-wrapper"
237-
);
238-
expect(toolbar).toBeInTheDocument();
239-
});
230+
test("should have a field path dropdown", () => {
231+
// Component is already rendered from beforeAll setup
232+
const toolbar = screen.getByTestId(
233+
"mock-field-label-wrapper"
234+
);
235+
expect(toolbar).toBeInTheDocument();
240236
});
241237

242238
test("should contain a data-cslp-field-type attribute", async () => {

src/visualBuilder/__test__/click/fields/json-rte.test.tsx

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,10 @@ describe("When an element is clicked in visual builder mode", () => {
136136
expect(overlay).not.toBeNull();
137137
});
138138

139-
test("should have a field path dropdown", async () => {
140-
// waitFor needed for async component rendering
141-
await waitFor(() => {
142-
const toolbar = screen.getByTestId("mock-field-label-wrapper");
143-
expect(toolbar).toBeInTheDocument();
144-
});
139+
test("should have a field path dropdown", () => {
140+
// Component is already rendered from beforeAll setup
141+
const toolbar = screen.getByTestId("mock-field-label-wrapper");
142+
expect(toolbar).toBeInTheDocument();
145143
});
146144

147145
test("should contain a data-cslp-field-type attribute", async () => {
@@ -229,12 +227,10 @@ describe("When an element is clicked in visual builder mode", () => {
229227
expect(overlay).not.toBeNull();
230228
});
231229

232-
test("should have a field path dropdown", async () => {
233-
// waitFor needed for async component rendering
234-
await waitFor(() => {
235-
const toolbar = screen.getByTestId("mock-field-label-wrapper");
236-
expect(toolbar).toBeInTheDocument();
237-
});
230+
test("should have a field path dropdown", () => {
231+
// Component is already rendered from beforeAll setup
232+
const toolbar = screen.getByTestId("mock-field-label-wrapper");
233+
expect(toolbar).toBeInTheDocument();
238234
});
239235

240236
test("should contain a data-cslp-field-type attribute", async () => {

src/visualBuilder/__test__/click/fields/link.test.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,12 @@ describe("When an element is clicked in visual builder mode", () => {
130130
expect(overlay).not.toBeNull();
131131
});
132132

133-
test("should have a field path dropdown", async () => {
134-
// waitFor needed for async component rendering
135-
await waitFor(() => {
136-
const toolbar = screen.getByTestId(
137-
"mock-field-label-wrapper"
138-
);
139-
expect(toolbar).toBeInTheDocument();
140-
});
133+
test("should have a field path dropdown", () => {
134+
// Component is already rendered from beforeAll setup
135+
const toolbar = screen.getByTestId(
136+
"mock-field-label-wrapper"
137+
);
138+
expect(toolbar).toBeInTheDocument();
141139
});
142140

143141
test("should contain a data-cslp-field-type attribute", async () => {

src/visualBuilder/__test__/click/fields/markdown.test.tsx

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,10 @@ describe("When an element is clicked in visual builder mode", () => {
131131
expect(overlay).not.toBeNull();
132132
});
133133

134-
test("should have a field path dropdown", async () => {
135-
// waitFor needed for async component rendering
136-
await waitFor(() => {
137-
const toolbar = screen.getByTestId("mock-field-label-wrapper");
138-
expect(toolbar).toBeInTheDocument();
139-
});
134+
test("should have a field path dropdown", () => {
135+
// Component is already rendered from beforeAll setup
136+
const toolbar = screen.getByTestId("mock-field-label-wrapper");
137+
expect(toolbar).toBeInTheDocument();
140138
});
141139

142140
test("should contain a data-cslp-field-type attribute", async () => {
@@ -224,12 +222,10 @@ describe("When an element is clicked in visual builder mode", () => {
224222
expect(overlay).not.toBeNull();
225223
});
226224

227-
test("should have a field path dropdown", async () => {
228-
// waitFor needed for async component rendering
229-
await waitFor(() => {
230-
const toolbar = screen.getByTestId("mock-field-label-wrapper");
231-
expect(toolbar).toBeInTheDocument();
232-
});
225+
test("should have a field path dropdown", () => {
226+
// Component is already rendered from beforeAll setup
227+
const toolbar = screen.getByTestId("mock-field-label-wrapper");
228+
expect(toolbar).toBeInTheDocument();
233229
});
234230

235231
test("should contain a data-cslp-field-type attribute", async () => {

src/visualBuilder/__test__/click/fields/multi-line.test.tsx

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,10 @@ describe("When an element is clicked in visual builder mode", () => {
164164
expect(overlay).not.toBeNull();
165165
});
166166

167-
test("should have a field path dropdown", async () => {
168-
// waitFor needed for async component rendering
169-
await waitFor(() => {
170-
const toolbar = screen.getByTestId("mock-field-label-wrapper");
171-
expect(toolbar).toBeInTheDocument();
172-
});
167+
test("should have a field path dropdown", () => {
168+
// Component is already rendered from beforeAll setup
169+
const toolbar = screen.getByTestId("mock-field-label-wrapper");
170+
expect(toolbar).toBeInTheDocument();
173171
});
174172

175173
test("should contain a data-cslp-field-type attribute", () => {
@@ -297,13 +295,12 @@ describe("When an element is clicked in visual builder mode", () => {
297295
expect(overlay).not.toBeNull();
298296
});
299297

300-
test("should have a field path dropdown", async () => {
301-
await waitFor(async () => {
302-
const toolbar = await screen.findByTestId(
303-
"mock-field-label-wrapper"
304-
);
305-
expect(toolbar).toBeInTheDocument();
306-
});
298+
test("should have a field path dropdown", () => {
299+
// Component is already rendered from beforeAll setup
300+
const toolbar = screen.getByTestId(
301+
"mock-field-label-wrapper"
302+
);
303+
expect(toolbar).toBeInTheDocument();
307304
});
308305

309306
test("should contain a data-cslp-field-type attribute", async () => {

src/visualBuilder/__test__/click/fields/number.test.tsx

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,10 @@ describe("When an element is clicked in visual builder mode", () => {
171171
expect(overlay).not.toBeNull();
172172
});
173173

174-
test("should have a field path dropdown", async () => {
175-
// waitFor needed for async component rendering
176-
await waitFor(() => {
177-
const toolbar = screen.getByTestId("mock-field-label-wrapper");
178-
expect(toolbar).toBeInTheDocument();
179-
});
174+
test("should have a field path dropdown", () => {
175+
// Component is already rendered from beforeAll setup
176+
const toolbar = screen.getByTestId("mock-field-label-wrapper");
177+
expect(toolbar).toBeInTheDocument();
180178
});
181179

182180
test("should contain a data-cslp-field-type attribute", () => {
@@ -294,12 +292,10 @@ describe("When an element is clicked in visual builder mode", () => {
294292
expect(overlay).not.toBeNull();
295293
});
296294

297-
test("should have a field path dropdown", async () => {
298-
// waitFor needed for async component rendering
299-
await waitFor(() => {
300-
const toolbar = screen.getByTestId("mock-field-label-wrapper");
301-
expect(toolbar).toBeInTheDocument();
302-
});
295+
test("should have a field path dropdown", () => {
296+
// Component is already rendered from beforeAll setup
297+
const toolbar = screen.getByTestId("mock-field-label-wrapper");
298+
expect(toolbar).toBeInTheDocument();
303299
});
304300

305301
test("should contain a data-cslp-field-type attribute", () => {

0 commit comments

Comments
 (0)