classroom icon indicating copy to clipboard operation
classroom copied to clipboard

Refactor page content into components

Open GuillermoFloresV opened this issue 1 year ago • 0 comments

Describe the issue When running tests, we need to be able to test them independently. Currently, when we are running tests to render a page we need to check if a session exists which is not what the test is for. Because of this, we should make a component for our main content on each page where you don't need to log in to view the content (index, join, etc) since they should all independently be able to render without a session.

To Reproduce Steps to reproduce the behavior:

  1. Go to /pages tests.
  2. Delete the mock session inside the test
  3. The test will fail due to a lack of a session even though we only want to render some HTML.

Expected behavior Pages should be able to render correctly regardless of if a session exists or not. Making components should allow us to do this since it gives us greater control over what we can test by making everything independent.

GuillermoFloresV avatar Mar 26 '23 19:03 GuillermoFloresV