Skip to content

Commit

Permalink
Added an a11y test for a delete modal
Browse files Browse the repository at this point in the history
  • Loading branch information
yuliacech committed Apr 13, 2021
1 parent 6d72743 commit cfc4991
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions x-pack/test/accessibility/apps/remote_clusters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const createButton = 'remoteClusterEmptyPromptCreateButton';
const pageTitle = 'remoteClusterPageTitle';
const nameLink = 'remoteClustersTableListClusterLink';
const editButton = 'remoteClusterTableRowEditButton';
const deleteButton = 'remoteClusterTableRowRemoveButton';
const deleteModalTitle = 'confirmModalTitleText';
const detailsTitle = 'remoteClusterDetailsFlyoutTitle';
const requestButton = 'remoteClustersRequestButton';
const requestTitle = 'remoteClusterRequestFlyoutTitle';
Expand Down Expand Up @@ -159,6 +161,23 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await a11y.testAppSnapshot();
});

it(`renders delete cluster modal (${mode} mode)`, async () => {
await retry.waitFor('remote clusters list to be rendered', async () => {
return testSubjects.isDisplayed(nameLink);
});

await testSubjects.click(deleteButton);

await retry.waitFor('delete cluster modal to be rendered', async () => {
return (
(await testSubjects.getVisibleText(deleteModalTitle)) ===
`Remove remote cluster '${clusterName}'?`
);
});

await a11y.testAppSnapshot();
});

it(`renders edit remote cluster form and request flyout (${mode} mode)`, async () => {
await retry.waitFor('edit remote cluster button to be rendered', async () => {
return testSubjects.isDisplayed(editButton);
Expand Down

0 comments on commit cfc4991

Please sign in to comment.