-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02e3eff
commit 4fe0306
Showing
8 changed files
with
953 additions
and
0 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,96 @@ | ||
@civictheme @styleguide | ||
Feature: Test Drupal checkbox form element integration with CivicTheme & UIkit. | ||
|
||
Background: | ||
Given I am logged in as a user with the "Administrator" role | ||
When I go to "admin/appearance/styleguide" | ||
|
||
@api | ||
Scenario: Label visible, no default value, no message, no error | ||
Then I should see an ".checkbox-label-visible-no-default-value-no-message-no-error input.ct-field__control.ct-checkbox.form-checkbox[type='checkbox']" element | ||
|
||
Then the "edit-checkbox-label-visible-no-default-value-no-message-no-error" checkbox should not be checked | ||
|
||
Then I should see an ".checkbox-label-visible-no-default-value-no-message-no-error label.ct-label" element | ||
|
||
Then I should not see an ".checkbox-label-visible-no-default-value-no-message-no-error.ct-field.ct-field--required.ct-field--checkbox" element | ||
Then I should not see an ".checkbox-label-visible-no-default-value-no-message-no-error input.ct-field__control.required[required]" element | ||
|
||
Then I should not see an ".checkbox-label-visible-no-default-value-no-message-no-error.ct-field.ct-field--disabled.ct-field--checkbox" element | ||
Then I should not see an ".checkbox-label-visible-no-default-value-no-message-no-error input.ct-field__control[disabled]" element | ||
|
||
Then I should not see an ".checkbox-label-visible-no-default-value-no-message-no-error.ct-field.ct-field--invalid.ct-field--checkbox" element | ||
Then I should not see an ".checkbox-label-visible-no-default-value-no-message-no-error input.ct-field__control.ct-checkbox--is-invalid" element | ||
Then I should not see an ".checkbox-label-visible-no-default-value-no-message-no-error .ct-field__message.ct-field-message--error" element | ||
|
||
@api | ||
Scenario: Label visible, default value, no message, no error | ||
Then I should see an ".checkbox-label-visible-default-value-no-message-no-error input.ct-field__control.ct-checkbox.form-checkbox[type='checkbox']" element | ||
|
||
Then the "edit-checkbox-label-visible-default-value-no-message-no-error" checkbox should be checked | ||
|
||
Then I should see an ".checkbox-label-visible-default-value-no-message-no-error label.ct-label" element | ||
|
||
Then I should not see an ".checkbox-label-visible-default-value-no-message-no-error.ct-field.ct-field--required.ct-field--checkbox" element | ||
Then I should not see an ".checkbox-label-visible-default-value-no-message-no-error input.ct-field__control.required[required]" element | ||
|
||
Then I should not see an ".checkbox-label-visible-default-value-no-message-no-error.ct-field.ct-field--disabled.ct-field--checkbox" element | ||
Then I should not see an ".checkbox-label-visible-default-value-no-message-no-error input.ct-field__control[disabled]" element | ||
|
||
Then I should not see an ".checkbox-label-visible-default-value-no-message-no-error.ct-field.ct-field--invalid.ct-field--checkbox" element | ||
Then I should not see an ".checkbox-label-visible-default-value-no-message-no-error input.ct-field__control.ct-checkbox--is-invalid" element | ||
Then I should not see an ".checkbox-label-visible-default-value-no-message-no-error .ct-field__message.ct-field-message--error" element | ||
|
||
@api | ||
Scenario: Label visually hidden, default value, message, no error | ||
Then I should see an ".checkbox-label-visually-hidden-default-value-message-no-error input.ct-field__control.ct-checkbox.form-checkbox[type='checkbox']" element | ||
|
||
Then the "edit-checkbox-label-visually-hidden-default-value-message-no-error" checkbox should be checked | ||
|
||
Then I should see an ".checkbox-label-visually-hidden-default-value-message-no-error label.ct-label.ct-visually-hidden" element | ||
|
||
Then I should not see an ".checkbox-label-visually-hidden-default-value-message-no-error.ct-field.ct-field--required.ct-field--checkbox" element | ||
Then I should not see an ".checkbox-label-visually-hidden-default-value-message-no-error input.ct-field__control.required[required]" element | ||
|
||
Then I should not see an ".checkbox-label-visually-hidden-default-value-message-no-error.ct-field.ct-field--disabled.ct-field--checkbox" element | ||
Then I should not see an ".checkbox-label-visually-hidden-default-value-message-no-error input.ct-field__control[disabled]" element | ||
|
||
Then I should not see an ".checkbox-label-visually-hidden-default-value-message-no-error.ct-field.ct-field--invalid.ct-field--checkbox" element | ||
Then I should not see an ".checkbox-label-visually-hidden-default-value-message-no-error input.ct-field__control.ct-checkbox--is-invalid" element | ||
Then I should not see an ".checkbox-label-visually-hidden-default-value-message-no-error .ct-field__message.ct-field-message--error" element | ||
|
||
@api | ||
Scenario: Label hidden, default value, message, required, error | ||
Then I should see an ".checkbox-label-hidden-default-value-message-required-error input.ct-field__control.ct-checkbox.form-checkbox[type='checkbox']" element | ||
|
||
Then the "edit-checkbox-label-hidden-default-value-message-required-error" checkbox should be checked | ||
|
||
Then I should not see an ".checkbox-label-hidden-default-value-message-required-error label.ct-label" element | ||
|
||
Then I should see an ".checkbox-label-hidden-default-value-message-required-error.ct-field.ct-field--required.ct-field--checkbox" element | ||
Then I should see an ".checkbox-label-hidden-default-value-message-required-error input.ct-field__control.required[required]" element | ||
|
||
Then I should not see an ".checkbox-label-hidden-default-value-message-required-error.ct-field.ct-field--disabled.ct-field--checkbox" element | ||
Then I should not see an ".checkbox-label-hidden-default-value-message-required-error input.ct-field__control[disabled]" element | ||
|
||
Then I should see an ".checkbox-label-hidden-default-value-message-required-error.ct-field.ct-field--invalid.ct-field--checkbox" element | ||
Then I should see an ".checkbox-label-hidden-default-value-message-required-error input.ct-field__control.ct-checkbox--is-invalid" element | ||
Then I should see an ".checkbox-label-hidden-default-value-message-required-error .ct-field__message.ct-field-message--error" element | ||
|
||
@api | ||
Scenario: Label visible, default value, no message, disabled | ||
Then I should see an ".checkbox-label-visible-default-value-no-message-disabled input.ct-field__control.ct-checkbox.form-checkbox[type='checkbox']" element | ||
|
||
Then the "edit-checkbox-label-visible-default-value-no-message-disabled" checkbox should be checked | ||
|
||
Then I should see an ".checkbox-label-visible-default-value-no-message-disabled label.ct-label" element | ||
|
||
Then I should not see an ".checkbox-label-visible-default-value-no-message-disabled.ct-field.ct-field--required.ct-field--checkbox" element | ||
Then I should not see an ".checkbox-label-visible-default-value-no-message-disabled input.ct-field__control.required[required]" element | ||
|
||
Then I should see an ".checkbox-label-visible-default-value-no-message-disabled.ct-field.ct-field--disabled.ct-field--checkbox" element | ||
Then I should see an ".checkbox-label-visible-default-value-no-message-disabled input.ct-field__control[disabled]" element | ||
|
||
Then I should not see an ".checkbox-label-visible-default-value-no-message-disabled.ct-field.ct-field--invalid.ct-field--checkbox" element | ||
Then I should not see an ".checkbox-label-visible-default-value-no-message-disabled input.ct-field__control.ct-checkbox--is-invalid" element | ||
Then I should not see an ".checkbox-label-visible-default-value-no-message-disabled .ct-field__message.ct-field-message--error" element |
111 changes: 111 additions & 0 deletions
111
tests/behat/features/form_civictheme_checkboxes.feature
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,111 @@ | ||
@civictheme @styleguide | ||
Feature: Test Drupal checkboxes form element integration with CivicTheme & UIkit. | ||
|
||
Background: | ||
Given I am logged in as a user with the "Administrator" role | ||
When I go to "admin/appearance/styleguide" | ||
|
||
@api | ||
Scenario: Label visible, no default value, no message, no error | ||
Then I should see an ".checkboxes-label-visible-no-default-value-no-message-no-error input.ct-field__control.ct-checkbox[type='checkbox'][value='option_1']" element | ||
Then I should see an ".checkboxes-label-visible-no-default-value-no-message-no-error input.ct-field__control.ct-checkbox[type='checkbox'][value='option_2']" element | ||
|
||
Then the "edit-checkboxes-label-visible-no-default-value-no-message-no-error-option-1" checkbox should not be checked | ||
Then the "edit-checkboxes-label-visible-no-default-value-no-message-no-error-option-2" checkbox should not be checked | ||
|
||
Then I should see an ".checkboxes-label-visible-no-default-value-no-message-no-error label.ct-label" element | ||
|
||
Then I should not see an ".checkboxes-label-visible-no-default-value-no-message-no-error.ct-field.ct-field--required.ct-field--checkboxes" element | ||
|
||
Then I should not see an ".checkboxes-label-visible-no-default-value-no-message-no-error.ct-field.ct-field--disabled.ct-field--checkboxes" element | ||
Then I should not see an ".checkboxes-label-visible-no-default-value-no-message-no-error input.ct-field__control.ct-checkbox[type='checkbox'][value='option_1'][disabled]" element | ||
Then I should not see an ".checkboxes-label-visible-no-default-value-no-message-no-error input.ct-field__control.ct-checkbox[type='checkbox'][value='option_2'][disabled]" element | ||
|
||
Then I should not see an ".checkboxes-label-visible-no-default-value-no-message-no-error.ct-field.ct-field--invalid.ct-field--checkboxes" element | ||
Then I should see an ".checkboxes-label-visible-no-default-value-no-message-no-error input.ct-field__control.ct-checkbox--is-invalid[type='checkbox'][value='option_1']" element | ||
Then I should see an ".checkboxes-label-visible-no-default-value-no-message-no-error input.ct-field__control.ct-checkbox--is-invalid[type='checkbox'][value='option_2']" element | ||
Then I should not see an ".checkboxes-label-visible-no-default-value-no-message-no-error .ct-field__message.ct-field-message--error" element | ||
|
||
@api @skipped | ||
Scenario: Label visible, default value, no message, no error | ||
Then I should see an ".checkboxes-label-visible-default-value-no-message-no-error input.ct-field__control.ct-checkbox[type='checkbox'][value='option_1']" element | ||
Then I should see an ".checkboxes-label-visible-default-value-no-message-no-error input.ct-field__control.ct-checkbox[type='checkbox'][value='option_2']" element | ||
|
||
Then the "edit-checkboxes-label-visible-default-value-no-message-no-error-option-1" checkbox should not be checked | ||
Then the "edit-checkboxes-label-visible-default-value-no-message-no-error-option-2" checkbox should be checked | ||
|
||
Then I should see an ".checkboxes-label-visible-default-value-no-message-no-error label.ct-label" element | ||
|
||
Then I should not see an ".checkboxes-label-visible-default-value-no-message-no-error.ct-field.ct-field--required.ct-field--checkboxes" element | ||
|
||
Then I should not see an ".checkboxes-label-visible-default-value-no-message-no-error.ct-field.ct-field--disabled.ct-field--checkboxes" element | ||
Then I should not see an ".checkboxes-label-visible-default-value-no-message-no-error input.ct-field__control.ct-checkbox[type='checkbox'][value='option_1'][disabled]" element | ||
Then I should not see an ".checkboxes-label-visible-default-value-no-message-no-error input.ct-field__control.ct-checkbox[type='checkbox'][value='option_2'][disabled]" element | ||
|
||
Then I should not see an ".checkboxes-label-visible-default-value-no-message-no-error.ct-field.ct-field--invalid.ct-field--checkboxes" element | ||
Then I should see an ".checkboxes-label-visible-default-value-no-message-no-error input.ct-field__control.ct-checkbox--is-invalid[type='checkbox'][value='option_1']" element | ||
Then I should see an ".checkboxes-label-visible-default-value-no-message-no-error input.ct-field__control.ct-checkbox--is-invalid[type='checkbox'][value='option_2']" element | ||
Then I should not see an ".checkboxes-label-visible-default-value-no-message-no-error .ct-field__message.ct-field-message--error" element | ||
|
||
@api | ||
Scenario: Label visually hidden, default value, message, no error | ||
Then I should see an ".checkboxes-label-visually-hidden-default-value-message-no-error input.ct-field__control.ct-checkbox[type='checkbox'][value='option_1']" element | ||
Then I should see an ".checkboxes-label-visually-hidden-default-value-message-no-error input.ct-field__control.ct-checkbox[type='checkbox'][value='option_2']" element | ||
|
||
Then the "edit-checkboxes-label-visually-hidden-default-value-message-no-error-option-1" checkbox should not be checked | ||
Then the "edit-checkboxes-label-visually-hidden-default-value-message-no-error-option-2" checkbox should be checked | ||
|
||
Then I should see an ".checkboxes-label-visually-hidden-default-value-message-no-error label.ct-label.ct-visually-hidden" element | ||
|
||
Then I should not see an ".checkboxes-label-visually-hidden-default-value-message-no-error.ct-field.ct-field--required.ct-field--checkboxes" element | ||
|
||
Then I should not see an ".checkboxes-label-visually-hidden-default-value-message-no-error.ct-field.ct-field--disabled.ct-field--checkboxes" element | ||
Then I should not see an ".checkboxes-label-visually-hidden-default-value-message-no-error input.ct-field__control.ct-checkbox[type='checkbox'][value='option_1'][disabled]" element | ||
Then I should not see an ".checkboxes-label-visually-hidden-default-value-message-no-error input.ct-field__control.ct-checkbox[type='checkbox'][value='option_2'][disabled]" element | ||
|
||
Then I should not see an ".checkboxes-label-visually-hidden-default-value-message-no-error.ct-field.ct-field--invalid.ct-field--checkboxes" element | ||
Then I should see an ".checkboxes-label-visually-hidden-default-value-message-no-error input.ct-field__control.ct-checkbox--is-invalid[type='checkbox'][value='option_1']" element | ||
Then I should see an ".checkboxes-label-visually-hidden-default-value-message-no-error input.ct-field__control.ct-checkbox--is-invalid[type='checkbox'][value='option_2']" element | ||
Then I should not see an ".checkboxes-label-visually-hidden-default-value-message-no-error .ct-field__message.ct-field-message--error" element | ||
|
||
@api | ||
Scenario: Label hidden, default value, message, required, error | ||
Then I should see an ".checkboxes-label-hidden-default-value-message-required-error input.ct-field__control.ct-checkbox[type='checkbox'][value='option_1']" element | ||
Then I should see an ".checkboxes-label-hidden-default-value-message-required-error input.ct-field__control.ct-checkbox[type='checkbox'][value='option_2']" element | ||
|
||
Then the "edit-checkboxes-label-hidden-default-value-message-required-error-option-1" checkbox should not be checked | ||
Then the "edit-checkboxes-label-hidden-default-value-message-required-error-option-2" checkbox should be checked | ||
|
||
Then I should not see an ".checkboxes-label-hidden-default-value-message-required-error label.ct-label" element | ||
|
||
Then I should see an ".checkboxes-label-hidden-default-value-message-required-error.ct-field.ct-field--required.ct-field--checkboxes" element | ||
|
||
Then I should not see an ".checkboxes-label-hidden-default-value-message-required-error.ct-field.ct-field--disabled.ct-field--checkboxes" element | ||
Then I should not see an ".checkboxes-label-hidden-default-value-message-required-error input.ct-field__control.ct-checkbox[type='checkbox'][value='option_1'][disabled]" element | ||
Then I should not see an ".checkboxes-label-hidden-default-value-message-required-error input.ct-field__control.ct-checkbox[type='checkbox'][value='option_2'][disabled]" element | ||
|
||
Then I should see an ".checkboxes-label-hidden-default-value-message-required-error.ct-field.ct-field--invalid.ct-field--checkboxes" element | ||
Then I should see an ".checkboxes-label-hidden-default-value-message-required-error input.ct-field__control.ct-checkbox--is-invalid[type='checkbox'][value='option_1']" element | ||
Then I should see an ".checkboxes-label-hidden-default-value-message-required-error input.ct-field__control.ct-checkbox--is-invalid[type='checkbox'][value='option_2']" element | ||
Then I should see an ".checkboxes-label-hidden-default-value-message-required-error .ct-field__message.ct-field-message--error" element | ||
|
||
@api | ||
Scenario: Label visible, default value, no message, disabled | ||
Then I should see an ".checkboxes-label-visible-default-value-no-message-disabled input.ct-field__control.ct-checkbox[type='checkbox'][value='option_1']" element | ||
Then I should see an ".checkboxes-label-visible-default-value-no-message-disabled input.ct-field__control.ct-checkbox[type='checkbox'][value='option_2']" element | ||
|
||
Then the "edit-checkboxes-label-visible-default-value-no-message-disabled-option-1" checkbox should not be checked | ||
Then the "edit-checkboxes-label-visible-default-value-no-message-disabled-option-2" checkbox should be checked | ||
|
||
Then I should see an ".checkboxes-label-visible-default-value-no-message-disabled label.ct-label" element | ||
|
||
Then I should not see an ".checkboxes-label-visible-default-value-no-message-disabled.ct-field.ct-field--required.ct-field--checkboxes" element | ||
|
||
Then I should see an ".checkboxes-label-visible-default-value-no-message-disabled.ct-field.ct-field--disabled.ct-field--checkboxes" element | ||
Then I should see an ".checkboxes-label-visible-default-value-no-message-disabled input.ct-field__control.ct-checkbox[type='checkbox'][value='option_1'][disabled]" element | ||
Then I should see an ".checkboxes-label-visible-default-value-no-message-disabled input.ct-field__control.ct-checkbox[type='checkbox'][value='option_2'][disabled]" element | ||
|
||
Then I should not see an ".checkboxes-label-visible-default-value-no-message-disabled.ct-field.ct-field--invalid.ct-field--checkboxes" element | ||
Then I should not see an ".checkboxes-label-visible-default-value-no-message-disabled input.ct-field__control.ct-checkbox--is-invalid[type='checkbox'][value='option_1']" element | ||
Then I should not see an ".checkboxes-label-visible-default-value-no-message-disabled input.ct-field__control.ct-checkbox--is-invalid[type='checkbox'][value='option_2']" element | ||
Then I should not see an ".checkboxes-label-visible-default-value-no-message-disabled .ct-field__message.ct-field-message--error" element |
Oops, something went wrong.