Skip to content

Conversation

@diti0-dot
Copy link
Contributor

What is the goal of this PR and why is this important?

Tests to ensure that facilitators can successfully download assets from both the dashboard and resources index page, verifying the core download workflow works as expected.

How did you approach the change?

Followed previous patterns and created fixtures to simulate adding media that would be downloaded.

Anything else to add?

  1. I created the fixtures folder for this test. I don't know if there are other ways to upload media. For the media I used already existing images from assests file, but I named them differently.

  2. When I use kind: "Scholarship" it gets created in the database and can be found in the console, but it doesn't show up for testing or on the website; even the search function couldn't find it.

  3. In the test I wrote #expect(page.status_code).to eq(200) which is supposed to pass, but it's not because there is an ActiveRecord error when visiting /resource/id/download, so I commented out this line along with two other checks.

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.

Add a test for: Facilitators can download resources

1 participant