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',
},
];
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:
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:
the testParameterJson can be added in the helper-interfaces.ts file: