citrusframework / citrusframework/citrus-simulator
Simulator GUI: Implement the '/test-parameter' site test suggestion
- Dominant language
- Java
- Stars
- 47
- Forks
- 45
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 7
Description
When we wrote the Playwright tests for the UI it appeared that the '/test-parameter' site doesn't display the test parameters when the frontend receives following json:
```
[
{
'key': 'test key',
'testResultId': '0',
'value': 'test value',
'createdDate': '2024-08-27T13:39:51.785Z',
'lastModifiedDate': '2024-08-27T13:39:51.785Z',
},
]
```
If the displaying of test results should be implemented then following EntityPageContentObject can be added at the end of the list in the entity.spec.ts file and the page should then be tested accordingly:
```
{
testName: 'should display table of test parameters and refresh button should work',
apiUrl: '**/api/test-parameters*',
entityUrl: 'http://localhost:9000/test-parameter',
contentJson: testParameterJson,
locators: [
'th :text("Key")',
'th :text("Value")',
'th :text("Test Result")',
'th :text("Created Date")',
'th :text("Last Modified Date")',
],
testIdsAndExpectedValues: [
{testId: 'testParameterEntityKey', expectedValue: 'test key'},
{testId: 'testParameterEntityValue', expectedValue: 'test value'},
{testId: 'testParameterEntityTestResultLink', expectedValue: '0'},
{testId: 'testParameterEntityCreatedDate', expectedValue: exampleDate},
{testId: 'testParameterEntityLastModifiedDate', expectedValue: exampleDate},
],
testIdToBeVisible: ['', ''],
},
```
the testParameterJson can be added in the helper-interfaces.ts file:
```
export const testParameterJson = [
{
key: 'test key',
testResultId: 0,
value: 'test value',
createdDate: '2024-08-27T13:39:51.785Z',
lastModifiedDate: '2024-08-27T13:39:51.785Z',
},
];
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by inspecting the frontend route for /test-parameter and the existing patterns in entity.spec.ts. Add the supplied testParameterJson in helper-interfaces.ts, then use the suggested EntityPageContentObject to verify the table headers, parameter values, test-result link, dates, and refresh behavior. Done means the Playwright test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, typescript
- Domain
- frontend, testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100