Network - DHCP : TFTP server tab partially completed
This commit is contained in:
parent
99bca667e2
commit
649b9d8fd2
1 changed files with 95 additions and 2 deletions
|
@ -56,8 +56,8 @@ test.describe('Network & Services - Network - DHCP', () => {
|
||||||
test.beforeEach(async ({ page }) => {
|
test.beforeEach(async ({ page }) => {
|
||||||
await page.goto('/network/dhcp', { waitUntil: 'networkidle' });
|
await page.goto('/network/dhcp', { waitUntil: 'networkidle' });
|
||||||
await page.waitForSelector('#static-tab-dndh');
|
await page.waitForSelector('#static-tab-dndh');
|
||||||
const generalSettingsTab = await page.locator('#static-tab-dndh');
|
const staticLeasesTab = await page.locator('#static-tab-dndh');
|
||||||
await generalSettingsTab.click();
|
await staticLeasesTab.click();
|
||||||
await page.waitForTimeout(3000);
|
await page.waitForTimeout(3000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -136,4 +136,97 @@ test.describe('Network & Services - Network - DHCP', () => {
|
||||||
expect(tableIsVisible).toBe(true);
|
expect(tableIsVisible).toBe(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test.describe('TFTP Server Tab', () => {
|
||||||
|
test.beforeEach(async ({ page }) => {
|
||||||
|
await page.goto('/network/dhcp', { waitUntil: 'networkidle' });
|
||||||
|
await page.waitForSelector('#pxetftp-tab-dndh');
|
||||||
|
const tftpServerTab = await page.locator('#pxetftp-tab-dndh');
|
||||||
|
await tftpServerTab.click();
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('TFTP Server', async ({ page }) => {
|
||||||
|
const label = await page.$('#content-pxetftp label:has-text("TFTP Server")');
|
||||||
|
expect(label).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('TFTP Server Root Input Field', async ({ page }) => {
|
||||||
|
const label = await page.$('#content-pxetftp label:has-text("TFTP Server Root")');
|
||||||
|
expect(label).toBeTruthy();
|
||||||
|
|
||||||
|
const inputField = await page.locator('#tftp-root');
|
||||||
|
const inputFieldIsVisible = await inputField.isVisible();
|
||||||
|
expect(inputFieldIsVisible).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Network Boot Image', async ({ page }) => {
|
||||||
|
const label = await page.$('#content-pxetftp label:has-text("Network Boot Image")');
|
||||||
|
expect(label).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Network Boot Image Input Field', async ({ page }) => {
|
||||||
|
const label = await page.$('#content-pxetftp label:has-text("Network Boot Image")');
|
||||||
|
expect(label).toBeTruthy();
|
||||||
|
|
||||||
|
const inputField = await page.locator('#tftp-boot-image');
|
||||||
|
const inputFieldIsVisible = await inputField.isVisible();
|
||||||
|
expect(inputFieldIsVisible).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Save Button', async ({ page }) => {
|
||||||
|
const button = page.locator('#content-pxetftp button.button.green:has-text("Save")');
|
||||||
|
expect(button).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('check Add New PXE Boot Option visible', async ({ page }) => {
|
||||||
|
await page.waitForSelector('#newPxeOption');
|
||||||
|
const addButton = await page.locator('#newPxeOption');
|
||||||
|
await addButton.click();
|
||||||
|
|
||||||
|
await page.waitForSelector('#newPxe');
|
||||||
|
const section = await page.locator('#newPxe');
|
||||||
|
const isSectionVisible = await section.isVisible();
|
||||||
|
expect(isSectionVisible).toBe(true);
|
||||||
|
|
||||||
|
const label = await page.$('#content-pxetftp p:has-text("New PXE Boot Option")');
|
||||||
|
expect(label).toBeTruthy();
|
||||||
|
|
||||||
|
const fileName = await page.$('#content-pxetftp p:has-text("Filename")');
|
||||||
|
expect(fileName).toBeTruthy();
|
||||||
|
const fileNameInputField = await page.locator('#pxe-filename');
|
||||||
|
const fileNameInputFieldIsVisible = await fileNameInputField.isVisible();
|
||||||
|
expect(fileNameInputFieldIsVisible).toBeTruthy();
|
||||||
|
|
||||||
|
const serverName = await page.$('#content-pxetftp p:has-text("Server Name")');
|
||||||
|
expect(serverName).toBeTruthy();
|
||||||
|
const serverNameInputField = await page.locator('#pxe-server-name');
|
||||||
|
const serverNameInputFieldIsVisible = await serverNameInputField.isVisible();
|
||||||
|
expect(serverNameInputFieldIsVisible).toBeTruthy();
|
||||||
|
|
||||||
|
const serverAddress = await page.$('#content-pxetftp p:has-text("Server Address")');
|
||||||
|
expect(serverAddress).toBeTruthy();
|
||||||
|
const serverAddressInputField = await page.locator('#pxe-server-address');
|
||||||
|
const serverAddressInputFieldIsVisible = await serverAddressInputField.isVisible();
|
||||||
|
expect(serverAddressInputFieldIsVisible).toBeTruthy();
|
||||||
|
|
||||||
|
const dhcpOptions = await page.$('#content-pxetftp p:has-text("DHCP Options")');
|
||||||
|
expect(dhcpOptions).toBeTruthy();
|
||||||
|
const dhcpOptionsInputField = await page.locator('#pxe-dhcp-options');
|
||||||
|
const dhcpOptionsInputFieldIsVisible = await dhcpOptionsInputField.isVisible();
|
||||||
|
expect(dhcpOptionsInputFieldIsVisible).toBeTruthy();
|
||||||
|
|
||||||
|
const ForceDhcpOptions = await page.$('#content-pxetftp p:has-text("Force DHCP Options ")');
|
||||||
|
expect(ForceDhcpOptions).toBeTruthy();
|
||||||
|
const ForceDhcpOptionsToggle = await page.locator('#newPxe .pxe-force');
|
||||||
|
const ForceDhcpOptionsToggleIsVisible = await ForceDhcpOptionsToggle.isVisible();
|
||||||
|
expect(ForceDhcpOptionsToggleIsVisible).toBeTruthy();
|
||||||
|
|
||||||
|
const saveButton = page.locator('#newPxe button.button.green:has-text("Save")');
|
||||||
|
expect(saveButton).toBeTruthy();
|
||||||
|
|
||||||
|
const discardButton = page.locator('#discardPxeOption');
|
||||||
|
expect(discardButton).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue