Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto login for nanrui #360

Merged
merged 2 commits into from
Apr 25, 2024

Update src/App.tsx

00c236c
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

auto login for nanrui #360

Update src/App.tsx
00c236c
Select commit
Loading
Failed to load commit list.
GitHub Actions / Tests annotations (🧪 jest-coverage-report-action) failed Apr 24, 2024 in 0s

Test suite run failed

Failed tests: 4/943. Failed suites: 2/278.

Details

Created failed tests' annotations. To disable them, see documentation.

  ● App test › should get user info when token is not empty

    expect(jest.fn()).toBeCalledTimes(expected)

    Expected number of calls: 5
    Received number of calls: 6

      215 |     await act(async () => jest.advanceTimersByTime(3000));
      216 |
    > 217 |     expect(scopeDispatch).toBeCalledTimes(5);
          |                           ^
      218 |     expect(scopeDispatch.mock.calls[2][0]).toEqual({
      219 |       payload: {
      220 |         bindProjects: mockBindProjects,

      at Object.<anonymous> (src/App.test.tsx:217:27)

  ● App test › should dispatch "updateWebTitleAndLog" action and set document title after getting sqle data from the request

    expect(jest.fn()).toBeCalledTimes(expected)

    Expected number of calls: 5
    Received number of calls: 6

      308 |
      309 |     expect(document.title).toBe('SQLE');
    > 310 |     expect(scopeDispatch).toBeCalledTimes(5);
          |                           ^
      311 |     expect(scopeDispatch).toBeCalledWith({
      312 |       payload: {
      313 |         webLogoUrl: 'test',

      at Object.<anonymous> (src/App.test.tsx:310:27)

  ● App test › should not get user info when token is empty

    expect(jest.fn()).not.toBeCalled()

    Expected number of calls: 0
    Received number of calls: 1

    1: {"payload": {"token": ""}, "type": "user/updateToken"}

      356 |     await act(async () => jest.advanceTimersByTime(0));
      357 |
    > 358 |     expect(scopeDispatch).not.toBeCalled();
          |                               ^
      359 |     expect(getUserSpy).not.toBeCalled();
      360 |   });
      361 | });

      at Object.<anonymous> (src/App.test.tsx:358:31)


  ● test Nav/Header/Modal › should match snapshot

    expect(received).toMatchSnapshot()

    Snapshot name: `test Nav/Header/Modal should match snapshot 1`

    - Snapshot  - 1
    + Received  + 1

    @@ -88,11 +88,11 @@
                      >
                        <h5
                          class="ant-typography"
                        >
                          UI Version: 
    -                     feature/issue-110   72a0e52
    +                     temporary/nan-rui   6fe2ee16
                        </h5>
                      </div>
                      <div
                        class="ant-space-item"
                        style="margin-bottom: 8px;"

      69 |     await act(async () => jest.advanceTimersByTime(3000));
      70 |
    > 71 |     expect(baseElement).toMatchSnapshot();
         |                         ^
      72 |   });
      73 |
      74 |   test('should init modal status when the modal was first rendered', () => {

      at Object.<anonymous> (src/components/Nav/Header/Modal/index.test.tsx:71:25)

Annotations

Check failure on line 192 in src/App.test.tsx

See this annotation in the file changed.

@github-actions github-actions / Tests annotations (🧪 jest-coverage-report-action)

App test > should get user info when token is not empty

Error: expect(jest.fn()).toBeCalledTimes(expected)

Expected number of calls: 5
Received number of calls: 6
    at Object.<anonymous> (/home/runner/work/sqle-ui/sqle-ui/src/App.test.tsx:217:27)

Check failure on line 291 in src/App.test.tsx

See this annotation in the file changed.

@github-actions github-actions / Tests annotations (🧪 jest-coverage-report-action)

App test > should dispatch "updateWebTitleAndLog" action and set document title after getting sqle data from the request

Error: expect(jest.fn()).toBeCalledTimes(expected)

Expected number of calls: 5
Received number of calls: 6
    at Object.<anonymous> (/home/runner/work/sqle-ui/sqle-ui/src/App.test.tsx:310:27)

Check failure on line 341 in src/App.test.tsx

See this annotation in the file changed.

@github-actions github-actions / Tests annotations (🧪 jest-coverage-report-action)

App test > should not get user info when token is empty

Error: expect(jest.fn()).not.toBeCalled()

Expected number of calls: 0
Received number of calls: 1

1: {"payload": {"token": ""}, "type": "user/updateToken"}
    at Object.<anonymous> (/home/runner/work/sqle-ui/sqle-ui/src/App.test.tsx:358:31)

Check failure on line 66 in src/components/Nav/Header/Modal/index.test.tsx

See this annotation in the file changed.

@github-actions github-actions / Tests annotations (🧪 jest-coverage-report-action)

test Nav/Header/Modal > should match snapshot

Error: expect(received).toMatchSnapshot()

Snapshot name: `test Nav/Header/Modal should match snapshot 1`

- Snapshot  - 1
+ Received  + 1

@@ -88,11 +88,11 @@
                  >
                    <h5
                      class="ant-typography"
                    >
                      UI Version: 
-                     feature/issue-110   72a0e52
+                     temporary/nan-rui   6fe2ee16
                    </h5>
                  </div>
                  <div
                    class="ant-space-item"
                    style="margin-bottom: 8px;"
    at Object.<anonymous> (/home/runner/work/sqle-ui/sqle-ui/src/components/Nav/Header/Modal/index.test.tsx:71:25)