check tooltip in organization functional test

This commit is contained in:
Jake McDermott 2018-11-18 21:33:26 -05:00
parent 9111948959
commit de96f6cf8a
No known key found for this signature in database
GPG Key ID: 9A6F084352C3A0B7

View File

@ -78,4 +78,13 @@ describe('<Organizations />', () => {
test('API Organization endpoint is valid', () => {
expect(API_ORGANIZATIONS).toBeDefined();
});
test('it displays a tooltip on delete hover', () => {
const tooltip = '.pf-c-tooltip__content';
const deleteButton = 'button[aria-label="Delete"]';
expect(pageWrapper.find(tooltip).length).toBe(0);
pageWrapper.find(deleteButton).simulate('mouseover');
expect(pageWrapper.find(tooltip).length).toBe(1);
});
});