Gherkin++ v0.1.0 GitHub

Storybook

Needs Storybook 10.

npm install --save-dev gpp-lang @gpp-lang/storybook
// .storybook/main.ts
addons: ['@gpp-lang/storybook']
// gpp.config.ts
import { defineConfig } from 'gpp-lang'
import { storybook } from '@gpp-lang/storybook/config'

export default defineConfig({ backends: [storybook()] })

Writing

A template is a play function. Steps only, no ${…}.

import { gpp } from '@gpp-lang/storybook'

export const SavingADraft: Story = {
  args: { title: '' },
  play: gpp`
    When I Fill the Field "Title" with "Hello"
    And I Click the Button "Save"
    Then the Status should Read "Draft saved"
  `,
}

Example.