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

fix: make deactivated projects invisible for all except sysadmin (DEV-1261) #821

Conversation

mpro7
Copy link
Collaborator

@mpro7 mpro7 commented Sep 12, 2022

resolves DEV-1261

@mpro7 mpro7 self-assigned this Sep 12, 2022
@mpro7 mpro7 marked this pull request as ready for review September 12, 2022 11:07
@mpro7 mpro7 requested a review from mdelez as a code owner September 12, 2022 11:07
@mpro7 mpro7 changed the title fix: remove deactivated projects from overview of users except sysadmin (DEV-1261) fix: make deactivated projects invisible for all except sysadmin (DEV-1261) Sep 12, 2022
@@ -168,8 +168,8 @@ describe('OverviewComponent', () => {

it('should populate project lists correctly', () => {

expect(testHostComponent.overviewComp.userProjects.length).toEqual(1);
expect(testHostComponent.overviewComp.otherProjects.length).toEqual(7);
expect(testHostComponent.overviewComp.userProjects.length).toEqual(0);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing this, I would suggest setting the status of the mocked anything project to true and then you don't need to change these numbers and you can ensure that the list of projects the user is a member of still works. You can set the status to true just after line 145.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True that, but only in this test. In the other the number need to be changed. Well written and very easy to understand tests.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the alternative

@mpro7 mpro7 requested a review from mdelez September 13, 2022 08:01
@mpro7 mpro7 merged commit 88a2cbd into main Sep 13, 2022
@mpro7 mpro7 deleted the DEV-1261-dsp-app-deactivated-projects-should-not-be-displayed-on-landing-page branch September 13, 2022 08:38
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