From d625154bfa2d3c865fdb0dcaef349b475422882e Mon Sep 17 00:00:00 2001 From: Christopher Mead Date: Mon, 13 Jan 2025 12:28:51 -0700 Subject: [PATCH] e2e test: fix reprex case so as not to depend on imgur (#5971) No longer depend on image upload for basic viewer test of reprex ### QA Notes All tests should pass @:viewer --- test/e2e/tests/viewer/viewer.test.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/e2e/tests/viewer/viewer.test.ts b/test/e2e/tests/viewer/viewer.test.ts index f1762c01cd0..747900eef4a 100644 --- a/test/e2e/tests/viewer/viewer.test.ts +++ b/test/e2e/tests/viewer/viewer.test.ts @@ -65,7 +65,7 @@ test.describe('Viewer', { tag: [tags.VIEWER] }, () => { logger.log('Sending code to console'); await app.workbench.console.executeCode('R', rReprexScript, '>'); - const rnorm = app.workbench.viewer.getViewerLocator('code.sourceCode').filter({ hasText: 'x <- rnorm(100)' }); + const rnorm = app.workbench.viewer.getViewerLocator('code.sourceCode').filter({ hasText: 'rbinom' }); await rnorm.waitFor({ state: 'attached' }); @@ -90,8 +90,4 @@ modelsummary(m1)`; const rReactableScript = `library(reactable) mtcars |> reactable::reactable()`; - -const rReprexScript = `reprex::reprex({ - x <- rnorm(100) - plot(x, sin(x)) - })`; +const rReprexScript = `reprex::reprex(rbinom(3, size = 10, prob = 0.5), comment = "#;-)")`;