diff options
| author | Jonathan Amsterdam <jba@google.com> | 2024-11-25 14:35:44 -0500 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2024-11-26 22:33:57 +0000 |
| commit | 49df0bb00fe50fcc8fe4ba4c4e716cfc19ed2a0b (patch) | |
| tree | ae05273ea7078bfd1b227f106562372195f48456 /cmd/golangorg | |
| parent | 02012f55e15d4c08941cd3b125508c2ca41ad29d (diff) | |
| download | go-x-website-49df0bb00fe50fcc8fe4ba4c4e716cfc19ed2a0b.tar.xz | |
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 <hyangah@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'cmd/golangorg')
| -rw-r--r-- | cmd/golangorg/testdata/screentest/godev.txt | 15 |
1 files changed, 7 insertions, 8 deletions
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/ |
