From 49df0bb00fe50fcc8fe4ba4c4e716cfc19ed2a0b Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Mon, 25 Nov 2024 14:35:44 -0500 Subject: cmd/golangorg/testdatascreentest: fix learn test Remove the Go version HTML from the screenshot so the test will pass. The version mismatch is an artifact of the test setup. Also, have screentest warn about using eval with quoted expressions. I was doing this and couldn't understand why my fix to the learn test wasn't working. Lastly, describe how we could add a feature that shows the result of evaluating each expression. My buggy version of this feature helped me diagnose the above problem, but a proper implementation is harder and not worth it now. Change-Id: I411717cd2aafab97193082a392bcd792bd3c7534 Reviewed-on: https://go-review.googlesource.com/c/website/+/631715 Reviewed-by: Hyang-Ah Hana Kim LUCI-TryBot-Result: Go LUCI --- cmd/golangorg/testdata/screentest/godev.txt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'cmd/golangorg') diff --git a/cmd/golangorg/testdata/screentest/godev.txt b/cmd/golangorg/testdata/screentest/godev.txt index ddba5efb..28fad371 100644 --- a/cmd/golangorg/testdata/screentest/godev.txt +++ b/cmd/golangorg/testdata/screentest/godev.txt @@ -20,14 +20,13 @@ path /solutions/use-cases capture fullscreen capture fullscreen 540x1080 -# This test will fail because the local server -# uses fake download information, so the download button -# will have a different Go version. -# -# test getting started -# path /learn/ -# capture fullscreen -# capture fullscreen 540x1080 +test getting started +path /learn/ +# The local server uses fake download information, so the download button +# will have a different Go version. Remove it. +eval document.querySelector("div.js-latestGoVersion").remove(); +capture fullscreen +capture fullscreen 540x1080 test docs path /doc/ -- cgit v1.3