Skip to content

Commit

Permalink
added test to assert that form wizard blocks on validation for not fo…
Browse files Browse the repository at this point in the history
…und repo
  • Loading branch information
jloleysens committed Sep 8, 2020
1 parent dcf611d commit 71b86d7
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ describe('<PolicyEdit />', () => {
// The select should be an empty string to allow users to select a new repository
expect(find('repositorySelect').props().value).toBe('');
});

describe('validation', () => {
test('should block navigating to next step', () => {
const { exists, find, actions } = testBed;
actions.clickNextButton();
// Assert that we are still on the repository configuration step
expect(exists('repositoryNotFoundWarning')).toBe(true);
// The select should be an empty string to allow users to select a new repository
expect(find('repositorySelect').props().value).toBe('');
});
});
});

/**
Expand Down

0 comments on commit 71b86d7

Please sign in to comment.