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

[Cases] Wait for the configuration page to appear before starting the tests #168465

Merged
merged 9 commits into from
Oct 14, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,32 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
const find = getService('find');

describe('Configure Case', function () {
// Error: timed out waiting for assertRadioGroupValue: Expected the radio group value to equal "close-by-pushing"
// security_exception: action [indices:data/write/delete/byquery] is unauthorized for user [elastic] with effective roles [superuser] on restricted indices [.kibana_alerting_cases], this action is granted by the index privileges [delete,write,all]
this.tags(['failsOnMKI']);
pheyos marked this conversation as resolved.
Show resolved Hide resolved
before(async () => {
await svlCommonPage.login();
await svlObltNavigation.navigateToLandingPage();
await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'observability-overview:cases' });
await header.waitUntilLoadingHasFinished();

await retry.waitFor('configure-case-button exist', async () => {
return await testSubjects.exists('configure-case-button');
});

await common.clickAndValidate('configure-case-button', 'case-configure-title');
await header.waitUntilLoadingHasFinished();

await retry.waitFor('case-configure-title exist', async () => {
return await testSubjects.exists('case-configure-title');
});
});

after(async () => {
await cases.api.deleteAllCases();
await svlCommonPage.forceLogout();
});

// FLAKY: https://github.com/elastic/kibana/issues/166469
describe.skip('Closure options', function () {
describe('Closure options', function () {
it('defaults the closure option correctly', async () => {
await cases.common.assertRadioGroupValue('closure-options-radio-group', 'close-by-user');
});
Expand All @@ -50,8 +59,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
});
});

// FLAKY: https://github.com/elastic/kibana/issues/167869
describe.skip('Connectors', function () {
describe('Connectors', function () {
it('defaults the connector to none correctly', async () => {
await retry.waitFor('dropdown-connector-no-connector to exist', async () => {
return await testSubjects.exists('dropdown-connector-no-connector');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,18 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
await svlCommonPage.login();
await svlSecNavigation.navigateToLandingPage();
await testSubjects.click('solutionSideNavItemLink-cases');
await header.waitUntilLoadingHasFinished();

await retry.waitFor('configure-case-button exist', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe I'm confused but isn't this the same as
await retry.waitFor('configure-case-button exist', testSubjects.exists('configure-case-button'));
?

Copy link
Member Author

@cnasikas cnasikas Oct 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably yes 🙂. I never thought about it tbh. I will keep it in mind for the next time. Thanks!

return await testSubjects.exists('configure-case-button');
});

await common.clickAndValidate('configure-case-button', 'case-configure-title');
await header.waitUntilLoadingHasFinished();

await retry.waitFor('case-configure-title exist', async () => {
return await testSubjects.exists('case-configure-title');
});
});

after(async () => {
Expand All @@ -36,8 +46,6 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
});

describe('Closure options', function () {
// Error: Expected the radio group value to equal "close-by-pushing" (got "close-by-user")
this.tags(['failsOnMKI']);
it('defaults the closure option correctly', async () => {
await cases.common.assertRadioGroupValue('closure-options-radio-group', 'close-by-user');
});
Expand Down
Loading