Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulator GUI: Implement the '/test-parameter' site test suggestion #303

Open
flumiii opened this issue Sep 17, 2024 · 0 comments
Open

Simulator GUI: Implement the '/test-parameter' site test suggestion #303

flumiii opened this issue Sep 17, 2024 · 0 comments

Comments

@flumiii
Copy link

flumiii commented Sep 17, 2024

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',
  },
];
@flumiii flumiii changed the title Simulator GUI: Implement the /test-parameter site Simulator GUI: Implement the '/test-parameter' site test suggestion Sep 17, 2024
flumiii pushed a commit to phos-web/citrus-simulator that referenced this issue Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant