UserOfficeProject / issue-tracker

Shared place for features and bugs from all collaborators.
0 stars 0 forks source link

Set up Mock Server for testing UOWS integration #510

Closed vyshnavi1605 closed 2 years ago

vyshnavi1605 commented 2 years ago

Set up mockserver - trial out mockserver in a docker container and mockserver client in the frontend cypress folder and handle login

part of: https://github.com/UserOfficeProject/user-office-project-issue-tracker/issues/56

vyshnavi1605 commented 2 years ago

Progress so far

docker-orchestration changes, branch 510-setup-mockserver:

backend changes, branch 510-setup-mockserver

Frontend changes, branch 510-setup-mockserver

E2E tests

PASSING TESTS PROPOSALS

To run the E2E tests using the mockserver:

vyshnavi1605 commented 2 years ago

The following test suites that we want to run in STFC mode are passing:

In the following test suites these tests are failing:

simonfernandes commented 2 years ago

A user-officer should not be able go to next step or create call if there is validation error, this is failing due to using esi-template which is behind the feature flag.

I think we could enable the feature flag for the test, which is what Martin was showing us in the last sprint planning, to avoid having separate tests.

If user updates his info, officer should be able to see the event logs for that update

If they're user logs we aren't interested in that since we have user management disabled. We do want proposal logs though but that sounds separate.

instruments, what tests in this file do we want to run?

We had hidden the instruments sections but I think we might need to reenable some of it for the facility work that's being done? I think @mr-field would have a better idea of what's needed here. Some of the technical review tests in there shouldn't be necessary though.

Both Should preserve the selected users after pagination are failing

We might have to hard code in specific emails that we have responses for and pass those emails into the users that are created for the tests. Instead of using faker to generate random emails. It would affect the ESS tests in that they'd be searching for specific emails but I don't think that would be a problem?

Officer can delete question , failing locally on e2e mode too

It sounds like the test is broken, but it's odd that we haven't come across this problem running the tests in GitHub Actions. It may be worth checking on Slack if the ESS are aware of any problems.

Should be able to see proposal allocation time unit on the proposal, do we want this test to run in STFC mode

This part is now hidden so we shouldn't need it.

vyshnavi1605 commented 2 years ago

Both Should preserve the selected users after pagination are failing, I think this is due to the fact that at the beginning of the test it creates 5 or 10 users and then searches them based on emails. However, the way the responses are set is that it searches the file name with the specific email sent in the parameter. As these emails are generated randomly I'm not sure how to handle that part.

This problem doesn't seem to be causing the tests to fail. The problem seems to be that the user creation at the start of the tests are failing. Still looking into the reason for this.

When logged in as a user officer and open the people table, the dialogue opens and shows this at the bottom: image

However the rows on that page are not 10 and only 6 users are shown. When changing the rows to 5 only 2 users are shown in the dialogue box. Seems to be happening on dev and prod. Not sure why this is happening, is this a problem?