citrusframework / citrus-simulator

Standalone simulator for different messaging transports such as Http REST, SOAP WebService, JMS, RMI, mail messaging and more
Apache License 2.0
44 stars 45 forks source link

Simulator GUI: clear filters on scenario-result/ page doesn't work #305

Open flumiii opened 1 week ago

flumiii commented 1 week ago

Defect: When trying to clear filters ... 'to be specified by @phos-web'

When this is fixed following Test can be added in the schenario-result.spec.ts file:

test('should clear all filters with icon', async ({ page }) => {
  await page.goto('http://localhost:9000/scenario-result/');

  await page.getByTestId('scenarioExecutionFilterInput').fill('Test Scenario');
  await page.getByTestId('scenarioExecutionStatusInSelect').selectOption('Failure');
  await fillDatePickerField(page.getByTestId('scenarioExecutionFromDateInput'), '21072024', '120531');
  await fillDatePickerField(page.getByTestId('scenarioExecutionToDateInput'), '22072024', '052007');
  await page.getByTestId('scenarioExecutionHeaderFilterInput').fill('Test Headers');

  await page.getByTestId('scenarioExecutionOpenFilterButton').click();
  await page.getByTestId('headerFilterInput').fill('HeaderName1');
  await page.getByTestId('headerValueInput').fill('HeaderValue1');
  await page.getByTestId('addHeaderFilterButton').click();
  await page.locator('#header-1').fill('HeaderName2');
  await page.locator('#header-1-value-comparator').selectOption('contains');
  await page.locator('#header-1-value').fill('HeaderValue2');
  await page.getByTestId('applyHeaderFilterButton').click();
  await page.getByTestId('clearAllFiltersButton').click();

  await expect(page.getByTestId('scenarioExecutionFilterInput')).toBeEmpty();
  await expect(page.getByTestId('scenarioExecutionStatusInSelect')).toHaveValue('');
  await expect(page.getByTestId('scenarioExecutionFromDateInput')).toBeEmpty();
  await expect(page.getByTestId('scenarioExecutionToDateInput')).toBeEmpty();
  await expect(page.getByTestId('scenarioExecutionHeaderFilterInput')).toBeEmpty();
});
phos-web commented 1 week ago

When trying to clear filters with the "clearAllFiltersButton" filters still have selected values. Concerning reproducability: In manual testing the clearing of all filters work. During automated testing with Playwright the clearing of the filters does not work.