Skip to content

Commit

Permalink
skip flaky suite (elastic#198628)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic committed Nov 21, 2024
1 parent 052f527 commit 7b66da4
Showing 1 changed file with 70 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,91 +44,96 @@ const waitForPageTitleToBeShown = () => {
cy.get(PAGE_TITLE).should('be.visible');
};

describe('Detections > Callouts', { tags: ['@ess', '@serverless', '@skipInServerless'] }, () => {
before(() => {
// First, we have to open the app on behalf of a privileged user in order to initialize it.
// Otherwise the app will be disabled and show a "welcome"-like page.
login();
visit(ALERTS_URL);
waitForPageTitleToBeShown();
});

context('indicating read-only access to resources', () => {
context('On Detections home page', () => {
beforeEach(() => {
loadPageAsReadOnlyUser(ALERTS_URL);
});
// FLAKY: https://github.com/elastic/kibana/issues/198628
describe.skip(
'Detections > Callouts',
{ tags: ['@ess', '@serverless', '@skipInServerless'] },
() => {
before(() => {
// First, we have to open the app on behalf of a privileged user in order to initialize it.
// Otherwise the app will be disabled and show a "welcome"-like page.
login();
visit(ALERTS_URL);
waitForPageTitleToBeShown();
});

context('indicating read-only access to resources', () => {
context('On Detections home page', () => {
beforeEach(() => {
loadPageAsReadOnlyUser(ALERTS_URL);
});

it('dismisses callout and persists its state', () => {
waitForCallOutToBeShown(MISSING_PRIVILEGES_CALLOUT, 'primary');
it('dismisses callout and persists its state', () => {
waitForCallOutToBeShown(MISSING_PRIVILEGES_CALLOUT, 'primary');

dismissCallOut(MISSING_PRIVILEGES_CALLOUT);
reloadPage();
dismissCallOut(MISSING_PRIVILEGES_CALLOUT);
reloadPage();

getCallOut(MISSING_PRIVILEGES_CALLOUT).should('not.exist');
getCallOut(MISSING_PRIVILEGES_CALLOUT).should('not.exist');
});
});
});

// FYI: Rules Management check moved to ../detection_rules/all_rules_read_only.spec.ts
// FYI: Rules Management check moved to ../detection_rules/all_rules_read_only.spec.ts

context('On Rule Details page', () => {
beforeEach(() => {
createRule(getNewRule()).then((rule) =>
loadPageAsReadOnlyUser(ruleDetailsUrl(rule.body.id))
);
});
context('On Rule Details page', () => {
beforeEach(() => {
createRule(getNewRule()).then((rule) =>
loadPageAsReadOnlyUser(ruleDetailsUrl(rule.body.id))
);
});

afterEach(() => {
deleteCustomRule();
});
afterEach(() => {
deleteCustomRule();
});

it('dismisses callout and persists its state', () => {
waitForCallOutToBeShown(MISSING_PRIVILEGES_CALLOUT, 'primary');
it('dismisses callout and persists its state', () => {
waitForCallOutToBeShown(MISSING_PRIVILEGES_CALLOUT, 'primary');

dismissCallOut(MISSING_PRIVILEGES_CALLOUT);
reloadPage();
dismissCallOut(MISSING_PRIVILEGES_CALLOUT);
reloadPage();

getCallOut(MISSING_PRIVILEGES_CALLOUT).should('not.exist');
getCallOut(MISSING_PRIVILEGES_CALLOUT).should('not.exist');
});
});
});
});

context('indicating read-write access to resources', () => {
context('On Detections home page', () => {
beforeEach(() => {
loadPageAsPlatformEngineer(ALERTS_URL);
});
context('indicating read-write access to resources', () => {
context('On Detections home page', () => {
beforeEach(() => {
loadPageAsPlatformEngineer(ALERTS_URL);
});

it('We show no callout', () => {
getCallOut(MISSING_PRIVILEGES_CALLOUT).should('not.exist');
it('We show no callout', () => {
getCallOut(MISSING_PRIVILEGES_CALLOUT).should('not.exist');
});
});
});

context('On Rules Management page', () => {
beforeEach(() => {
login(ROLES.platform_engineer);
loadPageAsPlatformEngineer(RULES_MANAGEMENT_URL);
});
context('On Rules Management page', () => {
beforeEach(() => {
login(ROLES.platform_engineer);
loadPageAsPlatformEngineer(RULES_MANAGEMENT_URL);
});

it('We show no callout', () => {
getCallOut(MISSING_PRIVILEGES_CALLOUT).should('not.exist');
it('We show no callout', () => {
getCallOut(MISSING_PRIVILEGES_CALLOUT).should('not.exist');
});
});
});

context('On Rule Details page', () => {
beforeEach(() => {
createRule(getNewRule()).then((rule) =>
loadPageAsPlatformEngineer(ruleDetailsUrl(rule.body.id))
);
});
context('On Rule Details page', () => {
beforeEach(() => {
createRule(getNewRule()).then((rule) =>
loadPageAsPlatformEngineer(ruleDetailsUrl(rule.body.id))
);
});

afterEach(() => {
deleteCustomRule();
});
afterEach(() => {
deleteCustomRule();
});

it('We show no callouts', () => {
getCallOut(MISSING_PRIVILEGES_CALLOUT).should('not.exist');
it('We show no callouts', () => {
getCallOut(MISSING_PRIVILEGES_CALLOUT).should('not.exist');
});
});
});
});
});
}
);

0 comments on commit 7b66da4

Please sign in to comment.