Skip to content
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

Merged
merged 2 commits into from
Mar 21, 2018
Merged

creator-tools-collab-bug #226

merged 2 commits into from
Mar 21, 2018

Conversation

eoji
Copy link
Contributor

@eoji eoji commented Mar 16, 2018

what

Collaborators were not seeing the "Select another project" button because we were checking created_projects_count and not member_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.

…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.
@eoji eoji requested a review from Scollaco March 16, 2018 18:42
@eoji
Copy link
Contributor Author

eoji commented Mar 16, 2018

Copy link
Contributor Author

@eoji eoji left a 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() {
Copy link
Contributor Author

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() {
Copy link
Contributor Author

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() {
Copy link
Contributor Author

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() {
Copy link
Contributor Author

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

@eoji eoji merged commit 1ed19cf into master Mar 21, 2018
@eoji eoji deleted the creator-tools-collab-bug branch March 21, 2018 22:17
Rcureton pushed a commit that referenced this pull request Jul 31, 2018
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants