Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Cannot delete tests older than 21 days - DE: Tests die älter als 21 Tage sind, können nicht gelöscht werden (EXPOSUREAPP-2398) #1586

Merged
merged 12 commits into from Nov 16, 2020

Conversation

kolyaopahle
Copy link
Contributor

@kolyaopahle kolyaopahle commented Nov 12, 2020

Description

The original pr #1481 did not fix the actual issue people were having in production.

This PR implements a refactoring of the whole state handling process for test result fetching and should hopefully get rid of the actual underlying issue.

Please make sure to test the risk status fetching behaviour thouroughly, especially on the homescreen. Using the cwa server emulator should help in the process. Also check behaviour with varying network connectivity states

Steps to reproduce

With Emulator:

  1. Setup CWA Server emulation
  2. Try to scan a qr code
  3. Try refetching the testresult in many places and with different results (note that all test results other than pending require a relaunch of the app to be refetched)

To test the specific 21 days failure case you need to do the following:

  1. Setup CWA Server emulation
  2. Scan a qr code
  3. set status as pending in server emulator
  4. return to homescreen
  5. set status as 400 error in server emulator
  6. check if fetching or error card appears on homescreen

Without emulator

  1. Get QR codes for your testing environment from Sharepoint
  2. Scan the qr codes and test if test behaviour is consistent

…tworkRequestWrapper that is able to represent multiple states. This allows for better request state handling throughout the app

2. Completely removed the SubmissionViewModel
3. Failure to fetch the test should now always display the invalid test card on the home screen

Signed-off-by: Kolya Opahle <k.opahle@sap.com>
…ot indicate any problems with the test itself

Signed-off-by: Kolya Opahle <k.opahle@sap.com>
…ew card)

Signed-off-by: Kolya Opahle <k.opahle@sap.com>
@kolyaopahle kolyaopahle added backend Issues related to internal work not directly correlated to UI interaction maintainers Tag pull requests created by maintainers prio PRs to review first. labels Nov 12, 2020
@kolyaopahle kolyaopahle added this to the 1.7.0 milestone Nov 12, 2020
@kolyaopahle kolyaopahle requested a review from a team November 12, 2020 14:59
Copy link
Contributor

@chris-cwa chris-cwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ran it without emulator. worked fine.

@BMItr BMItr self-assigned this Nov 16, 2020
@harambasicluka harambasicluka self-assigned this Nov 16, 2020
@harambasicluka
Copy link
Contributor

harambasicluka commented Nov 16, 2020

Tested it together with #1600, worked as expected.

@BMItr
Copy link
Contributor

BMItr commented Nov 16, 2020

code lgtm. running device tests with different fetches.. will come back later

@sonarcloud
Copy link

sonarcloud bot commented Nov 16, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

66.3% 66.3% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@BMItr BMItr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me. Local Tests passed.
Tested various conditions on emulated QRs on WRU-XD
Default Test: local tests passed,
pending QR: passed
invalid QR: passed
negativ QR: passed
positiv QR: passed

UI updates accordingly.
Note: I will contact you on one smaller issue.
Approved.

@harambasicluka harambasicluka merged commit df7a5fb into release/1.7.x Nov 16, 2020
@harambasicluka harambasicluka deleted the fix/2398-21days-fix-attempt-two branch November 16, 2020 17:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backend Issues related to internal work not directly correlated to UI interaction maintainers Tag pull requests created by maintainers prio PRs to review first.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants