# 1028 Quote Create Static Required Fields

## Purpose

Reusable browser verification case for `#1028`.

Proves only the static create-form path:

1. static required fields are visible before save
2. the Quote create flow is unblocked for the static-required path

It does not prove:

1. TiDB Cloud conditional/grouped requiredness UX
2. downstream L2 conditional validation guidance

## Local Preconditions

Bring up the application using [Independent local deployment](../local-independent-deployment.md).
Complete App installation, L0 activation and L1 deployment before this case.
Use the configured public URL (default `http://127.0.0.1:3300`) and the password
file `$LOCAL_STATE/admin-password`. Record the selected images, App installation
settings, app-packs and final L2 pack; L0 readiness alone is insufficient.

## Reusable Browser Flow Shape

Use this fixed sequence:

1. initialize a local D3 cluster with the current downstream pack
2. log in as `admin@example.invalid`
3. navigate to the exact create route under test
4. capture the pre-submit UI state
5. assert the visible labels/required markers
6. fill the minimum fields needed for the target assertion
7. click `Save`
8. assert the post-submit route, toast, and persisted values
9. save one before/after screenshot

Preferred assertion order for create-form bugs:

1. route resolved correctly
2. create layout API returned `200`
3. required markers are visible
4. save request returned `201` or expected validation error
5. created detail page shows the persisted values

## Playwright Skeleton

```text
1. goto login page
2. fill email/password
3. wait for authenticated landing page
4. goto target route directly
5. if record-type selector exists:
   - choose record type
   - click Next
6. wait for the target form section label to appear
7. capture before-save screenshot
8. fill only the fields needed for the target assertion
9. click Save
10. assert final URL / toast / field persistence
11. capture after-save screenshot
```

## Case Inputs

Issue:

```text
#1028 Quote create form must expose static required fields before save
```

Local seed record:

```text
OpportunityId = 0bfdf1b5-acd8-4a82-a704-dfbf44738553
```

Browser route:

```text
/object/Quote/new?OpportunityId=0bfdf1b5-acd8-4a82-a704-dfbf44738553
```

Record type path:

1. open Quote create route
2. choose `Renewal`
3. click `Next`

## Pre-Save Assertions

1. page shows `New Quote`
2. page shows:
   - `Status*`
   - `How will the customer place an order*`
   - `Payment Term*`
   - `Payment Frequency*`
3. create-layout APIs return `200`:
   - `/services/data/v63.0/ui-api/record-defaults/create/Quote`
   - `/services/data/v63.0/ui-api/layout/Quote?type=Create`
   - `/services/data/v63.0/ui-api/layout/Quote?type=Create&recordTypeId=...`

## Minimum Save Inputs

1. `Payment Term = 30`
2. `Payment Frequency = Pay in Full`
3. `How will the customer place an order = Directly with PingCAP`
   - often already prefilled in the current local seed/runtime

## Success Assertions

1. browser lands on `/object/Quote/<id>`
2. backend create request:
   - `POST /services/data/v63.0/sobjects/Quote -> 201`
3. detail page shows:
   - `Payment Term 30`
   - `Payment Frequency Pay in Full`
4. success toast appears:
   - `Quote created successfully`

## Verification Artifacts

```text
.runtime/verification/issue-1028-quote-create-required-fields.png
.runtime/verification/issue-1028-before-save.png
.runtime/verification/issue-1028-quote-create-save-success.png
```

Created sample record during the repair run:

```text
QuoteId = 01b46efc-a05e-4424-b25f-022b04766540
```
