-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: create select dropdown patterns for form builders and form users tckt-360 #370
Conversation
Terraform plan for tts-10x-atj-dev Plan: 0 to add, 2 to change, 0 to destroy.Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
!~ update in-place
Terraform will perform the following actions:
# cloudfoundry_app.tts-10x-atj-dev-server-doj_tts-10x-atj-dev-server-doj-app_380DB029 will be updated in-place
!~ resource "cloudfoundry_app" "tts-10x-atj-dev-server-doj_tts-10x-atj-dev-server-doj-app_380DB029" {
!~ docker_image = "ghcr.io/gsa-tts/atj-platform/server-doj:10bd08991e4b02e193b77b3dcdd6309f3b5ae622" -> "ghcr.io/gsa-tts/atj-platform/server-doj:2e2b423218335be6e00f4ed7faf7de2011380d59"
id = "6246c063-6cf4-423d-812a-4bfdeb62bcae"
name = "tts-10x-atj-dev-server-doj-app"
# (17 unchanged attributes hidden)
# (3 unchanged blocks hidden)
}
# cloudfoundry_app.tts-10x-atj-dev-server-kansas_tts-10x-atj-dev-server-kansas-app_337A9CF1 will be updated in-place
!~ resource "cloudfoundry_app" "tts-10x-atj-dev-server-kansas_tts-10x-atj-dev-server-kansas-app_337A9CF1" {
!~ docker_image = "ghcr.io/gsa-tts/atj-platform/server-kansas:10bd08991e4b02e193b77b3dcdd6309f3b5ae622" -> "ghcr.io/gsa-tts/atj-platform/server-kansas:2e2b423218335be6e00f4ed7faf7de2011380d59"
id = "f7c60971-bffd-4a6e-a0bb-af1191079918"
name = "tts-10x-atj-dev-server-kansas-app"
# (17 unchanged attributes hidden)
# (3 unchanged blocks hidden)
}
Plan: 0 to add, 2 to change, 0 to destroy. 📝 Plan generated in Post Terraform plan to PR comment #378 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great start, especially as a first dive into the codebase! We need some validation on user input to be added, and I have a couple other questions/comments.
799fb6f
to
1eab4be
Compare
019204d
to
d61938a
Compare
}; | ||
|
||
const inputValue = 'value1'; | ||
if (selectDropdownConfig.parseUserInput) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also do this here, to avoid skipping the test, in the event parseUserInput becomes undefined:
if (!selectDropdownConfig.parseUserInput) {
expect.fail('selectDropdownConfig.parseUserInput is not undefined');
}
Then the test code, below, will be type-safe without the if condition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielnaab do you mean something like this?
if (!selectDropdownConfig.parseUserInput) {
expect.fail('selectDropdownConfig.parseUserInput is not undefined');
}
const result = selectDropdownConfig.parseUserInput(pattern, inputValue);
console.log('Test parse result:', result);
if (result.success) {
expect(result.data).toBe('value1');
} else {
throw new Error('Unexpected validation failure');
}
1d5a8f3
to
cbfe7ba
Compare
cbfe7ba
to
3b06384
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Created Select Dropdown Pattern for Forms Users.
Created Select Dropdown Pattern Edit for Form Builders.
Added unit tests for Select Dropdown Pattern.