-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow form groups to accept system arguments (#3149)
- Loading branch information
Showing
6 changed files
with
33 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@primer/view-components': minor | ||
--- | ||
|
||
Allow form groups to accept system arguments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# frozen_string_literal: true | ||
|
||
require "lib/test_helper" | ||
|
||
class Primer::Forms::GroupInputTest < Minitest::Test | ||
include Primer::ComponentTestHelpers | ||
|
||
def test_group_accepts_system_arguments | ||
render_in_view_context do | ||
primer_form_with(url: "/foo") do |f| | ||
render_inline_form(f) do |sys_args_form| | ||
sys_args_form.group(layout: :horizontal, border: true, p: 1) do |group| | ||
group.text_field(name: :first_name, label: "First name") | ||
group.text_field(name: :last_name, label: "Last name") | ||
end | ||
end | ||
end | ||
end | ||
|
||
assert_selector ".FormControl-horizontalGroup.border.p-1" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters