Network-Analyzer: added test for Traffic monitor heading

This commit is contained in:
Ajas 2024-06-03 20:04:57 +05:30
parent 1038dfd9e7
commit f2dab2e83e

View file

@ -15,6 +15,10 @@ test.describe('General - Dashboard - Network Analyzer - Traffic Monitor', () =>
); );
}); });
test('Traffic Monitor', async ({ page }) => {
expect(await page.$('header:has-text("Traffic Monitor")')).toBeTruthy();
});
test('Traffic Distribution Top Cards', async ({ page }) => { test('Traffic Distribution Top Cards', async ({ page }) => {
const hosts = await page.getByRole('heading', { name: 'Hosts' }); const hosts = await page.getByRole('heading', { name: 'Hosts' });
const hostsIcon = await page.locator('.mdi-server-network'); const hostsIcon = await page.locator('.mdi-server-network');
@ -50,17 +54,17 @@ test.describe('General - Dashboard - Network Analyzer - Traffic Monitor', () =>
}); });
test('Traffic', async ({ page }) => { test('Traffic', async ({ page }) => {
expect(await page.$('header:has-text("Traffic")')).toBeTruthy(); expect(await page.$('p:has-text("Traffic")')).toBeTruthy();
expect(await page.isVisible('#chart-1')); expect(await page.isVisible('#chart-1'));
}); });
test('Connections', async ({ page }) => { test('Connections', async ({ page }) => {
expect(await page.$('header:has-text("Connections")')).toBeTruthy(); expect(await page.$('p:has-text("Connections")')).toBeTruthy();
expect(await page.isVisible('#chart-2')); expect(await page.isVisible('#chart-2'));
}); });
test('Traffic Distribution', async ({ page }) => { test('Traffic Distribution', async ({ page }) => {
expect(await page.$('header:has-text("Traffic Distribution")')).toBeTruthy(); expect(await page.$('p:has-text("Traffic Distribution")')).toBeTruthy();
}); });
}); });
@ -73,17 +77,17 @@ test.describe('General - Dashboard - Network Analyzer - Traffic Monitor', () =>
await page.click('#app-tab-bwm'); await page.click('#app-tab-bwm');
}); });
test('Download / Application', async ({ page }) => { test('Download / Application', async ({ page }) => {
expect(await page.$('header:has-text("Download / Application")')).toBeTruthy(); expect(await page.$('p:has-text("Download / Application")')).toBeTruthy();
expect(await page.isVisible('#chart-3')); expect(await page.isVisible('#chart-3'));
}); });
test('Upload / Application', async ({ page }) => { test('Upload / Application', async ({ page }) => {
expect(await page.$('header:has-text("Upload / Application")')).toBeTruthy(); expect(await page.$('p:has-text("Upload / Application")')).toBeTruthy();
expect(await page.isVisible('#chart-4')); expect(await page.isVisible('#chart-4'));
}); });
test('Application Protocol', async ({ page }) => { test('Application Protocol', async ({ page }) => {
expect(await page.$('header:has-text("Application Protocol")')).toBeTruthy(); expect(await page.$('p:has-text("Application Protocol")')).toBeTruthy();
}); });
}); });
@ -97,17 +101,17 @@ test.describe('General - Dashboard - Network Analyzer - Traffic Monitor', () =>
}); });
test('IPv4 vs. IPv6', async ({ page }) => { test('IPv4 vs. IPv6', async ({ page }) => {
expect(await page.$('header:has-text("IPv4 vs. IPv6")')).toBeTruthy(); expect(await page.$('p:has-text("IPv4 vs. IPv6")')).toBeTruthy();
expect(await page.isVisible('#chart-5')); expect(await page.isVisible('#chart-5'));
}); });
test('Dualstack Distribution', async ({ page }) => { test('Dualstack Distribution', async ({ page }) => {
expect(await page.$('header:has-text("Dualstack Distribution")')).toBeTruthy(); expect(await page.$('p:has-text("Dualstack Distribution")')).toBeTruthy();
expect(await page.isVisible('#chart-6')); expect(await page.isVisible('#chart-6'));
}); });
test('Usage by Host', async ({ page }) => { test('Usage by Host', async ({ page }) => {
expect(await page.$('header:has-text("Usage by Host")')).toBeTruthy(); expect(await page.$('p:has-text("Usage by Host")')).toBeTruthy();
}); });
}); });