Skip to content

Commit

Permalink
skip current test
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelolo24 committed Nov 6, 2023
1 parent 05b18fd commit 36ff150
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,22 @@ export const useBulkAlertTagsItems = ({ refetch }: UseBulkAlertTagsItemsProps) =
[setAlertTags]
);

const alertTagsItems = hasIndexWrite
? [
{
key: 'manage-alert-tags',
'data-test-subj': 'alert-tags-context-menu-item',
name: i18n.ALERT_TAGS_CONTEXT_MENU_ITEM_TITLE,
panel: 1,
label: i18n.ALERT_TAGS_CONTEXT_MENU_ITEM_TITLE,
disableOnQuery: true,
},
]
: [];
const alertTagsItems = useMemo(
() =>
hasIndexWrite
? [
{
key: 'manage-alert-tags',
'data-test-subj': 'alert-tags-context-menu-item',
name: i18n.ALERT_TAGS_CONTEXT_MENU_ITEM_TITLE,
panel: 1,
label: i18n.ALERT_TAGS_CONTEXT_MENU_ITEM_TITLE,
disableOnQuery: true,
},
]
: [],
[hasIndexWrite]
);

const TitleContent = useMemo(
() => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ import { visit } from '../../../tasks/navigation';
import { ALERTS_URL } from '../../../urls/navigation';

// FLAKY: https://github.com/elastic/kibana/issues/169091
describe('Changing alert status', { tags: ['@ess', '@serverless'] }, () => {
describe('Changing alert status', () => {
before(() => {
cy.task('esArchiverLoad', { archiveName: 'auditbeat_big' });
});

context('Opening alerts', () => {
context('Opening alerts', { tags: ['@ess', '@serverless'] }, () => {
beforeEach(() => {
login();
deleteAlertsAndRules();
Expand Down Expand Up @@ -124,7 +124,7 @@ describe('Changing alert status', { tags: ['@ess', '@serverless'] }, () => {
});
});

context('Marking alerts as acknowledged', () => {
context('Marking alerts as acknowledged', { tags: ['@ess', '@serverless'] }, () => {
beforeEach(() => {
login();
deleteAlertsAndRules();
Expand Down Expand Up @@ -175,7 +175,7 @@ describe('Changing alert status', { tags: ['@ess', '@serverless'] }, () => {
});
});

context('Closing alerts', () => {
context('Closing alerts', { tags: ['@ess', '@serverless'] }, () => {
beforeEach(() => {
login();
deleteAlertsAndRules();
Expand Down Expand Up @@ -237,7 +237,10 @@ describe('Changing alert status', { tags: ['@ess', '@serverless'] }, () => {
});
});

context('User is readonly', () => {
// This test is unable to be run in serverless as `reader` is not available and viewer is currently reserved
// https://github.com/elastic/kibana/pull/169723#issuecomment-1793191007
// https://github.com/elastic/kibana/issues/170583
context('User is readonly', { tags: ['@ess', '@brokenInServerless'] }, () => {
beforeEach(() => {
login();
visit(ALERTS_URL);
Expand All @@ -247,7 +250,6 @@ describe('Changing alert status', { tags: ['@ess', '@serverless'] }, () => {
visit(ALERTS_URL, { role: ROLES.reader });
waitForAlertsToPopulate();
});

it('should not allow users to change a single alert status', () => {
// This is due to the reader role which makes everything in security 'read only'
cy.get(TIMELINE_CONTEXT_MENU_BTN).should('not.exist');
Expand Down

0 comments on commit 36ff150

Please sign in to comment.