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.
 
 
 
 
 

19 lines
778 B

import { test, expect } from './fixtures';
test('should be possible to save app configuration', async ({ appConfigPage, page }) => {
const saveButton = page.getByRole('button', { name: /Save API settings/i });
// reset the configured secret
await page.getByRole('button', { name: /reset/i }).click();
// enter some valid values
await page.getByRole('textbox', { name: 'API Key' }).fill('secret-api-key');
await page.getByRole('textbox', { name: 'API Url' }).clear();
await page.getByRole('textbox', { name: 'API Url' }).fill('http://www.my-awsome-grafana-app.com/api');
// listen for the server response on the saved form
const saveResponse = appConfigPage.waitForSettingsResponse();
await saveButton.click();
await expect(saveResponse).toBeOK();
});