cat / 012
clone

a spreadsheet for the terminal: lotus 1-2-3 looks, google sheets keys and formulas, one go binary

View test: its variables are outside O12_, which names options

Dami committed c8b191b
commit
c8b191b00fe4ef574fcd2c7150033c9f320da46f
parent
17c7f50e27294767e6f0890e1c8ba41e203ba2cd
author
Dami <dami.etoile@gmail.com>
kind
test risk score 1.4 of 3, Jev's estimate
2 files changed, +7 -7
Mdocs/contributing/testing.md4++--
Minternal/mcp/views_browser_test.go10+++++-----
M docs/contributing/testing.md +2 -2
M internal/mcp/views_browser_test.go +5 -5
@@ -19,9 +19,9 @@ import (
1919 // MCP Apps hosts do, in Chromium through Playwright (testdata/view.mjs),2020 // and checks the grid, the pointer and formula bar, scrolling, the2121 // theme and the frame's height. It needs Node and the playwright22-// package, found through O12_PLAYWRIGHT (a folder whose node_modules22+// package, found through PLAYWRIGHT_DIR (a folder whose node_modules2323 // holds it) or NODE_PATH, and is skipped without them.24-// O12_VIEW_SHOTS names a folder for screenshots of each case.24+// VIEW_SHOTS names a folder for screenshots of each case.2525 func TestViewInBrowser(t *testing.T) {2626 if testing.Short() {2727 t.Skip("-short")
@@ -63,7 +63,7 @@ func TestViewInBrowser(t *testing.T) {
6363 t.Fatal(err)6464 }6565 args := []string{filepath.Join("testdata", "view.mjs"), file}66- if shots := os.Getenv("O12_VIEW_SHOTS"); shots != "" {66+ if shots := os.Getenv("VIEW_SHOTS"); shots != "" {6767 args = append(args, shots)6868 }6969 cmd := exec.Command("node", args...)
@@ -86,7 +86,7 @@ func playwrightPath(t *testing.T) string {
8686 t.Skip("no node")8787 }8888 var dirs []string89- if d := os.Getenv("O12_PLAYWRIGHT"); d != "" {89+ if d := os.Getenv("PLAYWRIGHT_DIR"); d != "" {9090 dirs = append(dirs, filepath.Join(d, "node_modules"), d)9191 }9292 if d := os.Getenv("NODE_PATH"); d != "" {
@@ -96,7 +96,7 @@ func playwrightPath(t *testing.T) string {
9696 cmd := exec.Command("node", "-e", "require('playwright')")9797 cmd.Env = append(os.Environ(), "NODE_PATH="+nodePath)9898 if err := cmd.Run(); err != nil {99- t.Skip("no playwright package: set O12_PLAYWRIGHT to a folder whose node_modules holds it")99+ t.Skip("no playwright package: set PLAYWRIGHT_DIR to a folder whose node_modules holds it")100100 }101101 return nodePath102102 }