Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AO] Fix add_to_case functional test #163155

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export function ObservabilityAlertsAddToCaseProvider({ getService }: FtrProvider
};

const closeFlyout = async () => {
return await (await testSubjects.find('euiFlyoutCloseButton')).click();
await testSubjects.click('euiFlyoutCloseButton'); // click close button
await testSubjects.missingOrFail('euiFlyoutCloseButton'); // wait for flyout to be closed
};

const getAddToExistingCaseModalOrFail = async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => {
await esArchiver.unload('x-pack/test/functional/es_archives/observability/alerts');
});

// FLAKY: https://github.com/elastic/kibana/issues/156312
describe.skip('When user has all privileges for cases', () => {
describe('When user has all privileges for cases', () => {
before(async () => {
await observability.users.setTestUserRole(
observability.users.defineBasicObservabilityRole({
Expand All @@ -42,9 +41,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => {
});

it('renders case options in the overflow menu', async () => {
await retry.try(async () => {
await observability.alerts.common.openActionsMenuForRow(0);
});
await observability.alerts.common.openActionsMenuForRow(0);

await retry.try(async () => {
await observability.alerts.addToCase.getAddToExistingCaseSelectorOrFail();
Expand All @@ -64,9 +61,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => {
});

it('opens a modal when Add to existing case is clicked', async () => {
await retry.try(async () => {
await observability.alerts.common.openActionsMenuForRow(0);
});
await observability.alerts.common.openActionsMenuForRow(0);

await retry.try(async () => {
await observability.alerts.addToCase.addToExistingCaseButtonClick();
Expand All @@ -91,9 +86,8 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => {
});

it('does not render case options in the overflow menu', async () => {
await retry.try(async () => {
await observability.alerts.common.openActionsMenuForRow(0);
});
await observability.alerts.common.openActionsMenuForRow(0);

await retry.try(async () => {
await observability.alerts.addToCase.missingAddToExistingCaseSelectorOrFail();
await observability.alerts.addToCase.missingAddToNewCaseSelectorOrFail();
Expand Down