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

msglist-diffing tests: Debug/fix a flake with stream-subscribed status changing #5414

Closed
chrisbobbe opened this issue Jun 14, 2022 · 0 comments · Fixed by #5415
Closed

msglist-diffing tests: Debug/fix a flake with stream-subscribed status changing #5414

chrisbobbe opened this issue Jun 14, 2022 · 0 comments · Fixed by #5415

Comments

@chrisbobbe
Copy link
Contributor

19 failures under

messages -> piece descriptors -> content HTML is stable/sensible › other interesting cases (single messages)

; here's one:

FAIL src/webview/__tests__/generateInboundEventEditSequence-test.js (9.761 s)
  ● messages -> piece descriptors -> content HTML is stable/sensible › other interesting cases (single messages) › message in unsubscribed stream
    expect(received).toMatchSnapshot()
    Snapshot name: `messages -> piece descriptors -> content HTML is stable/sensible other interesting cases (single messages) message in unsubscribed stream 1`
    - Snapshot  - 2
    + Received  + 2
    @@ -1,12 +1,12 @@
      <div class="msglist-element timerow" data-msg-id="-1">
        <div class="timerow-left"></div>
        Dec 31, 1969
        <div class="timerow-right"></div>
      </div><div class="msglist-element header-wrapper header stream-header topic-header" data-msg-id="-1" data-narrow="dG9waWM6MTpleGFtcGxlIHRvcGlj">
    -   <div class="header stream-text" style="color: black;
    +   <div class="header stream-text" style="color: white;
    -               background: hsl(0, 0%, 80%)" data-narrow="c3RyZWFtOjE=">
    +               background: #123456" data-narrow="c3RyZWFtOjE=">
          # stream 1
        </div>
        <div class="topic-text">example topic</div>
        <div class="topic-date">Dec 31, 1969</div>
      </div><div class="msglist-element message message-full" id="msg--1" data-msg-id="-1" data-mute-state="shown">
      286 |     );
      287 |
    > 288 |     expect(msglistElementsDiv.innerHTML).toMatchSnapshot();
          |                                          ^
      289 |   };
      290 |
      291 |   test('HOME_NARROW', () => {
      at check (src/webview/__tests__/generateInboundEventEditSequence-test.js:288:42)
      at Object.<anonymous> (src/webview/__tests__/generateInboundEventEditSequence-test.js:434:7)

That difference in rendering points to a stream being subscribed, when the snapshot expects it to be unsubscribed. Will send a PR shortly.

chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jun 14, 2022
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jun 14, 2022
…ging

In 371e9b4, we said we preferred spreading
eg.plusReduxState.subscriptions...but I guess at that point we
didn't predict this flake.

See 932c28d for a solution to another flake that involved streams
unstably being subscribed / unsubscribed.

Fixes: zulip#5414
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 a pull request may close this issue.

1 participant