Skip to content

Commit

Permalink
Fixed dialog test to actually test for existent (#2909)
Browse files Browse the repository at this point in the history
  • Loading branch information
nitzanyiz committed May 5, 2024
1 parent f3cc7bd commit 63bf9e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/incubator/Dialog/__tests__/index.new.spec.tsx
Expand Up @@ -89,14 +89,14 @@ describe('Incubator.Dialog sanity checks', () => {
const onDismiss = jest.fn();
const component = <TestCase2 onDismiss={onDismiss}/>;
const {dialogDriver, renderTree} = getDriver(component);
expect(dialogDriver.getModal().isVisible()).toBeFalsy();
expect(dialogDriver.exists()).toBeFalsy();
const openButtonDriver = ButtonDriver({renderTree, testID: 'openButton'});
openButtonDriver.press();
expect(dialogDriver.getModal().isVisible()).toBeTruthy();
expect(dialogDriver.exists()).toBeTruthy();
expect(onDismiss).toHaveBeenCalledTimes(0);
const closeButtonDriver = ButtonDriver({renderTree, testID: 'closeButton'});
closeButtonDriver.press();
expect(dialogDriver.getModal().isVisible()).toBeFalsy();
expect(dialogDriver.exists()).toBeFalsy();
expect(onDismiss).toHaveBeenCalledTimes(1);
});

Expand Down

0 comments on commit 63bf9e4

Please sign in to comment.