chore: e2e test for date input clearing

This commit is contained in:
Jacob Fletcher
2022-12-26 14:31:08 -05:00
parent 883daf7b46
commit 420ed6738e

View File

@@ -374,6 +374,18 @@ describe('fields', () => {
url = new AdminUrlUtil(serverURL, 'date-fields');
});
test('should clear date', async () => {
await page.goto(url.create);
const dateField = page.locator('#field-default input');
await expect(dateField).toBeVisible();
await dateField.fill('2021-08-01');
await expect(dateField).toHaveValue('2021-08-01');
const clearButton = page.locator('#field-default .date-time-picker__clear-button');
await expect(clearButton).toBeVisible();
await clearButton.click();
await expect(dateField).toHaveValue('');
});
test('should display formatted date in list view if displayFormat option added to date field', async () => {
await page.goto(url.list);
const formattedDateCell = page.locator('.row-1 .cell-timeOnly');