Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ describe('Table', () => {

test('should not allow edit or deletion for user with only read access', () => {
const editAvailable = renderTable().prop('columns')[6].actions[0].available(items[4]);
const deleteAvailable = renderTable().prop('columns')[7].actions[0].available(items[4]);
const deleteAvailable = renderTable().prop('columns')[6].actions[1].available(items[4]);
expect(editAvailable).toBeFalsy();
expect(deleteAvailable).toBeFalsy();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ const isExcludedAriaLabel = i18n.translate(
}
);

const actionsLabel = i18n.translate(
'indexPatternManagement.editIndexPattern.fields.table.actionsLabel',
{
defaultMessage: 'Actions',
}
);

const editLabel = i18n.translate('indexPatternManagement.editIndexPattern.fields.table.editLabel', {
defaultMessage: 'Edit',
});
Expand Down Expand Up @@ -477,7 +484,7 @@ class TableClass extends PureComponent<
render: (value: string) => this.renderBooleanTemplate(value, isExcludedAriaLabel),
},
{
name: '',
name: actionsLabel,
actions: [
{
name: editLabel,
Expand All @@ -488,16 +495,11 @@ class TableClass extends PureComponent<
'data-test-subj': 'editFieldFormat',
available: (field) => field.isUserEditable,
},
],
width: '40px',
},
{
name: '',
actions: [
{
name: deleteLabel,
description: deleteDescription,
icon: 'trash',
color: 'danger',
onClick: (field) => {
const toDelete = [field.name];
if (field.spec?.runtimeField?.fields) {
Expand All @@ -513,7 +515,7 @@ class TableClass extends PureComponent<
available: showDelete,
},
],
width: '40px',
width: '80px',
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'Searchable',
'Aggregatable',
'Excluded',
'Actions',
];

expect(headers.length).to.be(expectedHeaders.length);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ export class SettingsPageObject extends FtrService {

await this.find.clickByCssSelector(
`table.euiTable tbody tr.euiTableRow:nth-child(${tableFields.indexOf(name) + 1})
td:nth-last-child(2) button`
td:last-child button`
);
await this.retry.waitFor('flyout to open', async () => {
return await this.testSubjects.exists('flyoutTitle');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default ({ getService, getPageObjects }) => {
'Searchable',
'Aggregatable',
'Excluded',
'Actions',
];

expect(headers.length).to.be(expectedHeaders.length);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'Searchable',
'Aggregatable',
'Excluded',
'Actions',
];

expect(headers.length).to.be(expectedHeaders.length);
Expand Down