**What this PR does**: Adds our first UI integration test using [Playwright](https://playwright.dev/) and runs the test on CI. Right now the test: - logs into Grafana - configures the plugin (if it isn't already) - creates an OnCall schedule, where the current user will be OnCall - creates an escalation chain to notify based on the newly created OnCall schedule - creates a webhook integration, attached to the created escalation chain - sends a demo alert for the new integration - goes to the alert groups page and validates that the escalation step to alert the OnCall user actually happened Currently the Playwright tests are run against the 3 default headless browsers, chromium, Firefox, and webkit. The CI job that runs these tests is run as a matrix against 3 tagged versions of `grafana`; `main`, `latest`, and `9.2.6`. Secondly, it adds most of the logic for a second test which: - logs into Grafana - configures the plugin (if it isn't already) - goes to the user's settings, verifies their phone number (using a tool called [MailSlurp](https://www.mailslurp.com/)) - configures the current user's default escalation policy to send alerts via SMS - creates an escalation policy and configures it to send alerts to our current user - creates an integration and assigns the created escalation policy - triggers a test alert + verifies that we receive the SMS alert text (again, using MailSlurp) **Which issue(s) this PR fixes**: Closes #873 **Checklist** - [x] Tests updated - [ ] Documentation added (N/A) - [ ] `CHANGELOG.md` updated (N/A)
19 lines
833 B
YAML
19 lines
833 B
YAML
kind: Cluster
|
|
apiVersion: kind.x-k8s.io/v1alpha4
|
|
nodes:
|
|
- role: control-plane
|
|
extraPortMappings:
|
|
- containerPort: 30001
|
|
hostPort: 30001
|
|
- containerPort: 30002
|
|
hostPort: 30002
|
|
# https://stackoverflow.com/a/62695918
|
|
extraMounts:
|
|
# this basically mounts our local ./grafana-plugin (frontend) directory into the kind node
|
|
# so that we can later use a volumeMount to mount from the kind-control-plane Docker container -> grafana
|
|
# k8s pod. This will allow us to mount the current frontend source code
|
|
#
|
|
# NOTE: this is a bit hacky and implies that kind create is run from the root of the project
|
|
# but for now it works... alternative would be to use something like $(pwd)/grafana-plugin
|
|
- hostPath: ./grafana-plugin
|
|
containerPath: /oncall-plugin
|