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(); });