-
Notifications
You must be signed in to change notification settings - Fork 992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
creator-tools-collab-bug #226
Conversation
…with tests. Updated tests with creators so we don't miss any collaborators. Added a helper User that is a collaborator and not a creator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some renaming.
this.vm.inputs.projectAndStats(Pair.create(ProjectFactory.project(), ProjectStatsEnvelopeFactory.projectStatsEnvelope())); | ||
|
||
this.otherProjectsButtonIsGone.assertValues(true); | ||
} | ||
|
||
@Test | ||
public void testOtherProjectsButtonIsGone_WhenCreatorHasManyProjects() { | ||
final CurrentUserType creator = new MockCurrentUser(UserFactory.creator()); | ||
public void testOtherProjectsButtonIsGone_WhenCollaboratorHasManyProjects() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update test name testOtherProjectsButtonIsGone_isFalse_WhenCollaboratorHasManyProjects
public void testOtherProjectsButtonIsGone_WhenCreatorHas1Project() { | ||
final User creatorWith1Project = UserFactory.creator().toBuilder().createdProjectsCount(1).build(); | ||
final CurrentUserType creator = new MockCurrentUser(creatorWith1Project); | ||
public void testOtherProjectsButtonIsGone_WhenCollaboratorHas1Project() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update test name testOtherProjectsButtonIsGone_isTrue_WhenCollaboratorHas1Project
@@ -75,7 +75,7 @@ public void testCreatorDashboardButtonIsGone__notCreatorOrCollaborator() { | |||
} | |||
|
|||
@Test | |||
public void testCreatorDashboardButtonIsGone__isCreatorOrCollaborator() { | |||
public void testCreatorDashboardButtonIsGone__isCreator() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update test name to testCreatorDashboardButtonIsGone_isFalse_WhenCreator
@@ -88,6 +88,20 @@ public void testCreatorDashboardButtonIsGone__isCreatorOrCollaborator() { | |||
this.creatorDashboardButtonIsGone.assertValues(false); | |||
} | |||
|
|||
@Test | |||
public void testCreatorDashboardButtonIsGone__isCollaborator() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update test name to testCreatorDashboardButtonIsGone_isFalse_WhenCollaborator
* Showing more projects button for collaborators and not just creators with tests. Updated tests with creators so we don't miss any collaborators. Added a helper User that is a collaborator and not a creator.
what
Collaborators were not seeing the "Select another project" button because we were checking
created_projects_count
and notmember_projects_count
.Did an audit of where
User.creator
is used so we don't miss any collaborators.Added a helper User that is a collaborator and not a creator.
see
As a collaborator of 2 projects and no created projects, I see the "Select another project" button.
![](https://user-images.githubusercontent.com/1289295/37538730-ed444878-2927-11e8-8ed3-ed551296a95d.png)