package callstest import ( "encoding/json" "net/http" "net/url" "regexp" "strconv" "strings" "testing" "time" ) var sqidInPage = regexp.MustCompile(`/m/([23456789a-z]{10})`) // Renamed from TestRoomPageIsScriptlessHonestAndStandingGated: the // standing gate is not tested here and never was — fix round 1's // Important 1 moved it to // TestRoomAndTakeoverAreGatedByStandingOrParticipation, which has a real // second meeting to check it against. What is left is what this test // actually asserts. func TestRoomPageRendersItsHeaderStandingAndScriptlessFallback(t *testing.T) { x, sqid, _ := memberWithMeeting(t) c := x.browser(t) c.signIn("paul@example.com") rec := c.get("/m/" + sqid) body := rec.Body.String() if rec.Code != http.StatusOK || !strings.Contains(body, "Board meeting") || !strings.Contains(body, `data-sqid="`+sqid+`"`) || !strings.Contains(body, "/m/"+sqid+"/join") { t.Fatalf("room page: %d\n%s", rec.Code, body) } if !strings.Contains(body, "