freeCodeCamp/classroom

Error continues to happen in npm run test via GitHub CI

lloydchang opened this issue · 0 comments

Describe the bug
Error continues to happen even after #401 is merged, and #401 itself also reported the following error

To Reproduce
https://github.com/freeCodeCamp/classroom/actions/runs/5709645826/job/15468750919

Run tests
3s
Run npm run test
  npm run test
  shell: /usr/bin/bash -e {0}

> @freecodecamp/classroom@0.0.0 test
> jest .

PASS __tests__/__util__/processDashboardData.test.js
PASS __tests__/components/authButton.test.jsx
FAIL __tests__/components/dashtable_v2.test.jsx
  ● GlobalDashboardTable › renders dashtable with correct data format

    expect(received).toMatchSnapshot()

    Snapshot name: `GlobalDashboardTable renders dashtable with correct data format [1](https://github.com/freeCodeCamp/classroom/actions/runs/5709645826/job/15468750919#step:6:1)`

    - Snapshot  - 10
    + Received  + 10

    @@ -45,47 +45,47 @@
            >
              <td
                role="cell"
                style="padding: 10px; border: 1px solid grey; text-align: center; width: [2](https://github.com/freeCodeCamp/classroom/actions/runs/5709645826/job/15468750919#step:6:2)0%;"
              >
    -           student[A]@gmail.com
    +           email
              </td>
              <td
                role="cell"
                style="padding: 10px; border: 1px solid grey; text-align: center; width: 10%;"
              >
                <div
                  class="bg-red-600 h-5 w-5"
                  style="margin: auto;"
    -             title="Last completion time: 9/17/2018, 6:01:46 PM"
    +             title="Last completion time: 1/1/1970, 12:00:00 AM"
                />
              </td>
              <td
                role="cell"
                style="padding: 10px; border: 1px solid grey; text-align: center; width: 20%;"
              >
                <div>
                  <label>
    -               5
    +               0
                    /
                    6
                     
                  </label>
                  <meter
                    id="progress"
                    max="6"
                    min="0"
    -               value="5"
    +               value="0"
                  />
                </div>
              </td>
              <td
                role="cell"
                style="padding: 10px; border: 1px solid grey; text-align: center; width: 50%;"
              >
                <a
    -             href="/dashboard/v2/details/cljbqrfoa0006kohk894ym6v[3](https://github.com/freeCodeCamp/classroom/actions/runs/5709645826/job/15468750919#step:6:3)/student[A]@gmail.com"
    +             href="/dashboard/v2/details/cljbqrfoa0006kohk89[4](https://github.com/freeCodeCamp/classroom/actions/runs/5709645826/job/15468750919#step:6:5)ym6v3/email"
                >
                   
                  details
                   
                </a>
    @@ -96,47 +96,47 @@
            >
              <td
                role="cell"
                style="padding: 10px; border: 1px solid grey; text-align: center; width: 20%;"
              >
    -           student[B]@gmail.com
    +           email
              </td>
              <td
                role="cell"
                style="padding: 10px; border: 1px solid grey; text-align: center; width: 10%;"
              >
                <div
                  class="bg-red-600 h-[5](https://github.com/freeCodeCamp/classroom/actions/runs/5709645826/job/15468750919#step:6:6) w-5"
                  style="margin: auto;"
    -             title="Last completion time: 2/13/1973, 10:50:43 AM"
    +             title="Last completion time: 1/1/1970, 12:00:00 AM"
                />
              </td>
              <td
                role="cell"
                style="padding: 10px; border: 1px solid grey; text-align: center; width: 20%;"
              >
                <div>
                  <label>
    -               3
    +               0
                    /
                    [6](https://github.com/freeCodeCamp/classroom/actions/runs/5709645826/job/15468750919#step:6:7)
                     
                  </label>
                  <meter
                    id="progress"
                    max="6"
                    min="0"
    -               value="3"
    +               value="0"
                  />
                </div>
              </td>
              <td
                role="cell"
                style="padding: 10px; border: 1px solid grey; text-align: center; width: 50%;"
              >
                <a
    -             href="/dashboard/v2/details/cljbqrfoa0006kohk894ym6v3/student[B]@gmail.com"
    +             href="/dashboard/v2/details/cljbqrfoa0006kohk894ym6v3/email"
                >
                   
                  details
                   
                </a>

      16 |     );
      1[7](https://github.com/freeCodeCamp/classroom/actions/runs/5709645826/job/15468750919#step:6:8) |
    > 1[8](https://github.com/freeCodeCamp/classroom/actions/runs/5709645826/job/15468750919#step:6:9) |     expect(container).toMatchSnapshot();
         |                       ^
      1[9](https://github.com/freeCodeCamp/classroom/actions/runs/5709645826/job/15468750919#step:6:10) |   });
      20 | });
      21 |

      at Object.toMatchSnapshot (__tests__/components/dashtable_v2.test.jsx:[18](https://github.com/freeCodeCamp/classroom/actions/runs/5709645826/job/15468750919#step:6:19):[23](https://github.com/freeCodeCamp/classroom/actions/runs/5709645826/job/15468750919#step:6:24))

 › 1 snapshot failed.
PASS __tests__/components/navbar.test.jsx

Snapshot Summary
 › 1 snapshot failed from 1 test suite. Inspect your code changes or run `npm test -- -u` to update them.

Test Suites: 1 failed, 3 passed, 4 total
Tests:       1 failed, 4 passed, 5 total
Snapshots:   1 failed, 1 passed, 2 total
Time:        1.9[77](https://github.com/freeCodeCamp/classroom/actions/runs/5709645826/job/15468750919#step:6:78) s
Ran all test suites matching /./i.
Error: Process completed with exit code 1.


Screenshots of error

Screen Shot 2023-07-30 at 11 38 28 PM Screen Shot 2023-07-30 at 11 36 48 PM Screen Shot 2023-07-30 at 11 36 54 PM Screen Shot 2023-07-30 at 11 36 58 PM Screen Shot 2023-07-30 at 11 37 02 PM Screen Shot 2023-07-30 at 11 37 15 PM Screen Shot 2023-07-30 at 11 37 23 PM

Expected behavior
No error.


Screenshots of no error — Expected behavior

Screen Shot 2023-07-30 at 11 53 25 PM Screen Shot 2023-07-30 at 11 53 29 PM

Additional context
This error wasn't fixed by #401