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

Need to change e2e viewer with reprex tests #5970

Closed
jonvanausdeln opened this issue Jan 13, 2025 · 3 comments
Closed

Need to change e2e viewer with reprex tests #5970

jonvanausdeln opened this issue Jan 13, 2025 · 3 comments
Assignees
Labels
area: qa infrastructure testing Unit, extension-level, and smoke tests

Comments

@jonvanausdeln
Copy link
Contributor

The viewer test using reprex is failing due to an issue in reprex.

See #5969 and tidyverse/reprex#475

We need to either skip this test until the reprex package is fixed.. or change the tests to not upload an image (the plot).

@jonvanausdeln jonvanausdeln added area: qa infrastructure testing Unit, extension-level, and smoke tests labels Jan 13, 2025
@jonvanausdeln jonvanausdeln added this to the 2025.02.0 Pre-Release milestone Jan 13, 2025
@testlabauto testlabauto self-assigned this Jan 13, 2025
@testlabauto
Copy link
Contributor

#5971

@jennybc
Copy link
Member

jennybc commented Jan 13, 2025

My impression is that this is the current R code that gets reprexed:

const rReprexScript = `reprex::reprex({
x <- rnorm(100)
plot(x, sin(x))
})`;

The plot() call ends up inadvertently testing a lot more than whether reprex viewing works in Positron. In particular, it ends up calling xfun::upload_imgur() to upload a plot to imgur.com.

Unless we have some specific intention, I'd recommend replacement with simple, deterministic code with no plot. Like, just some arithmetic! E.g.,

1:5 * 2

@testlabauto
Copy link
Contributor

Replaced with:

reprex::reprex(rbinom(3, size = 10, prob = 0.5), comment = "#;-)")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: qa infrastructure testing Unit, extension-level, and smoke tests
Projects
None yet
Development

No branches or pull requests

3 participants