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
Merged

auto login for nanrui #360

merged 2 commits into from
Apr 25, 2024

Conversation

sjjian
Copy link
Member

@sjjian sjjian commented Apr 24, 2024

No description provided.

Copy link

github-actions bot commented Apr 24, 2024

Coverage report

Caution

Test run failed

St.
Category Percentage Covered / Total
🟢 Statements
88.48% (+0% 🔼)
7148/8079
🟡 Branches 67.76% 2448/3613
🟢 Functions
87.26% (+0% 🔼)
2273/2605
🟢 Lines
88.55% (+0% 🔼)
7037/7947

Test suite run failed

Failed tests: 4/943. Failed suites: 2/278.
  ● 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)

Report generated by 🧪jest coverage report action from 00c236c

src/App.tsx Show resolved Hide resolved
Co-authored-by: LZS911 <[email protected]>
@sjjian sjjian merged commit b56632b into temporary/nan-rui Apr 25, 2024
2 of 4 checks passed
@sjjian sjjian deleted the auto-login-nanrui branch April 25, 2024 07:23
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.

2 participants