Skip to content

Commit

Permalink
Trying to fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
adcoelho committed Nov 9, 2023
1 parent 8f6175f commit 6d2e135
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions x-pack/test/functional/services/cases/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,11 @@ export function CasesTableServiceProvider(

async openColumnsPopover() {
await testSubjects.click('column-selection-popover-button');
await testSubjects.existOrFail('column-selection-popover-drag-drop-context');
},

async closeColumnsPopover() {
await testSubjects.click('column-selection-popover-button');
},

async toggleColumnInPopover(columnId: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,6 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
describe('Column Selection', () => {
afterEach(async () => {
await toasts.dismissAllToastsWithChecks();

// closes the popover
await browser.pressKeys(browser.keys.ESCAPE);
});

before(async () => {
Expand Down Expand Up @@ -702,6 +699,8 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {

await testSubjects.click('column-selection-popover-hide-all-button');

await cases.casesTable.closeColumnsPopover();

expect(await cases.casesTable.hasColumn('Name')).to.be(false);
expect(await cases.casesTable.hasColumn('Assignees')).to.be(false);
expect(await cases.casesTable.hasColumn('Tags')).to.be(false);
Expand All @@ -713,6 +712,8 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {

await testSubjects.click('column-selection-popover-show-all-button');

await cases.casesTable.closeColumnsPopover();

expect(await cases.casesTable.hasColumn('Name')).to.be(true);
expect(await cases.casesTable.hasColumn('Assignees')).to.be(true);
expect(await cases.casesTable.hasColumn('Tags')).to.be(true);
Expand Down

0 comments on commit 6d2e135

Please sign in to comment.