Files
magpie/internal/provider/stepfun_logo_test.go
T
yetone 6acf5ee5c3 providers: StepFun's logo is the current mark, five squares in a circle (zzstar101 on X)
magpie drew StepFun's old stepped-S in blue. StepFun's own sources show
the new mark: stepfun.com's favicon (step_favicon.svg), the Hugging Face
org avatar of stepfun-ai (the step-5-preview card), and lobe-icons'
`stepfun` (mono). lobe's `stepfun-color` is still the old mark, so there is
no colour one to take; the mark is one tone, so it is stored as the mono
icons are (icons/stepfun.svg, currentColor, drawn as a mask that follows
light and dark). The presets (StepFun, StepFun China), the "step" model-maker
rule (IconForCatalog's table) and Step Code use "stepfun". A provider saved
with "stepfun-color" keeps working: that file now holds the same new mark
in black, which the one-tone check draws as a mask too.

Run (mote): go test of internal/provider and internal/agent ok; go test
-tags nogui ./internal/gui ok; GUI files stepfun-per-provider, icon-one-tone,
mono-icon-redraw, models-add-and-icons, icon-tile, nav-sub-icons ok in
chromium and webkit; a screenshot of the Providers list in chromium and
webkit, light and dark, shows the new mark for both icon names.
usage-cards-hide's "de 560" sideways scroll is red in chromium and
webkit, and the same on origin/main aa744b9ed without this change
(#6294). Broken by hand: the old mark in stepfun.svg makes
TestStepFunLogoIsTheCurrentMark red.
Not tried: the Linux WebKitGTK window; the full suite before the tag.
2026-11-13 00:11:37 +08:00

30 lines
860 B
Go

package provider
import (
"os"
"strings"
"testing"
)
// StepFun's mark is the five squares in a circle (stepfun.com's favicon,
// its Hugging Face avatar, lobe-icons' StepFun). The old stepped-S with a
// blue gradient must not come back under either file name a provider can
// still carry (zzstar101 on X).
func TestStepFunLogoIsTheCurrentMark(t *testing.T) {
for _, name := range []string{"stepfun.svg", "stepfun-color.svg"} {
b, err := os.ReadFile("../gui/assets/icons/" + name)
if err != nil {
t.Fatal(err)
}
s := string(b)
if !strings.Contains(s, "M12 0C5.372 0 0 5.372 0 12") || strings.Contains(s, "linearGradient") {
t.Errorf("%s is not StepFun's current mark", name)
}
}
for _, p := range Presets() {
if strings.HasPrefix(p.ID, "stepfun") && p.Icon != "stepfun" {
t.Errorf("preset %s icon = %q", p.ID, p.Icon)
}
}
}