Skip to content

Commit 78f6410

Browse files
authored
a11y tests on spaces home page including feature control (#76515)
1 parent e985f1a commit 78f6410

File tree

20 files changed

+296
-4
lines changed

20 files changed

+296
-4
lines changed

x-pack/plugins/spaces/public/management/components/confirm_delete_modal/__snapshots__/confirm_delete_modal.test.tsx.snap

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugins/spaces/public/management/components/confirm_delete_modal/confirm_delete_modal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ class ConfirmDeleteModalUI extends Component<Props, State> {
139139
})}
140140
>
141141
<EuiFieldText
142+
data-test-subj="deleteSpaceInput"
142143
name="confirmDeleteSpaceInput"
143144
value={this.state.confirmSpaceName}
144145
onChange={this.onSpaceNameChange}

x-pack/plugins/spaces/public/management/components/secure_space_message/secure_space_message.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export const SecureSpaceMessage = (props: SecureSpaceMessageProps) => {
3030
values={{
3131
rolesLink: (
3232
<EuiLink
33+
data-test-subj="rolesManagementPage"
3334
href={props.getUrlForApp('management', { path: 'security/roles' })}
3435
aria-label={rolesLinkTextAriaLabel}
3536
>

x-pack/plugins/spaces/public/management/edit_space/customize_space/__snapshots__/customize_space_avatar.test.tsx.snap

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugins/spaces/public/management/edit_space/customize_space/__snapshots__/space_identifier.test.tsx.snap

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugins/spaces/public/management/edit_space/customize_space/customize_space.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export class CustomizeSpace extends Component<Props, State> {
8686
>
8787
<EuiFieldText
8888
name="name"
89+
data-test-subj="addSpaceName"
8990
placeholder={i18n.translate(
9091
'xpack.spaces.management.manageSpacePage.awesomeSpacePlaceholder',
9192
{
@@ -149,6 +150,7 @@ export class CustomizeSpace extends Component<Props, State> {
149150
)}
150151

151152
<EuiFormRow
153+
data-test-subj="optionalDescription"
152154
label={i18n.translate(
153155
'xpack.spaces.management.manageSpacePage.spaceDescriptionFormRowLabel',
154156
{
@@ -165,6 +167,7 @@ export class CustomizeSpace extends Component<Props, State> {
165167
fullWidth
166168
>
167169
<EuiTextArea
170+
data-test-subj="descriptionSpaceText"
168171
name="description"
169172
value={description}
170173
onChange={this.onDescriptionChange}

x-pack/plugins/spaces/public/management/edit_space/customize_space/customize_space_avatar.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export class CustomizeSpaceAvatar extends Component<Props, State> {
119119
>
120120
<EuiFieldText
121121
inputRef={this.initialsInputRef}
122+
data-test-subj="spaceLetterInitial"
122123
name="spaceInitials"
123124
// allows input to be cleared or otherwise invalidated while user is editing the initials,
124125
// without defaulting to the derived initials provided by `getSpaceInitials`
@@ -163,6 +164,7 @@ export class CustomizeSpaceAvatar extends Component<Props, State> {
163164
>
164165
<EuiFilePicker
165166
display="default"
167+
data-test-subj="uploadCustomImageFile"
166168
initialPromptText={i18n.translate(
167169
'xpack.spaces.management.customizeSpaceAvatar.selectImageUrl',
168170
{

x-pack/plugins/spaces/public/management/edit_space/customize_space/space_identifier.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class SpaceIdentifierUI extends Component<Props, State> {
4646
>
4747
<EuiFieldText
4848
readOnly={!this.state.editing}
49+
data-test-subj="spaceURLDisplay"
4950
placeholder={
5051
this.state.editing || !this.props.editable
5152
? undefined
@@ -105,7 +106,11 @@ class SpaceIdentifierUI extends Component<Props, State> {
105106
id="xpack.spaces.management.spaceIdentifier.urlIdentifierLabel"
106107
defaultMessage="URL identifier "
107108
/>
108-
<EuiLink onClick={this.onEditClick} aria-label={editLinkLabel}>
109+
<EuiLink
110+
data-test-subj="CustomizeOrReset"
111+
onClick={this.onEditClick}
112+
aria-label={editLinkLabel}
113+
>
109114
{editLinkText}
110115
</EuiLink>
111116
</p>

x-pack/plugins/spaces/public/management/edit_space/enabled_features/__snapshots__/enabled_features.test.tsx.snap

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugins/spaces/public/management/edit_space/enabled_features/enabled_features.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export class EnabledFeatures extends Component<Props, {}> {
139139
values={{
140140
rolesLink: (
141141
<EuiLink
142+
data-test-subj="goToRoles"
142143
href={this.props.getUrlForApp('management', { path: 'security/roles' })}
143144
>
144145
<FormattedMessage

0 commit comments

Comments
 (0)