Skip to content

Commit

Permalink
Prepare tests for isolation
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <[email protected]>
  • Loading branch information
AMoo-Miki committed Jan 14, 2025
1 parent d1b8946 commit 08bc81f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,6 @@ ifEnabled(['WORKSPACE', '!SECURITY']).describe('filter for value spec', () => {
});
});

beforeEach(() => {
cy.navigateToWorkSpaceSpecificPage({
url: BASE_PATH,
workspaceName: `${workspace}`,
page: 'discover',
isEnhancement: true,
});
cy.getElementByTestId(NEW_SEARCH_BUTTON).click();
});

after(() => {
cy.deleteWorkspaceByName(`${WORKSPACE_NAME}`);
cy.deleteDataSourceByName(`${DATASOURCE_NAME}`);
Expand All @@ -247,6 +237,17 @@ ifEnabled(['WORKSPACE', '!SECURITY']).describe('filter for value spec', () => {
describe(`filter actions in ${name}`, () => {
Object.entries(DATASET_CONFIGS).forEach(([type, config]) => {
describe(`${type} dataset`, () => {
beforeEach(() => {
cy.navigateToWorkSpaceSpecificPage({
url: BASE_PATH,
workspaceName: `${workspace}`,
page: 'discover',
isEnhancement: true,
});
cy.reload(true);
cy.getElementByTestId(NEW_SEARCH_BUTTON).click();
});

config.languages.forEach(({ name: language, isFilterButtonsEnabled }) => {
it(`${language}`, () => {
verifyFn(type, language, isFilterButtonsEnabled);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ ifEnabled(['WORKSPACE', '!SECURITY']).describe(
dataSource: DATASOURCE_NAME,
isEnhancement: true,
});

// Go to discover page
cy.navigateToWorkSpaceSpecificPage({
workspaceName: workspace,
page: 'discover',
isEnhancement: true,
});
});

after(() => {
Expand All @@ -63,6 +56,17 @@ ifEnabled(['WORKSPACE', '!SECURITY']).describe(
});

describe('send queries', () => {
beforeEach(() => {
// Go to discover page
cy.navigateToWorkSpaceSpecificPage({
workspaceName: workspace,
page: 'discover',
isEnhancement: true,
});

cy.reload(true);
});

it('with DQL', function () {
cy.setQueryLanguage('DQL');
cy.setTopNavDate(START_TIME, END_TIME);
Expand Down

0 comments on commit 08bc81f

Please sign in to comment.