The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/e2e/plugin-e2e/plugin-e2e-api-tests/as-viewer-user/permissions.spec.ts

15 lines
646 B

import { expect, test } from '@grafana/plugin-e2e';
test('should redirect to start page when permissions to navigate to page is missing', async ({ page }) => {
await page.goto('/');
const homePageTitle = await page.title();
await page.goto('/datasources', { waitUntil: 'networkidle' });
expect(await page.title()).toEqual(homePageTitle);
});
test('current user should have viewer role', async ({ page, request }) => {
await page.goto('/');
const response = await request.get('/api/user/orgs');
await expect(response).toBeOK();
await expect(await response.json()).toContainEqual(expect.objectContaining({ role: 'Viewer' }));
});