// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`formatExpandablePolicies should correctly format 1`] = `
Array [
  Object {
    "__typename": "Compliance",
    "clusterCompliant": "0/2",
    "metadata": Object {
      "__typename": "Metadata",
      "annotations": Object {
        "policy.open-cluster-management.io/categories": "SystemAndCommunicationsProtections",
        "policy.open-cluster-management.io/controls": "VA",
        "policy.open-cluster-management.io/standards": "BSA",
        "seed-generation": "1",
      },
      "name": "my-policy-test",
      "namespace": "calamari",
      "resourceVersion": "1524346",
      "selfLink": "/apis/policy.open-cluster-management.io/v1/namespaces/calamari/policies/my-policy-test",
    },
    "name": "my-policy-test",
    "namespace": "calamari",
    "placementBindings": Array [
      Object {
        "__typename": "PlacementBinding",
        "metadata": Object {
          "__typename": "Metadata",
          "name": "binding-my-policy-test",
          "selfLink": "/apis/policy.open-cluster-management.io/v1/namespaces/calamari/placementbindings/binding-my-policy-test",
        },
      },
    ],
    "placementPolicies": Array [
      Object {
        "__typename": "PlacementPolicy",
        "metadata": Object {
          "__typename": "Metadata",
          "name": "placement-my-policy-test",
          "selfLink": "/apis/policy.open-cluster-management.io/v1/namespaces/calamari/placementpolicies/placement-my-policy-test",
        },
      },
    ],
    "policyCompliant": "0/2",
    "raw": Object {
      "apiVersion": "policy.open-cluster-management.io/v1",
      "kind": "Policy",
      "metadata": Object {
        "annotations": Object {
          "policy.open-cluster-management.io/categories": "SystemAndCommunicationsProtections",
          "policy.open-cluster-management.io/controls": "VA",
          "policy.open-cluster-management.io/standards": "BSA",
          "seed-generation": "1",
        },
        "creationTimestamp": "2019-07-23T21:12:04Z",
        "finalizers": Array [
          "propagator.finalizer.calamari.ibm.com",
        ],
        "generation": 7,
        "name": "my-policy-test",
        "namespace": "calamari",
        "resourceVersion": "1524346",
        "selfLink": "/apis/policy.open-cluster-management.io/v1/namespaces/calamari/policies/my-policy-test",
        "uid": "85840587-ad8e-11e9-8a41-005056a061f1",
      },
      "spec": Object {
        "-templates": Array [
          Object {
            "Definition": Object {
              "apiVersion": "v1",
              "kind": "Pod",
              "metadata": Object {
                "name": "nginx-pod",
              },
              "spec": Object {
                "containers": Array [
                  Object {
                    "image": "nginx:1.7.9",
                    "name": "nginx",
                    "ports": Array [
                      Object {
                        "containerPort": 80,
                      },
                    ],
                  },
                ],
              },
            },
            "complianceType": "musthave",
            "status": Object {
              "Validity": Object {},
            },
          },
        ],
        "complianceType": "musthave",
        "namespaces": Object {
          "exclude": Array [
            "kube-*",
          ],
          "include": Array [
            "default",
          ],
        },
        "policy-templates": Array [
          Object {
            "Definition": Object {
              "apiVersion": "policies.ibm.com/v1alpha1",
              "kind": "MutationPolicy",
              "metadata": Object {
                "label": Object {
                  "category": "System-Integrity",
                },
                "name": "mutation-policy-example",
              },
              "spec": Object {
                "conditions": Object {
                  "ownership": Array [
                    "ReplicaSet",
                    "Deployment",
                    "DeamonSet",
                    "ReplicationController",
                  ],
                },
                "namespaceSelector": Object {
                  "exclude": Array [
                    "kube-system",
                  ],
                  "include": Array [
                    "default",
                    "kube-*",
                  ],
                },
                "remediationAction": "enforce",
              },
            },
            "status": Object {
              "Validity": Object {},
            },
          },
        ],
        "remediationAction": "enforce",
      },
      "status": Object {
        "placement": Array [
          Object {
            "placementBinding": "binding-my-policy-test",
            "placementRule": "placement-my-policy-test",
          },
        ],
        "status": Object {
          "cluster1": Object {
            "aggregatePoliciesStatus": Object {
              "my-policy-test": Object {
                "compliant": "Compliant",
              },
            },
            "clustername": "cluster1",
            "compliant": "Compliant",
          },
          "clusterhub": Object {
            "aggregatePoliciesStatus": Object {
              "my-policy-test": Object {
                "compliant": "Compliant",
              },
            },
            "clustername": "clusterhub",
            "compliant": "Compliant",
          },
        },
      },
    },
    "remediation": "enforce",
    "subItems": Array [
      Object {
        "items": Array [
          "binding-my-policy-test",
        ],
        "name": "policy.pb",
      },
      Object {
        "items": Array [
          "placement-my-policy-test",
        ],
        "name": "policy.pp",
      },
    ],
  },
  Object {
    "__typename": "Compliance",
    "clusterCompliant": "1/2",
    "metadata": Object {
      "__typename": "Metadata",
      "annotations": Object {
        "kubectl.kubernetes.io/last-applied-configuration": "{\\"apiVersion\\":\\"policy.open-cluster-management.io/v1\\",\\"kind\\":\\"Policy\\",\\"metadata\\":{\\"annotations\\":{\\"policy.open-cluster-management.io/categories\\":\\"SystemAndInformationIntegrity\\",\\"policy.open-cluster-management.io/controls\\":\\"MutationAdvisor\\",\\"policy.open-cluster-management.io/standards\\":\\"NIST\\"},\\"name\\":\\"policy-ma\\",\\"namespace\\":\\"calamari\\"},\\"spec\\":{\\"policy-templates\\":[{\\"Definition\\":{\\"apiVersion\\":\\"policies.ibm.com/v1alpha1\\",\\"kind\\":\\"MutationPolicy\\",\\"metadata\\":{\\"label\\":{\\"category\\":\\"System-Integrity\\"},\\"name\\":\\"mutation-policy-example\\"},\\"spec\\":{\\"conditions\\":{\\"ownership\\":[\\"ReplicaSet\\",\\"Deployment\\",\\"DeamonSet\\",\\"ReplicationController\\"]},\\"namespaceSelector\\":{\\"exclude\\":[\\"kube-system\\"],\\"include\\":[\\"default\\",\\"kube-*\\"]},\\"remediationAction\\":\\"enforce\\"}}}],\\"remediationAction\\":\\"enforce\\"}}
",
        "policy.open-cluster-management.io/categories": "SystemAndInformationIntegrity",
        "policy.open-cluster-management.io/controls": "MutationAdvisor",
        "policy.open-cluster-management.io/standards": "NIST",
        "seed-generation": "1",
      },
      "name": "policy-ma",
      "namespace": "calamari",
      "resourceVersion": "1347579",
      "selfLink": "/apis/policy.open-cluster-management.io/v1/namespaces/calamari/policies/policy-ma",
    },
    "name": "policy-ma",
    "namespace": "calamari",
    "placementBindings": Array [
      Object {
        "__typename": "PlacementBinding",
        "metadata": Object {
          "__typename": "Metadata",
          "name": "binding-ma",
          "selfLink": "/apis/policy.open-cluster-management.io/v1/namespaces/calamari/placementbindings/binding-ma",
        },
      },
    ],
    "placementPolicies": Array [
      Object {
        "__typename": "PlacementPolicy",
        "metadata": Object {
          "__typename": "Metadata",
          "name": "placement-ma",
          "selfLink": "/apis/policy.open-cluster-management.io/v1/namespaces/calamari/placementpolicies/placement-ma",
        },
      },
    ],
    "policyCompliant": "1/2",
    "raw": Object {
      "apiVersion": "policy.open-cluster-management.io/v1",
      "kind": "Policy",
      "metadata": Object {
        "annotations": Object {
          "kubectl.kubernetes.io/last-applied-configuration": "{\\"apiVersion\\":\\"policy.open-cluster-management.io/v1\\",\\"kind\\":\\"Policy\\",\\"metadata\\":{\\"annotations\\":{\\"policy.open-cluster-management.io/categories\\":\\"SystemAndInformationIntegrity\\",\\"policy.open-cluster-management.io/controls\\":\\"MutationAdvisor\\",\\"policy.open-cluster-management.io/standards\\":\\"NIST\\"},\\"name\\":\\"policy-ma\\",\\"namespace\\":\\"calamari\\"},\\"spec\\":{\\"policy-templates\\":[{\\"Definition\\":{\\"apiVersion\\":\\"policies.ibm.com/v1alpha1\\",\\"kind\\":\\"MutationPolicy\\",\\"metadata\\":{\\"label\\":{\\"category\\":\\"System-Integrity\\"},\\"name\\":\\"mutation-policy-example\\"},\\"spec\\":{\\"conditions\\":{\\"ownership\\":[\\"ReplicaSet\\",\\"Deployment\\",\\"DeamonSet\\",\\"ReplicationController\\"]},\\"namespaceSelector\\":{\\"exclude\\":[\\"kube-system\\"],\\"include\\":[\\"default\\",\\"kube-*\\"]},\\"remediationAction\\":\\"enforce\\"}}}],\\"remediationAction\\":\\"enforce\\"}}
",
          "policy.open-cluster-management.io/categories": "SystemAndInformationIntegrity",
          "policy.open-cluster-management.io/controls": "MutationAdvisor",
          "policy.open-cluster-management.io/standards": "NIST",
          "seed-generation": "1",
        },
        "creationTimestamp": "2019-07-16T13:18:48Z",
        "finalizers": Array [
          "propagator.finalizer.calamari.ibm.com",
        ],
        "generation": 45,
        "name": "policy-ma",
        "namespace": "calamari",
        "resourceVersion": "1347579",
        "selfLink": "/apis/policy.open-cluster-management.io/v1/namespaces/calamari/policies/policy-ma",
        "uid": "3f218d45-a7cc-11e9-8a41-005056a061f1",
      },
      "spec": Object {
        "namespaces": Object {},
        "policy-templates": Array [
          Object {
            "Definition": Object {
              "apiVersion": "policies.ibm.com/v1alpha1",
              "kind": "MutationPolicy",
              "metadata": Object {
                "label": Object {
                  "category": "System-Integrity",
                },
                "name": "mutation-policy-example",
              },
              "spec": Object {
                "conditions": Object {
                  "ownership": Array [
                    "ReplicaSet",
                    "Deployment",
                    "DeamonSet",
                    "ReplicationController",
                  ],
                },
                "namespaceSelector": Object {
                  "exclude": Array [
                    "kube-system",
                  ],
                  "include": Array [
                    "default",
                    "kube-*",
                  ],
                },
                "remediationAction": "enforce",
              },
            },
            "status": Object {
              "Validity": Object {},
            },
          },
        ],
        "remediationAction": "enforce",
      },
      "status": Object {
        "placement": Array [
          Object {
            "placementBinding": "binding-ma",
            "placementRule": "placement-ma",
          },
        ],
        "status": Object {
          "cluster1": Object {
            "aggregatePoliciesStatus": Object {
              "policy-ma": Object {
                "compliant": "NonCompliant",
              },
            },
            "clustername": "cluster1",
            "compliant": "NonCompliant",
          },
          "clusterhub": Object {
            "aggregatePoliciesStatus": Object {
              "policy-ma": Object {
                "compliant": "Compliant",
              },
            },
            "clustername": "clusterhub",
            "compliant": "Compliant",
          },
        },
      },
    },
    "remediation": "enforce",
    "subItems": Array [
      Object {
        "items": Array [
          "binding-ma",
        ],
        "name": "policy.pb",
      },
      Object {
        "items": Array [
          "placement-ma",
        ],
        "name": "policy.pp",
      },
    ],
  },
  Object {
    "__typename": "Compliance",
    "clusterCompliant": "0/2",
    "metadata": Object {
      "__typename": "Metadata",
      "annotations": Object {
        "policy.open-cluster-management.io/categories": "SystemAndCommunicationsProtections,SystemAndInformationIntegrity",
        "policy.open-cluster-management.io/controls": "MutationAdvisor,CertificateManager",
        "policy.open-cluster-management.io/standards": "NIST,HIPAA",
        "seed-generation": "1",
      },
      "name": "policy-pod",
      "namespace": "calamari",
      "resourceVersion": "1524369",
      "selfLink": "/apis/policy.open-cluster-management.io/v1/namespaces/calamari/policies/policy-pod",
    },
    "name": "policy-pod",
    "namespace": "calamari",
    "placementBindings": Array [
      Object {
        "__typename": "PlacementBinding",
        "metadata": Object {
          "__typename": "Metadata",
          "name": "binding-pod",
          "selfLink": "/apis/policy.open-cluster-management.io/v1/namespaces/calamari/placementbindings/binding-pod",
        },
      },
    ],
    "placementPolicies": Array [
      Object {
        "__typename": "PlacementPolicy",
        "metadata": Object {
          "__typename": "Metadata",
          "name": "placement-pod",
          "selfLink": "/apis/policy.open-cluster-management.io/v1/namespaces/calamari/placementpolicies/placement-pod",
        },
      },
    ],
    "policyCompliant": "0/2",
    "raw": Object {
      "apiVersion": "policy.open-cluster-management.io/v1",
      "kind": "Policy",
      "metadata": Object {
        "annotations": Object {
          "policy.open-cluster-management.io/categories": "SystemAndCommunicationsProtections,SystemAndInformationIntegrity",
          "policy.open-cluster-management.io/controls": "MutationAdvisor,CertificateManager",
          "policy.open-cluster-management.io/standards": "NIST,HIPAA",
          "seed-generation": "1",
        },
        "creationTimestamp": "2019-07-16T13:16:46Z",
        "finalizers": Array [
          "propagator.finalizer.calamari.ibm.com",
        ],
        "generation": 20,
        "name": "policy-pod",
        "namespace": "calamari",
        "resourceVersion": "1524369",
        "selfLink": "/apis/policy.open-cluster-management.io/v1/namespaces/calamari/policies/policy-pod",
        "uid": "f61a25eb-a7cb-11e9-8a41-005056a061f1",
      },
      "spec": Object {
        "-templates": Array [
          Object {
            "Definition": Object {
              "apiVersion": "v1",
              "kind": "Pod",
              "metadata": Object {
                "name": "nginx-pod",
              },
              "spec": Object {
                "containers": Array [
                  Object {
                    "image": "nginx:1.7.9",
                    "name": "nginx",
                    "ports": Array [
                      Object {
                        "containerPort": 80,
                      },
                    ],
                  },
                ],
              },
            },
            "complianceType": "musthave",
            "status": Object {
              "Validity": Object {},
            },
          },
        ],
        "complianceType": "musthave",
        "namespaces": Object {
          "exclude": Array [
            "kube*",
          ],
          "include": Array [
            "default",
          ],
        },
        "remediationAction": "inform",
      },
      "status": Object {
        "placement": Array [
          Object {
            "placementBinding": "binding-pod",
            "placementRule": "placement-pod",
          },
        ],
        "status": Object {
          "cluster1": Object {
            "aggregatePoliciesStatus": Object {
              "policy-pod": Object {
                "compliant": "Compliant",
              },
            },
            "clustername": "cluster1",
            "compliant": "Compliant",
          },
          "clusterhub": Object {
            "aggregatePoliciesStatus": Object {
              "policy-pod": Object {
                "compliant": "Compliant",
              },
            },
            "clustername": "clusterhub",
            "compliant": "Compliant",
          },
        },
      },
    },
    "remediation": "inform",
    "subItems": Array [
      Object {
        "items": Array [
          "binding-pod",
        ],
        "name": "policy.pb",
      },
      Object {
        "items": Array [
          "placement-pod",
        ],
        "name": "policy.pp",
      },
    ],
  },
  Object {
    "__typename": "Compliance",
    "clusterCompliant": "0/2",
    "metadata": Object {
      "__typename": "Metadata",
      "annotations": Object {
        "kubectl.kubernetes.io/last-applied-configuration": "{\\"apiVersion\\":\\"policy.open-cluster-management.io/v1\\",\\"kind\\":\\"Policy\\",\\"metadata\\":{\\"annotations\\":{\\"policy.open-cluster-management.io/categories\\":\\"SystemAndCommunicationsProtections,SystemAndInformationIntegrity\\",\\"policy.open-cluster-management.io/controls\\":\\"MutationAdvisor,VA\\",\\"policy.open-cluster-management.io/standards\\":\\"NIST,HIPAA\\"},\\"name\\":\\"policy-role\\",\\"namespace\\":\\"calamari\\"},\\"spec\\":{\\"namespaces\\":{\\"exclude\\":[\\"kube*\\"],\\"include\\":[\\"default\\"]},\\"remediationAction\\":\\"inform\\",\\"role-templates\\":[{\\"apiVersion\\":\\"roletemplate.calamari.ibm.com/v1alpha1\\",\\"complianceType\\":\\"musthave\\",\\"metadata\\":{\\"name\\":\\"operator-role-policy\\",\\"namespace\\":\\"\\"},\\"rules\\":[{\\"complianceType\\":\\"musthave\\",\\"policyRule\\":{\\"apiGroups\\":[\\"extensions\\",\\"apps\\"],\\"resources\\":[\\"deployments\\"],\\"verbs\\":[\\"get\\",\\"list\\",\\"watch\\",\\"create\\",\\"delete\\",\\"patch\\"]}}],\\"selector\\":{\\"matchLabels\\":{\\"dev\\":\\"true\\"}}}]}}
",
        "policy.open-cluster-management.io/categories": "SystemAndCommunicationsProtections,SystemAndInformationIntegrity",
        "policy.open-cluster-management.io/controls": "MutationAdvisor,VA",
        "policy.open-cluster-management.io/standards": "NIST,HIPAA",
        "seed-generation": "1",
      },
      "name": "policy-role",
      "namespace": "calamari",
      "resourceVersion": "1513562",
      "selfLink": "/apis/policy.open-cluster-management.io/v1/namespaces/calamari/policies/policy-role",
    },
    "name": "policy-role",
    "namespace": "calamari",
    "placementBindings": Array [
      Object {
        "__typename": "PlacementBinding",
        "metadata": Object {
          "__typename": "Metadata",
          "name": "binding-role",
          "selfLink": "/apis/policy.open-cluster-management.io/v1/namespaces/calamari/placementbindings/binding-role",
        },
      },
    ],
    "placementPolicies": Array [
      Object {
        "__typename": "PlacementPolicy",
        "metadata": Object {
          "__typename": "Metadata",
          "name": "placement-role",
          "selfLink": "/apis/policy.open-cluster-management.io/v1/namespaces/calamari/placementpolicies/placement-role",
        },
      },
    ],
    "policyCompliant": "0/2",
    "raw": Object {
      "apiVersion": "policy.open-cluster-management.io/v1",
      "kind": "Policy",
      "metadata": Object {
        "annotations": Object {
          "kubectl.kubernetes.io/last-applied-configuration": "{\\"apiVersion\\":\\"policy.open-cluster-management.io/v1\\",\\"kind\\":\\"Policy\\",\\"metadata\\":{\\"annotations\\":{\\"policy.open-cluster-management.io/categories\\":\\"SystemAndCommunicationsProtections,SystemAndInformationIntegrity\\",\\"policy.open-cluster-management.io/controls\\":\\"MutationAdvisor,VA\\",\\"policy.open-cluster-management.io/standards\\":\\"NIST,HIPAA\\"},\\"name\\":\\"policy-role\\",\\"namespace\\":\\"calamari\\"},\\"spec\\":{\\"namespaces\\":{\\"exclude\\":[\\"kube*\\"],\\"include\\":[\\"default\\"]},\\"remediationAction\\":\\"inform\\",\\"role-templates\\":[{\\"apiVersion\\":\\"roletemplate.calamari.ibm.com/v1alpha1\\",\\"complianceType\\":\\"musthave\\",\\"metadata\\":{\\"name\\":\\"operator-role-policy\\",\\"namespace\\":\\"\\"},\\"rules\\":[{\\"complianceType\\":\\"musthave\\",\\"policyRule\\":{\\"apiGroups\\":[\\"extensions\\",\\"apps\\"],\\"resources\\":[\\"deployments\\"],\\"verbs\\":[\\"get\\",\\"list\\",\\"watch\\",\\"create\\",\\"delete\\",\\"patch\\"]}}],\\"selector\\":{\\"matchLabels\\":{\\"dev\\":\\"true\\"}}}]}}
",
          "policy.open-cluster-management.io/categories": "SystemAndCommunicationsProtections,SystemAndInformationIntegrity",
          "policy.open-cluster-management.io/controls": "MutationAdvisor,VA",
          "policy.open-cluster-management.io/standards": "NIST,HIPAA",
          "seed-generation": "1",
        },
        "creationTimestamp": "2019-07-16T13:19:03Z",
        "finalizers": Array [
          "propagator.finalizer.calamari.ibm.com",
        ],
        "generation": 17,
        "name": "policy-role",
        "namespace": "calamari",
        "resourceVersion": "1513562",
        "selfLink": "/apis/policy.open-cluster-management.io/v1/namespaces/calamari/policies/policy-role",
        "uid": "47dbc091-a7cc-11e9-8a41-005056a061f1",
      },
      "spec": Object {
        "namespaces": Object {
          "exclude": Array [
            "kube*",
          ],
          "include": Array [
            "default",
          ],
        },
        "remediationAction": "inform",
        "role-templates": Array [
          Object {
            "apiVersion": "roletemplate.calamari.ibm.com/v1alpha1",
            "complianceType": "musthave",
            "metadata": Object {
              "creationTimestamp": null,
              "name": "operator-role-policy",
            },
            "rules": Array [
              Object {
                "complianceType": "musthave",
                "policyRule": Object {
                  "apiGroups": Array [
                    "extensions",
                    "apps",
                  ],
                  "resources": Array [
                    "deployments",
                  ],
                  "verbs": Array [
                    "get",
                    "list",
                    "watch",
                    "create",
                    "delete",
                    "patch",
                  ],
                },
              },
            ],
            "selector": Object {
              "matchLabels": Object {
                "dev": "true",
              },
            },
            "status": Object {
              "Validity": Object {},
            },
          },
        ],
      },
      "status": Object {
        "placement": Array [
          Object {
            "placementBinding": "binding-role",
            "placementRule": "placement-role",
          },
        ],
        "status": Object {
          "cluster1": Object {
            "aggregatePoliciesStatus": Object {
              "policy-role": Object {
                "compliant": "Compliant",
              },
            },
            "clustername": "cluster1",
            "compliant": "Compliant",
          },
          "clusterhub": Object {
            "aggregatePoliciesStatus": Object {
              "policy-role": Object {
                "compliant": "Compliant",
              },
            },
            "clustername": "clusterhub",
            "compliant": "Compliant",
          },
        },
      },
    },
    "remediation": "inform",
    "subItems": Array [
      Object {
        "items": Array [
          "binding-role",
        ],
        "name": "policy.pb",
      },
      Object {
        "items": Array [
          "placement-role",
        ],
        "name": "policy.pp",
      },
    ],
  },
]
`;

exports[`formatExpandablePolicies should correctly format 2`] = `Array []`;

exports[`formatExpandablePolicies should correctly format 3`] = `Array []`;

exports[`formatPoliciesToClustersTableData should correctly format 1`] = `Array []`;

exports[`formatPoliciesToClustersTableData should correctly format 2`] = `Array []`;

exports[`formatPoliciesToClustersTableData should correctly format 3`] = `Array []`;

exports[`formatPoliciesToClustersTableData should correctly format 4`] = `Array []`;
