Skip to content

Commit f95c76c

Browse files
committed
Change to test
1 parent 29ca656 commit f95c76c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/v2/jschema.spec.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ test('JSON Schema validation', async ({ page, workflow }) => {
125125
const addBtn = form.getByRole('button', { name: 'Add argument to list' }).first();
126126
await addBtn.click();
127127
await addBtn.click();
128-
await expect( addBtn).toBeDisabled();
128+
await expect(addBtn).toBeDisabled();
129129
const block = form.locator('.property-block', {
130130
has: page.getByText('requiredArrayWithMinMaxItems')
131131
});
@@ -145,7 +145,7 @@ test('JSON Schema validation', async ({ page, workflow }) => {
145145
await checkFirstArray(block, ['a', 'b', 'd', 'c']);
146146
// Remove items
147147
await form.getByRole('button', { name: 'Remove' }).nth(3).click();
148-
await expect( addBtn).not.toBeDisabled();
148+
await expect(addBtn).not.toBeDisabled();
149149
await form.getByRole('button', { name: 'Remove' }).nth(2).click();
150150
await checkFirstArray(block, ['a', 'b']);
151151
});
@@ -221,7 +221,12 @@ test('JSON Schema validation', async ({ page, workflow }) => {
221221
const input = form.getByLabel('exclusiveMinMaxOptionalInt', { exact: true });
222222
// Note: the only allowed characted in chrome is an "e" (for the scientific notation)
223223
await input.pressSequentially('e');
224-
expect(form.getByText('Should be a number')).toHaveCount(1);
224+
await expect(form.getByText('Should be a number')).toHaveCount(1);
225+
});
226+
227+
await test.step('Must be integer is validated', async () => {
228+
const input = form.getByLabel('exclusiveMinMaxOptionalInt', { exact: true });
229+
await input.fill('5.12');
225230
await page.getByRole('button', { name: 'Save changes' }).click();
226231
await page.getByText('must be integer').waitFor();
227232
await page.getByRole('button', { name: 'Discard changes' }).click();

0 commit comments

Comments
 (0)