Create more widget types
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
@@ -10,6 +10,84 @@ import (
|
||||
)
|
||||
|
||||
var expectedWidgets = []Widget{
|
||||
&TextAreaWidget{
|
||||
widget: widget{
|
||||
ID: "widget_15p7borvnnw5a",
|
||||
Kind: "textarea",
|
||||
Style: &WidgetStyle{
|
||||
HeaderColor: "#373c3f",
|
||||
BackgroundColor: "#cc5289",
|
||||
},
|
||||
},
|
||||
Name: "test title",
|
||||
Text: "test text",
|
||||
},
|
||||
|
||||
&ButtonWidget{
|
||||
widget: widget{
|
||||
ID: "widget_15paxrbiodp8v",
|
||||
Kind: "button",
|
||||
Style: &WidgetStyle{},
|
||||
},
|
||||
Name: "test text",
|
||||
Description: "test description",
|
||||
Buttons: []*WidgetButton{
|
||||
{
|
||||
Text: "test text",
|
||||
URL: "https://example.com",
|
||||
TextColor: "#ff66ac",
|
||||
FillColor: "#014980",
|
||||
StrokeColor: "#73ad34",
|
||||
HoverState: &WidgetButtonHoverState{
|
||||
Text: "test text",
|
||||
TextColor: "#000000",
|
||||
FillColor: "#00a6a5",
|
||||
StrokeColor: "#000000",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
&ImageWidget{
|
||||
widget: widget{
|
||||
ID: "widget_15p7o01nqr5tu",
|
||||
Kind: "image",
|
||||
Style: &WidgetStyle{},
|
||||
},
|
||||
Name: "test title",
|
||||
Images: []*WidgetImageLink{
|
||||
{
|
||||
URL: "https://www.redditstatic.com/image-processing.png",
|
||||
LinkURL: "https://example.com",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
&CommunityListWidget{
|
||||
widget: widget{
|
||||
ID: "widget_15p7qwb2kxc6j",
|
||||
Kind: "community-list",
|
||||
Style: &WidgetStyle{
|
||||
HeaderColor: "#ffb000",
|
||||
},
|
||||
},
|
||||
Name: "test title",
|
||||
Communities: []*WidgetCommunity{
|
||||
{
|
||||
Name: "nba",
|
||||
Subscribers: 3571840,
|
||||
Subscribed: true,
|
||||
NSFW: false,
|
||||
},
|
||||
{
|
||||
Name: "golang",
|
||||
Subscribers: 125961,
|
||||
Subscribed: true,
|
||||
NSFW: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
&SubredditRulesWidget{
|
||||
widget: widget{
|
||||
ID: "widget_rules-2uquw1",
|
||||
|
||||
Reference in New Issue
Block a user