tests: prevent dynamic readme badges from rendering

Newly added "test vuln withdrawn module" displayed a dynamic badge that
was causing intermittent kokoro failures. Updated tests to prevent
dynamic badge rendering and update screenshot test.

Change-Id: I41901e2e8df5294536fea19a00b4c59c2ca0fd35
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/821240
Auto-Submit: Ethan Lee <ethanalee@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Nicholas Husin <nsh@golang.org>
Reviewed-by: Nicholas Husin <husin@google.com>
diff --git a/tests/screentest/testcases.ci.txt b/tests/screentest/testcases.ci.txt
index a9d3fcd..eef6dbb 100644
--- a/tests/screentest/testcases.ci.txt
+++ b/tests/screentest/testcases.ci.txt
@@ -1,6 +1,6 @@
 windowsize 1536x960
-# Prevent dynamic readme bages from rendering
-block https://codecov.io/* https://travis-ci.com/*
+# Prevent dynamic readme badges from rendering
+block https://codecov.io/* https://travis-ci.com/* https://travis-ci.org/* https://sourcegraph.com/*
 
 {{$ready := "[role='treeitem'][aria-selected='true']"}}
 {{$hideElements := "const s=document.createElement('style');s.innerHTML='*{transition:none!important;animation:none!important;caret-color:transparent!important}';document.head.appendChild(s);document.querySelector(\"[data-test-id='UnitHeader-importedby']\")?.remove();document.querySelector(\"[data-test-id='meta-link-depsdev']\")?.remove();document.querySelector(\"[data-test-id='meta-link-codewiki']\")?.remove();"}}
@@ -65,6 +65,7 @@
 
 test vuln withdrawn module
 path /github.com/gorilla/sessions@v1.2.1
+eval {{$hideElements}}
 capture viewport
 capture viewport 540x1080
 
diff --git a/tests/screentest/testcases.txt b/tests/screentest/testcases.txt
index 72cdfa1..d0ee143 100644
--- a/tests/screentest/testcases.txt
+++ b/tests/screentest/testcases.txt
@@ -6,7 +6,7 @@
 {{with .QuotaBypass}}header X-Go-Discovery-Auth-Bypass-Quota: {{.}}{{end}}
 
 # Prevent dynamic readme badges from rendering
-block https://codecov.io/* https://travis-ci.com/*
+block https://codecov.io/* https://travis-ci.com/* https://travis-ci.org/* https://sourcegraph.com/*
 
 # The aria-selected attribute is added by the last piece of JS to run.
 {{$ready := "[role='treeitem'][aria-selected='true']"}}
diff --git a/tests/screentest/testdata/testcases.ci/vuln-withdrawn-module-540x1080.want.png b/tests/screentest/testdata/testcases.ci/vuln-withdrawn-module-540x1080.want.png
index a861e94..fa1b94e 100644
--- a/tests/screentest/testdata/testcases.ci/vuln-withdrawn-module-540x1080.want.png
+++ b/tests/screentest/testdata/testcases.ci/vuln-withdrawn-module-540x1080.want.png
Binary files differ
diff --git a/tests/screentest/testdata/testcases.ci/vuln-withdrawn-module.want.png b/tests/screentest/testdata/testcases.ci/vuln-withdrawn-module.want.png
index 0c3c4b4..53745a0 100644
--- a/tests/screentest/testdata/testcases.ci/vuln-withdrawn-module.want.png
+++ b/tests/screentest/testdata/testcases.ci/vuln-withdrawn-module.want.png
Binary files differ