Skip to content

Featured Program list#136

Merged
cabarnes merged 12 commits intoalphafrom
featured-program-list
Jan 24, 2020
Merged

Featured Program list#136
cabarnes merged 12 commits intoalphafrom
featured-program-list

Conversation

@hbradio
Copy link
Copy Markdown
Contributor

@hbradio hbradio commented Jan 24, 2020

Adds a "Featured Program" list to the programs page.

@hbradio hbradio requested a review from cabarnes January 24, 2020 03:43
@hbradio hbradio self-assigned this Jan 24, 2020
}))
.then(() => fetchPrograms({
user__not: user.user_id,
}))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since a user should never be able to remove a featured program, this seems unnecessary. The same could be said for the user__not above

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point. Removing them both.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Whoops, apparently they are in fact needed!

expect(wrapper.find(ProgramCollection).exists()).toBe(true);
expect(wrapper.find(ProgramCollection).length).toBe(1);
expect(wrapper.find(ProgramCollection).length).toBe(2);
expect(wrapper.find(Loader).exists()).toBe(true);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure that these tests are really asserting the proper thing. Basically, they each pass if any Loader is present. They should be checking that there is a Loader in the specific ProgramCollection which is null for that test

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, the were a little tighter when there were only two ProgramCollections.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added a check that there's only one loader. Still not perfectly specific, but a little better.

@cabarnes cabarnes merged commit 9bbcb8a into alpha Jan 24, 2020
@cabarnes cabarnes deleted the featured-program-list branch January 24, 2020 04:09
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.

2 participants