From f2dab2e83e6170af29f8d58d4bb42935197ca887 Mon Sep 17 00:00:00 2001 From: Ajas Date: Mon, 3 Jun 2024 20:04:57 +0530 Subject: [PATCH] Network-Analyzer: added test for Traffic monitor heading --- .../network-analyzer/traffic-monitor.spec.js | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tests/dashboards/network-analyzer/traffic-monitor.spec.js b/tests/dashboards/network-analyzer/traffic-monitor.spec.js index 2160b51..460d8dc 100644 --- a/tests/dashboards/network-analyzer/traffic-monitor.spec.js +++ b/tests/dashboards/network-analyzer/traffic-monitor.spec.js @@ -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 }) => { const hosts = await page.getByRole('heading', { name: 'Hosts' }); const hostsIcon = await page.locator('.mdi-server-network'); @@ -50,17 +54,17 @@ test.describe('General - Dashboard - Network Analyzer - Traffic Monitor', () => }); 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')); }); 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')); }); 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'); }); 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')); }); 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')); }); 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 }) => { - 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')); }); 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')); }); 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(); }); });