Network - DNS(AdGuard) : iframe test completed
This commit is contained in:
parent
16f3a509ca
commit
49a47cce0f
1 changed files with 50 additions and 0 deletions
50
tests/network/dns-adguard.spec.js
Normal file
50
tests/network/dns-adguard.spec.js
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
import { test, expect } from '@playwright/test';
|
||||||
|
|
||||||
|
test.describe('Network & Services - Network - LAN', () => {
|
||||||
|
test.beforeEach(async ({ page }) => {
|
||||||
|
await page.goto('/network/dns', { waitUntil: 'networkidle' });
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Title', async ({ page }) => {
|
||||||
|
expect(await page.title()).toBe('Difuse - Services - DNS (AdGuard)');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Heading', async ({ page }) => {
|
||||||
|
const heading = await page.$("p:has-text('DNS (AdGuard)')");
|
||||||
|
expect(heading).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Check visibility of iframe', async ({ page }) => {
|
||||||
|
await page.waitForSelector('#ipfsFrame');
|
||||||
|
const iframe = await page.$('#ipfsFrame');
|
||||||
|
const Visible = await iframe.isVisible();
|
||||||
|
expect(Visible).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Custom Adguard Settings', async ({ page }) => {
|
||||||
|
const label = await page.$("p:has-text('Custom Adguard Settings')");
|
||||||
|
expect(label).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Automatic MAC to IP Conversion', async ({ page }) => {
|
||||||
|
const label = await page.$('#custom-settings label:has-text("Automatic MAC to IP Conversion")');
|
||||||
|
expect(label).toBeTruthy();
|
||||||
|
|
||||||
|
const switchField = await page.locator('.mac-to-ip');
|
||||||
|
expect(switchField).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('DNS64', async ({ page }) => {
|
||||||
|
const label = await page.$('#custom-settings label:has-text("DNS64")');
|
||||||
|
expect(label).toBeTruthy();
|
||||||
|
|
||||||
|
const switchField = await page.locator('.dns64');
|
||||||
|
expect(switchField).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Save Button', async ({ page }) => {
|
||||||
|
const button = page.locator('button.button.green:has-text("Save")');
|
||||||
|
expect(button).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in a new issue