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

Intermittent test failure: should log error and show the 'Failed to copy slug' tooltip when copy fails #11490

Open
jaredlockhart opened this issue Oct 7, 2024 · 0 comments

Comments

@jaredlockhart
Copy link
Collaborator

jaredlockhart commented Oct 7, 2024

Seen locally

FAIL src/components/CopyToClipboardButton/index.test.tsx (8.176s)
   CopyToClipboardButton  should log error and show the 'Failed to copy slug' tooltip when copy fails

    expect(element).not.toBeInTheDocument()

    expected document not to contain element, found <div class="tooltip-inner">Failed to copy slug</div> instead

      63 |     await new Promise((resolve) => setTimeout(resolve, 3000));
      64 |
    > 65 |     expect(screen.queryByText("Failed to copy slug")).not.toBeInTheDocument();
         |                                                           ^
      66 |
      67 |     expect(consoleSpy).toHaveBeenCalledWith(new Error("Failed to copy slug"));
      68 |

      at Object.<anonymous> (src/components/CopyToClipboardButton/index.test.tsx:65:59)
      at runNextTicks (node:internal/process/task_queues:61:5)
      at processTimers (node:internal/timers:499:9)

┆Issue is synchronized with this Jira Task

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

No branches or pull requests

1 participant