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

Rollup and Transform flaky test fix #1509

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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 @@ -210,42 +210,6 @@ describe('Rollups', () => {
});
});

describe('can be deleted', () => {
before(() => {
cy.deleteAllIndices();
cy.deleteIMJobs();
cy.createRollup(ROLLUP_ID, sampleRollup);
});

it('successfully', () => {
// Confirm we have our initial rollup
cy.contains(ROLLUP_ID);

// Select checkbox for our rollup job
cy.get(`#_selection_column_${ROLLUP_ID}-checkbox`).check({ force: true });

// Click on Actions popover menu
cy.get(`[data-test-subj="actionButton"]`).click({ force: true });

// Click Delete button
cy.get(`[data-test-subj="deleteButton"]`).click({ force: true });

// Type "delete" to confirm deletion
cy.get(`input[placeholder="delete"]`).type('delete', { force: true });

// Click the delete confirmation button in modal
cy.get(`[data-test-subj="confirmModalConfirmButton"]`).click();

// Confirm we got deleted toaster
cy.contains(`"${ROLLUP_ID}" successfully deleted!`);

// Confirm showing empty loading state
cy.contains(
'Rollup jobs help you conserve storage space for historical time series data while preserving the specific information you need'
);
});
});

describe('can be enabled and disabled', () => {
before(() => {
cy.deleteAllIndices();
Expand Down Expand Up @@ -293,4 +257,40 @@ describe('Rollups', () => {
cy.contains(`${ROLLUP_ID} is enabled`);
});
});

describe('can be deleted', () => {
before(() => {
cy.deleteAllIndices();
cy.deleteIMJobs();
cy.createRollup(ROLLUP_ID, sampleRollup);
});

it('successfully', () => {
// Confirm we have our initial rollup
cy.contains(ROLLUP_ID);

// Select checkbox for our rollup job
cy.get(`#_selection_column_${ROLLUP_ID}-checkbox`).check({ force: true });

// Click on Actions popover menu
cy.get(`[data-test-subj="actionButton"]`).click({ force: true });

// Click Delete button
cy.get(`[data-test-subj="deleteButton"]`).click({ force: true });

// Type "delete" to confirm deletion
cy.get(`input[placeholder="delete"]`).type('delete', { force: true });

// Click the delete confirmation button in modal
cy.get(`[data-test-subj="confirmModalConfirmButton"]`).click();

// Confirm we got deleted toaster
cy.contains(`"${ROLLUP_ID}" successfully deleted!`);

// Confirm showing empty loading state
cy.contains(
'Rollup jobs help you conserve storage space for historical time series data while preserving the specific information you need'
);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -188,50 +188,6 @@ describe('Transforms', () => {
});
});

describe('can be deleted', () => {
beforeEach(() => {
cy.createTransform(TRANSFORM_ID, sampleTransform);
cy.reload();
});

it('successfully', () => {
// Confirm we have our initial transform
cy.contains(TRANSFORM_ID);

// Disable transform
cy.get(`#_selection_column_${TRANSFORM_ID}-checkbox`).check({
force: true,
});
cy.get(`[data-test-subj="disableButton"]`).click({ force: true });
cy.contains(`"${TRANSFORM_ID}" is disabled`);

// Select checkbox for our transform job
cy.get(`#_selection_column_${TRANSFORM_ID}-checkbox`).check({
force: true,
});

// Click on Actions popover menu
cy.get(`[data-test-subj="actionButton"]`).click({ force: true });

// Click Delete button
cy.get(`[data-test-subj="deleteButton"]`).click({ force: true });

// Type "delete" to confirm deletion
cy.get(`input[placeholder="delete"]`).type('delete', { force: true });

// Click the delete confirmation button in modal
cy.get(`[data-test-subj="confirmModalConfirmButton"]`).click();

// Confirm we got deleted toaster
cy.contains(`"${TRANSFORM_ID}" successfully deleted`);

// Confirm showing empty loading state
cy.contains(
'Transform jobs help you create a materialized view on top of existing data.'
);
});
});

describe('can be enabled and disabled', () => {
beforeEach(() => {
cy.createTransform(TRANSFORM_ID, sampleTransform);
Expand Down Expand Up @@ -290,4 +246,48 @@ describe('Transforms', () => {
cy.contains(`"${TRANSFORM_ID}" is enabled`);
});
});

describe('can be deleted', () => {
beforeEach(() => {
cy.createTransform(TRANSFORM_ID, sampleTransform);
cy.reload();
});

it('successfully', () => {
// Confirm we have our initial transform
cy.contains(TRANSFORM_ID);

// Disable transform
cy.get(`#_selection_column_${TRANSFORM_ID}-checkbox`).check({
force: true,
});
cy.get(`[data-test-subj="disableButton"]`).click({ force: true });
cy.contains(`"${TRANSFORM_ID}" is disabled`);

// Select checkbox for our transform job
cy.get(`#_selection_column_${TRANSFORM_ID}-checkbox`).check({
force: true,
});

// Click on Actions popover menu
cy.get(`[data-test-subj="actionButton"]`).click({ force: true });

// Click Delete button
cy.get(`[data-test-subj="deleteButton"]`).click({ force: true });

// Type "delete" to confirm deletion
cy.get(`input[placeholder="delete"]`).type('delete', { force: true });

// Click the delete confirmation button in modal
cy.get(`[data-test-subj="confirmModalConfirmButton"]`).click();

// Confirm we got deleted toaster
cy.contains(`"${TRANSFORM_ID}" successfully deleted`);

// Confirm showing empty loading state
cy.contains(
'Transform jobs help you create a materialized view on top of existing data.'
);
});
});
});
Loading