kabanero-io / kabanero-landing

A console application for managing your Kabanero instances. This repo will be archived soon.
Apache License 2.0
4 stars 6 forks source link

Add UI tests for the new digest feature #211

Closed alohr51 closed 4 years ago

alohr51 commented 4 years ago

Feature description

2 tests come to mind so far:

  1. Policy dropdown shows the currently active policy from the CR
  2. A digest notification row appears below the stack in question when a mismatch occurs
    • For mock data:
      1. for the instance mock data will need spec.governancePolicy.policy.activeDigest or spec.governancePolicy.policy.strictDigest for a notification to appear. strictDigest will show the error and activeDigest will show the warning. I don't think there is a way to test both via the UI right now since it requires a change in the CR, but maybe there's a way to mock it.
      2. for the stack mock data you will need to add a digest check key and value of mismatched in one of that stacks under the kabanero stacks array, example:
    {
      "name": "java-microprofile",
      "status": [
        {
          "digest policy": "strictDigest",
          "digest check": "mismatched",
          "version": "0.2.26",
          "image digest": "abc123",
          "kabanero digest": "zyx000",
          "status": "active"
        }
      ]
    }

Feature design or visual mockup

Additional context