Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
scottybollinger committed Sep 9, 2020
1 parent aa672db commit c57ca47
Showing 1 changed file with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const account = {
canCreatePersonalSources: true,
groups: [],
isCurated: false,
canCreateInvitations: true,
};

describe('OnboardingSteps', () => {
Expand Down Expand Up @@ -60,9 +61,8 @@ describe('OnboardingSteps', () => {
describe('Users & Invitations', () => {
it('renders 0 users when not on federated auth', () => {
setMockValues({
canCreateInvitations: true,
isFederatedAuth: false,
fpAccount: account,
account,
accountsCount: 0,
hasUsers: false,
});
Expand All @@ -78,7 +78,7 @@ describe('OnboardingSteps', () => {
it('renders completed users state', () => {
setMockValues({
isFederatedAuth: false,
fpAccount: account,
account,
accountsCount: 1,
hasUsers: true,
});
Expand All @@ -90,14 +90,26 @@ describe('OnboardingSteps', () => {
});

it('disables link when the user cannot create invitations', () => {
setMockValues({ isFederatedAuth: false, canCreateInvitations: false });
setMockValues({
isFederatedAuth: false,
account: {
...account,
canCreateInvitations: false,
},
});
const wrapper = shallow(<OnboardingSteps />);
expect(wrapper.find(OnboardingCard).last().prop('actionPath')).toBe(undefined);
});
});

describe('Org Name', () => {
it('renders button to change name', () => {
setMockValues({
organization: {
name: 'foo',
defaultOrgName: 'foo',
},
});
const wrapper = shallow(<OnboardingSteps />);

const button = wrapper
Expand Down

0 comments on commit c57ca47

Please sign in to comment.