msyavuz commented on code in PR #35110:
URL: https://github.com/apache/superset/pull/35110#discussion_r2355813689


##########
superset-frontend/playwright/README.md:
##########
@@ -0,0 +1,218 @@
+<!--
+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.
+-->
+
+# Playwright E2E Tests for Superset
+
+This directory contains Playwright end-to-end tests for Apache Superset, 
designed as a replacement for the existing Cypress tests during the migration 
to Playwright.
+
+## Architecture
+
+```
+playwright/
+├── components/core/     # Reusable UI components
+├── pages/              # Page Object Models  
+├── tests/              # Test files organized by feature
+├── utils/              # Shared constants and utilities
+└── README.md           # This file
+```
+
+## Design Principles
+
+We follow **YAGNI** (You Aren't Gonna Need It), **DRY** (Don't Repeat 
Yourself), and **KISS** (Keep It Simple, Stupid) principles:
+
+- Build only what's needed now
+- Reuse existing patterns and components
+- Keep solutions simple and maintainable
+
+## Component Architecture
+
+### Core Components (`components/core/`)
+
+Reusable UI interaction classes for common elements:
+
+- **Form**: Container with properly scoped child element access
+- **Input**: Supports `fill()`, `type()`, and `pressSequentially()` methods
+- **Button**: Standard click, hover, focus interactions
+
+**Usage Example:**
+```typescript
+import { Form } from '../components/core';
+
+const loginForm = new Form(page, '[data-test="login-form"]');
+const usernameInput = loginForm.getInput('[data-test="username-input"]');
+await usernameInput.fill('admin');
+```
+
+### Page Objects (`pages/`)
+
+Each page object encapsulates:
+- **Actions**: What you can do on the page
+- **Queries**: Information you can get from the page  
+- **Selectors**: Centralized in private static SELECTORS constant
+- **NO Assertions**: Keep assertions in test files
+
+**Page Object Pattern:**

Review Comment:
   I don't know the general consensus around this but i much prefer simple 
functions to Page/Component object model. Also i don't think this aligns with 
**YAGNI** and **KISS** specified above. Again this is a personal preference but 
i don't think we need this abstraction now



-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to