aboutsummaryrefslogtreecommitdiff
path: root/tests/e2e/plugin-administration.spec.js
blob: 7a84d68d7ffe85e8f6dcaef7bd3d8ac551d7f325 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { test, expect } from '@playwright/test';

const rootFile = 'tests/e2e/.auth/root.json';

test.describe('Visiting the plugin administration @root @plugins', () => {
    test.use({ storageState: rootFile });

    test('should let us deactivate and re-activate plugins', async ({ page }) => {
        await page.goto('dispatch.php/admin/plugin');
        const tableRow = await page.getByRole('row', { name: /TerminWidget/i });
        const input = await tableRow.locator('input[name*=enabled]');
        const saveButton = await page.getByRole('button', { name: 'Speichern' });

        await input.uncheck();
        await saveButton.click();
        await expect(page.getByText('Plugin "TerminWidget" wurde deaktiviert')).toBeVisible();

        await input.check();
        await saveButton.click();
        await expect(page.getByText('Plugin "TerminWidget" wurde aktiviert')).toBeVisible();
    });
});