UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit 39950191 authored by Michael Martin's avatar Michael Martin Committed by Robert Massey
Browse files

cypress fixes for latest grafana

parent 0d733a6e
No related branches found
No related tags found
1 merge request!51cypress fixes for latest grafana
# Changelog
Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [2.21.6-bb.1] - 2024-01-25
### Changed
- Changed cypress tests to work with version of Grafana
## [2.16.0-bb.6] - 2024-01-16
### Changed
- Updated upstream chart reference from `2.16.0` to `2.21.6`
......
# kyverno-reporter
![Version: 2.21.6-bb.0](https://img.shields.io/badge/Version-2.21.6--bb.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.17.5](https://img.shields.io/badge/AppVersion-2.17.5-informational?style=flat-square)
![Version: 2.21.6-bb.1](https://img.shields.io/badge/Version-2.21.6--bb.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.17.5](https://img.shields.io/badge/AppVersion-2.17.5-informational?style=flat-square)
Policy Reporter watches for PolicyReport Resources.
It creates Prometheus Metrics and can send rule validation events to different targets like Loki, Elasticsearch, Slack or Discord
......
......@@ -5,7 +5,7 @@ description: |
It creates Prometheus Metrics and can send rule validation events to different targets like Loki, Elasticsearch, Slack or Discord
type: application
version: 2.21.6-bb.0
version: 2.21.6-bb.1
appVersion: 2.17.5
icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png
......
describe('Prometheus Targets', {
// Wait up to 2 minutes (4 sec x 30 attempts) for target to be shown before failing
// Wait up to 2 minutes (12 sec x 10 attempts) for target to be shown before failing
retries: {
runMode: 29,
runMode: 9,
}
}, () => {
it('Validate metrics are scraped', () => {
cy.visit(`${Cypress.env('prometheus_url')}/targets`)
cy.get(`button:contains("serviceMonitor/${Cypress.env('reporter_ns')}")`)
.click({force: true})
cy.get(`a[href*="serviceMonitor/${Cypress.env('reporter_ns')}"]`)
.should('be.visible')
.and('contain', '(1/1 up)')
})
})
\ No newline at end of file
// Loads a dashboard and validates title
Cypress.Commands.add('loaddashboard', (name) => {
cy.intercept('POST', '**/query*').as('apiQuery')
cy.get('[data-testid*="Dashboard search item ' + name + '"]')
.click()
cy.get('input[placeholder="Search for dashboards and folders"]').type(name)
cy.get('a[title="' + name + '"]').click()
cy.wait('@apiQuery', {timeout: 30000}).then((interception) => {
expect(interception.response.statusCode).to.equal(200);
})
......@@ -30,12 +30,6 @@ before (function() {
// Save cookies so we don't have to log in again
beforeEach(function () {
cy.visit(`${Cypress.env('grafana_url')}/dashboards`)
cy.get('button[id^="collapse-button-"]').invoke('attr', 'aria-expanded').then(($expanded) => {
if ($expanded === 'false') {
cy.get('button[id^="collapse-button-"]').click({multiple: true})
}
})
})
describe('Validate Grafana Dashboards', {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment