Skip to content

Implement #16 (CI + parser fix), #15 (config Extends), #26 (faker inputs) - #40

Merged
zikani03 merged 3 commits into
mainfrom
feat/issues-16-15-26
Oct 20, 2026
Merged

zikani03 merged 3 commits into
mainfrom
feat/issues-16-15-26

Conversation

@zikani03

Copy link
Copy Markdown
Owner

Implements three issues from basi-issues-spec.md, as three per-issue commits. Each commit builds independently.

#16 — CI pipeline + parser fix (e47ba70)

  • Parser fix: a bare action keyword (e.g. Fill with no selector/args) was wrongly accepted because all operands are optional in the grammar. Added post-parse validation requiring at least one operand for every action except the navigation-only GoBack/GoForward/Refresh. Fixes the pre-existing failing TestParseFail.
  • CI: reworked .github/workflows/ci.yaml — checkout before setup-go, Go 1.24 (matching go.mod), module cache, a required build + vet + test job, and a non-blocking browser-tests job with Playwright browser caching.

#15 — Inherit frontmatter via Extends (387c367)

A spec can extend another .basi file's frontmatter:

Extends : "./base.basi;Browser,Headless"
  • Resolves the path relative to the current file; inherits all declared fields, or only the named sections after ;.
  • Local-wins merge (a locally-declared field is never overwritten), recursive parent chains, and circular-reference detection.
  • Wired into basi run so inherited fields are visible before the executor is built.
  • 8 new tests (extends_test.go).

Note: the spec's example referenced ScreenSizes/Devices/NetworkSpeed, which don't exist as frontmatter fields yet — Extends is implemented generically so it inherits whatever fields a referenced file actually declares, and will cover new fields automatically.

#26 — Faker values in action arguments (bc1954d)

Fill "input[name=email]" "{{faker.email}}"
  • gofakeit-backed interpolation for 21 faker types (email, name, uuid, phone, …); unknown tokens are left unchanged.
  • Also wired $var + faker interpolation into the main action-dispatch path — previously only the property-testing path interpolated, so $var substitution now works for normal actions like Fill too.
  • FakerSeed frontmatter key for deterministic output; values regenerate per repeated run.
  • 7 new tests (playwright/faker_test.go).

Verification

  • go build ./..., go vet -structtag=false -composites=false ./..., and go test ./ ./core/... ./playwright/... all green.
  • go mod verify → all modules verified (adds github.com/brianvoe/gofakeit/v6 v6.28.0).
  • Each of the three commits builds independently.

Closes #16, closes #15, closes #26.

🤖 Generated with Claude Code

zikani03 and others added 3 commits October 20, 2026 16:29
…browser jobs

Resolves #16. A bare action keyword (e.g. `Fill` with no selector/args) was
accepted by the grammar because all operands are optional. Add post-parse
validation requiring at least one operand for every action except the
navigation-only GoBack/GoForward/Refresh, fixing the failing TestParseFail.

Rework .github/workflows/ci.yaml: checkout before setup-go, Go 1.24 (matching
go.mod), module cache, a required build+vet+test job, and a non-blocking
browser-tests job with Playwright browser caching.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Implements #15. A spec's frontmatter can extend another file:

    Extends : "./base.basi;Browser,Headless"

Adds the `Extends` lexer token and ResolveExtends, which resolves the
referenced path relative to the current file, inherits all declared fields
(or only the named sections after `;`), merges with local-wins semantics,
resolves parent chains recursively, and detects circular references. Wired
into `basi run` so inherited fields are visible before the executor is built.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Implements #26. Action string arguments may use faker tokens, e.g.

    Fill "input[name=email]" "{{faker.email}}"

Adds gofakeit-backed interpolation for 21 faker types and wires variable and
faker interpolation into the main action-dispatch path (previously only the
property-testing path interpolated), so `$var` substitution now also works
for normal actions. A `FakerSeed` frontmatter key makes output deterministic;
values regenerate per repeated run.

Also updates basi-issues-spec.md to reflect implemented/pending status.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@zikani03
zikani03 merged commit 8ac93ea into main Oct 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Idea: Support faker for generating values for inputs Add robust CI pipeline Proposal: ability to inherit configuration from another file

1 participant