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