bito-code-review[bot] commented on code in PR #44856:
URL: https://github.com/apache/superset/pull/44856#discussion_r4152026983
##########
superset-frontend/playwright/tests/mobile/mobile-dashboard.spec.ts:
##########
@@ -35,25 +35,10 @@ import { URL } from '../../utils/urls';
// Use iPhone 12 viewport for mobile tests
const mobileViewport = devices['iPhone 12'];
-/**
- * Navigates to the dashboard list, clicks the first available dashboard
- * card, and waits for navigation into that dashboard. Skips the current
- * test when no dashboards are available to open.
- */
-async function openFirstDashboard(page: Page): Promise<void> {
- await page.goto(URL.DASHBOARD_LIST);
+/** Opens the sample dashboard with charts, independently of dashboard list
order. */
+async function openExampleDashboard(page: Page): Promise<void> {
+ await page.goto('dashboard/world_health/');
Review Comment:
<!-- Bito Reply -->
The suggestion from the reviewer is appropriate. It correctly identifies
that `openExampleDashboard` lacks an existence check for the `world_health`
dashboard, which could lead to a 404 error if the dashboard is missing, whereas
the previous implementation included a skip mechanism. Applying this suggestion
improves the test suite's robustness by ensuring it skips gracefully instead of
failing when the expected dashboard is absent.
**superset-frontend/playwright/tests/mobile/mobile-dashboard.spec.ts**
```
async function openExampleDashboard(page: Page): Promise<void> {
// Add existence check here
await page.goto('dashboard/world_health/');
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]