bito-code-review[bot] commented on code in PR #41636:
URL: https://github.com/apache/superset/pull/41636#discussion_r3562093537


##########
superset-frontend/playwright/tests/home/welcome.spec.ts:
##########
@@ -0,0 +1,36 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { test, expect } from '@playwright/test';
+import { URL } from '../../utils/urls';
+import { TIMEOUT } from '../../utils/constants';
+
+// Smoke test guarding against a blank Home/welcome landing page (e.g. a shell
+// or route-layout regression that renders only the top navigation). The auth
+// suite only waits for the welcome URL + session cookie, so it would not catch
+// a welcome page that redirects correctly but renders no content.
+test('welcome page renders its content, not just the nav', async ({ page }) => 
{
+  await page.goto(`/${URL.WELCOME}`);
+
+  // "Recents" is a Home content section header (a Collapse panel) that does 
not
+  // exist in the top navigation, so its presence proves the route content
+  // rendered — not just the app shell.
+  await expect(page.getByText('Recents', { exact: true })).toBeVisible({

Review Comment:
   <!-- Bito Reply -->
   The suggestion to use the translation mechanism is appropriate for 
maintaining consistency with the application's i18n strategy. While the current 
test suite may use hardcoded strings, adopting the translation mechanism 
ensures the test remains robust across different locales and aligns with best 
practices for internationalized applications.
   
   **superset-frontend/playwright/tests/home/welcome.spec.ts**
   ```
   // "Recents" is a Home content section header (a Collapse panel) that does 
not
     // exist in the top navigation, so its presence proves the route content
     // rendered — not just the app shell.
     await expect(page.getByText('Recents', { exact: true })).toBeVisible({
   ```



-- 
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]

Reply via email to