From 46cb4978edaab9a17c84d62a314956fedb3886c3 Mon Sep 17 00:00:00 2001 From: "lalitdeore12@gmail.com" Date: Wed, 12 Mar 2025 00:40:51 +0530 Subject: [PATCH] Fix - selenium script issue and dashbaord page crash issue --- frontend/selenium-test.js | 7 +++++-- frontend/src/views/DashboardViews.jsx | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/selenium-test.js b/frontend/selenium-test.js index d371f4d5..42b6b801 100644 --- a/frontend/selenium-test.js +++ b/frontend/selenium-test.js @@ -23,6 +23,7 @@ console.log('Starting Selenium script for testing pages...'); try { await driver.manage().window().setRect({ width: 1600, height: 1200 }); + await driver.manage().window().maximize() await driver.manage().setTimeouts({ implicit: 15000 }); const frontendURL = process.argv[2]; @@ -85,8 +86,10 @@ console.log('Starting Selenium script for testing pages...'); await driver.wait(until.elementLocated(By.css('#outlined-password-input')), 10000); await driver.findElement(By.css('#outlined-password-input')).sendKeys(PASSWORD); - await driver.wait(until.elementLocated(By.css('#loginButton')), 10000); - await driver.findElement(By.css('#loginButton')).click(); + const loginButton = await driver.findElement(By.css('#loginButton')); + await driver.executeScript("arguments[0].scrollIntoView(true);", loginButton); + await loginButton.click(); + // Ensure signup success by checking URL change diff --git a/frontend/src/views/DashboardViews.jsx b/frontend/src/views/DashboardViews.jsx index 4bf532a6..7905a21a 100644 --- a/frontend/src/views/DashboardViews.jsx +++ b/frontend/src/views/DashboardViews.jsx @@ -8,7 +8,7 @@ import { useNavigate, Link, useParams } from "react-router-dom"; import { ToastContainer, toast } from "react-toastify" import Draggable from "react-draggable"; -// import DashboardBarchart, { LoadStats } from '../components/DashboardBarchart.jsx'; +import DashboardBarchart, { LoadStats } from '../components/DashboardBarchart.jsx'; import { Autocomplete,