Add login and workflow-navigation controllers
- Dominant language
- Scala
- Stars
- 314
- Forks
- 187
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 214
Description
### Feature Summary
Step 2 of the operator-demo video generator: add the two controllers to the Playwright automation layer.
A controller is a reusable, named sequence of UI actions against the real Texera frontend. Each one wraps the selectors, clicks, and waits for one slice of the workflow behind a small builder API, so a per-operator demo script reads as a list of intentions rather than browser mechanics, and UI changes are fixed in one place instead of in every script.
### Proposed Solution or Design
Add two controllers to the Playwright layer, covering the start of every demo run:
1. LoginControllerBuilder. Local username/password login.
2. NavigationControllerBuilder. Create a workflow, import a sample workflow, and clean the canvas. These run in the setup phase, before recording starts, so a video does not open on login and setup boilerplate.
```
new LoginControllerBuilder(ctx)
.login(user.username, user.password)
.execute()
new NavigationControllerBuilder(ctx)
.createNewWorkflow()
.importWorkflow(TestDataConfig.workflowJsonDir)
.execute()
```
Frontend hooks. Adds the data-testid attributes these two controllers rely on: login-username, login-password, and login-submit on the local login form, plus navigation-create-workflow-button and navigation-workflow-canvas. Without stable ids the automation has to match on component-library classes and DOM structure, which break on unrelated refactors. This step also adds a guard test asserting those ids exist, so a later refactor cannot silently remove one and break video generation.
### Affected Area
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.