network - DHCP : General Settings test Done
This commit is contained in:
parent
49a47cce0f
commit
c690199f69
1 changed files with 53 additions and 0 deletions
53
tests/network/dhcp.spec.js
Normal file
53
tests/network/dhcp.spec.js
Normal file
|
@ -0,0 +1,53 @@
|
|||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test.describe('Network & Services - Network - DHCP', () => {
|
||||
test.describe('General Settings', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto('/network/dhcp', { waitUntil: 'networkidle' });
|
||||
const generalSettingsTab = await page.locator('#general-tab-dndh');
|
||||
await generalSettingsTab.click();
|
||||
await page.waitForTimeout(3000);
|
||||
});
|
||||
|
||||
test('Title', async ({ page }) => {
|
||||
expect(await page.title()).toBe('Difuse - Network - DHCP');
|
||||
});
|
||||
|
||||
test('Card Header Title', async ({ page }) => {
|
||||
const title = await page.locator('.card-header-title');
|
||||
expect(await title).toBeTruthy();
|
||||
});
|
||||
|
||||
test('Allocate IPs Sequentially', async ({ page }) => {
|
||||
const label = await page.$('#general-form label:has-text("Allocate IPs Sequentially")');
|
||||
expect(label).toBeTruthy();
|
||||
|
||||
const switchField = await page.locator('#general-form .sequential_ip');
|
||||
const switchFieldIsVisible = await switchField.isVisible();
|
||||
expect(switchFieldIsVisible).toBeTruthy();
|
||||
});
|
||||
|
||||
test('Authoritative ', async ({ page }) => {
|
||||
const label = await page.$('#general-form label:has-text("Authoritative")');
|
||||
expect(label).toBeTruthy();
|
||||
|
||||
const switchField = await page.locator('#general-form .authoritative');
|
||||
const switchFieldIsVisible = await switchField.isVisible();
|
||||
expect(switchFieldIsVisible).toBeTruthy();
|
||||
});
|
||||
|
||||
test('Hijack DNS ', async ({ page }) => {
|
||||
const label = await page.$('#general-form label:has-text("Hijack DNS")');
|
||||
expect(label).toBeTruthy();
|
||||
|
||||
const switchField = await page.locator('#general-form .hijackdns');
|
||||
const switchFieldIsVisible = await switchField.isVisible();
|
||||
expect(switchFieldIsVisible).toBeTruthy();
|
||||
});
|
||||
|
||||
test('Save Button', async ({ page }) => {
|
||||
const button = page.locator('#general-form button.button.green:has-text("Save")');
|
||||
expect(button).toBeTruthy();
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue