Skip to content
quarry Artifact [df8813ad40]
Login

Artifact [df8813ad40]

Artifact df8813ad40e6c44ebb6b104e1fd15ad0f5a50262c2ce6e447254110a9be5ac9f:


package web

import (
	"strings"
	"testing"
)

func TestOpsPageShowsTheNodeID(t *testing.T) {
	var v opsView
	v.BudgetMs = 500
	v.Node = "0123456789ab"
	body := renderOps(t, v)
	i := strings.Index(body, `data-hook="node-id"`)
	if i < 0 {
		t.Fatal("FAIL: no node-id hook on the operations page")
	}
	if !strings.Contains(body[i:], "0123456789ab") {
		t.Error("FAIL: the node-id hook does not carry the id")
	}
}