Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R20-166] Extend form inputs #1236

Merged
merged 9 commits into from
Jul 15, 2024
16 changes: 8 additions & 8 deletions .github/workflows/components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 9.0.6
- name: Install Dependencies
Expand All @@ -37,16 +37,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
with:
version: 9.0.6
run_install: true
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand All @@ -60,16 +60,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
with:
version: 9.0.6
run_install: true
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
Docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 9.0.6
run_install: false
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ jobs:
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 9.0.6
run_install: false
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/nuxt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
TestNuxt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 9.0.6
run_install: false
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand All @@ -45,10 +45,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 9.0.6

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ jobs:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 9.0.6
run_install: false
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
registry-url: 'https://npm.pkg.github.com/'
node-version: 20
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:
packages: write
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 9.0.6
run_install: false
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
registry-url: 'https://npm.pkg.github.com/'
node-version: 20
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/studio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
with:
version: 9.0.6

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
version: ${{ matrix.node }}
cache: ${{ steps.pkgman.outputs.cache }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/vue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ jobs:
Examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 9.0.6
run_install: false

- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/webcomponents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ jobs:
Examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 9.0.6
run_install: false

- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
Expand Down
1 change: 0 additions & 1 deletion examples/nuxt-app/cypress.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export default defineConfig({
baseUrl: 'http://localhost:3000',
specPattern: '**/*.{feature,feature.ts}',
supportFile: false,
supportFolder: './test',
downloadsFolder: './test/downloads',
fixturesFolder: './test/fixtures',
videosFolder: './test/videos',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{
"title": "Webform",
"changed": "2024-06-07T17:15:09+10:00",
"created": "2024-05-02T14:42:13+10:00",
"type": "landing_page",
"nid": "45fa8751-74af-43ee-9cb9-8a8fdee7e593",
"_sectionId": "8888",
"sidebar": {
"contacts": [],
"relatedLinks": [],
"whatsNext": [],
"socialShareNetworks": ["Facebook", "X", "LinkedIn"],
"siteSectionNav": null
},
"status": "published",
"topicTags": [
{
"text": "Demo Topic",
"url": "/topic/demo-topic"
}
],
"siteSection": {
"id": 8888,
"name": "Demo Site",
"siteOverrides": {
"showQuickExit": null,
"theme": {},
"featureFlags": {}
}
},
"meta": {
"url": "/webform",
"langcode": "en",
"description": "Testing the landing page webform mapping",
"additional": [
{
"tag": "meta",
"attributes": {
"name": "title",
"content": "Webform | Single Digital Presence Content Management System"
}
},
{
"tag": "link",
"attributes": {
"rel": "canonical",
"href": "http://content-sdp.docker.internal/webform"
}
},
{
"tag": "meta",
"attributes": {
"property": "og:locale",
"content": "en-AU"
}
}
],
"keywords": "",
"image": null
},
"showContentRating": true,
"summary": "Testing the landing page webform mapping",
"showHeroAcknowledgement": false,
"showInPageNav": false,
"showHeroImageCaption": false,
"showTopicTags": true,
"inPageNavHeadingLevel": "h2",
"background": "default",
"header": {
"title": "Webform",
"summary": "",
"links": {
"title": "",
"items": [],
"more": null
},
"backgroundImageCaption": "",
"theme": "default",
"logoImage": null,
"backgroundImage": null,
"cornerTop": null,
"cornerBottom": null,
"primaryAction": null,
"secondaryAction": null,
"secondaryActionLabel": ""
},
"primaryCampaign": null,
"secondaryCampaign": null,
"headerComponents": [],
"bodyComponents": [
{
"uuid": "986aca36-9a3a-408c-9455-c00396dcfb39",
"component": "TideLandingPageWebForm",
"id": 1795,
"title": "Input support",
"props": {
"title": "Input support",
"formId": "test_of_fields",
"hideFormOnSubmit": false,
"successMessageTitle": "Form submitted",
"successMessageHTML": "Thank you! Your response has been submitted.",
"errorMessageTitle": "Form not submitted",
"errorMessageHTML": "We are experiencing a server error. Please try again, otherwise contact us.",
"schema": [
{
"$formkit": "RplFormText",
"key": "name",
"name": "name",
"label": "Supported",
"id": "test_of_fields_name",
"validation": [["length", 0, 255]],
"validationMessages": {
"required": "Name is required",
"accepted": "Name is required",
"length": "You can enter a maximum of 255 characters"
}
},
{
"$formkit": "RplFormItem",
"key": "test",
"name": "test",
"label": "Extended",
"id": "test_of_fields_test",
"validation": [["length", 0, 255]],
"validationMessages": {
"required": "Item is required!",
"accepted": "Item is required",
"length": "You can enter a maximum of 255 characters"
}
},
{
"$el": "div",
"attrs": {
"class": "rpl-form__outer rpl-form__input--unsupported"
},
"children": ["\"signature\" is not yet supported"]
},
{
"$formkit": "RplFormActions",
"key": "actions",
"name": "submit",
"variant": "filled",
"id": "test_of_fields_actions",
"displayResetButton": false,
"validation": [],
"validationMessages": {
"required": "Submit is required",
"accepted": "Submit is required"
}
}
]
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Feature: Forms, extended

As a developer, I can add custom form inputs that are not provided in the core offering

Background:
Given the mock server has started
And the page endpoint for path "/webform" returns fixture "../../layers/ripple-ui-forms-ext/__test__/fixtures/webform" with status 200
And the site endpoint returns fixture "/site/reference" with status 200

@mockserver
Scenario: Custom input
Given I visit the page "/webform"
Then the landing page component "TideLandingPageWebForm" should exist
And a field labelled "Extended" should exist with the CSS class ".rpl-form__input--type-item"

@mockserver
Scenario: Unsupported input
Given I visit the page "/webform"
Then the landing page component "TideLandingPageWebForm" should exist
And an input of type "signature" is not yet supported
Loading
Loading