classtranscribe / FrontEnd

The React + Redux Frontend for ClassTranscribe
https://classtranscribe.illinois.edu
Other
25 stars 27 forks source link

Issue #733 dont use index for keys testcases #823

Open mumbler6 opened 3 weeks ago

mumbler6 commented 3 weeks ago

Attempted to write test cases that supplement issue #733, but have errors from importing and from redux while rendering components.

harsh183 commented 3 weeks ago

Great start! Leaving a few comments for changes

harsh183 commented 3 weeks ago

@mumbler6 doing the test cases looks like it's getting quite complicated since it's dealing with redux. I think we can put these on the back burner for now to if you want spend more time focusing on something else. Feel free to fix anything from the comments and merge the other PR before wrapping up and starting on another issue.

I can try taking a crack at this in a bit too, I haven't mocked anything redux level yet, so it might take a while to do the initial setup and then future tests will probably go much smoother once we've figured it out.

angrave commented 3 weeks ago

You will also want to rebase or merge in latest from staging

mumbler6 commented 3 weeks ago

LGTM. Note in INoteChapter.test.js (line 26)- there was a build failure-

'getAllByTestId' is not defined

    contents.forEach((content) => {
      expect(content).toHaveAttribute('key', `ch-content-chapter-id-1-${test_uuid}}`);
    });```

My bad, Harsh left a comment about it before. Hopefully this'll fix it. Though it looks like the test case errors are also part of the build failure.