Skip to content

Commit

Permalink
improve stability of e2e test (was unstable due to animation)
Browse files Browse the repository at this point in the history
displays custom text fields
  • Loading branch information
tomaskikutis committed Sep 18, 2023
1 parent b8b25d7 commit fa8367e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions e2e/client/specs/content_profile_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {workspace} from './helpers/workspace';
import {authoring} from './helpers/authoring';
import {metadata} from './helpers/metadata';
import {assertToastMsg} from './helpers/utils';
import {ECE} from '@superdesk/end-to-end-testing-helpers';

describe('Content profiles', () => {
it('creates corresponding template', () => {
Expand Down Expand Up @@ -87,12 +88,12 @@ describe('Content profiles', () => {

contentProfiles.editContentFields();

const btns = element.all(by.partialButtonText(FIELD_LABEL));
const buttons = element.all(by.partialButtonText(FIELD_LABEL));

expect(btns.filter((elem) => elem.isDisplayed()).count()).toBe(0);
browser.wait(ECE.hasElementCount(buttons, 0));

contentProfiles.openAddFieldDropdown();

expect(btns.filter((elem) => elem.isDisplayed()).count()).toBe(1);
browser.wait(ECE.hasElementCount(buttons, 1));
});
});

0 comments on commit fa8367e

Please sign in to comment.