Skip to content

Commit

Permalink
test: USERNOTICE snapshot tests (#5656)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerixyz authored Oct 19, 2024
1 parent d0b9fd0 commit dab97b3
Show file tree
Hide file tree
Showing 17 changed files with 3,369 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
- Dev: Added more tests for input completion. (#5604)
- Dev: Refactored legacy Unicode zero-width-joiner replacement. (#5594)
- Dev: The JSON output when copying a message (<kbd>SHIFT</kbd> + right-click) is now more extensive. (#5600)
- Dev: Added more tests for message building. (#5598, #5654)
- Dev: Added more tests for message building. (#5598, #5654, #5656)
- Dev: Twitch messages are now sent using Twitch's Helix API instead of IRC by default. (#5607)
- Dev: `GIFTimer` is no longer initialized in tests. (#5608)
- Dev: Emojis now use flags instead of a set of strings for capabilities. (#5616)
Expand Down
255 changes: 255 additions & 0 deletions tests/snapshots/IrcMessageHandler/announcement.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@
{
"input": "@badge-info=subscriber/47;badges=broadcaster/1,subscriber/3012,twitchconAmsterdam2020/1;color=#FF0000;display-name=Supinic;emotes=;flags=;id=8c26e1ab-b50c-4d9d-bc11-3fd57a941d90;login=supinic;mod=0;msg-id=announcement;msg-param-color=PRIMARY;room-id=11148817;subscriber=1;system-msg=;tmi-sent-ts=1648762219962;user-id=31400525;user-type= :tmi.twitch.tv USERNOTICE #pajlada :mm test lol",
"output": [
{
"badgeInfos": {
"subscriber": "47"
},
"badges": [
"broadcaster",
"subscriber",
"twitchconAmsterdam2020"
],
"channelName": "pajlada",
"count": 1,
"displayName": "Supinic",
"elements": [
{
"color": "System",
"flags": "ChannelName",
"link": {
"type": "JumpToChannel",
"value": "pajlada"
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": true,
"type": "TextElement",
"words": [
"#pajlada"
]
},
{
"element": {
"color": "System",
"flags": "Timestamp",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": true,
"type": "TextElement",
"words": [
"21:30"
]
},
"flags": "Timestamp",
"format": "",
"link": {
"type": "None",
"value": ""
},
"time": "21:30:19",
"tooltip": "",
"trailingSpace": true,
"type": "TimestampElement"
},
{
"flags": "ModeratorTools",
"link": {
"type": "None",
"value": ""
},
"tooltip": "",
"trailingSpace": true,
"type": "TwitchModerationElement"
},
{
"emote": {
"images": {
"1x": "https://static-cdn.jtvnw.net/badges/v1/5527c58c-fb7d-422d-b71b-f309dcb85cc1/1",
"2x": "https://static-cdn.jtvnw.net/badges/v1/5527c58c-fb7d-422d-b71b-f309dcb85cc1/2",
"3x": "https://static-cdn.jtvnw.net/badges/v1/5527c58c-fb7d-422d-b71b-f309dcb85cc1/3"
},
"name": "",
"tooltip": "Broadcaster"
},
"flags": "BadgeChannelAuthority",
"link": {
"type": "None",
"value": ""
},
"tooltip": "Broadcaster",
"trailingSpace": true,
"type": "BadgeElement"
},
{
"emote": {
"homePage": "https://www.twitchcon.com/amsterdam/?utm_source=twitch-chat&utm_medium=badge&utm_campaign=tcamsterdam20",
"images": {
"1x": "https://static-cdn.jtvnw.net/badges/v1/ed917c9a-1a45-4340-9c64-ca8be4348c51/1",
"2x": "https://static-cdn.jtvnw.net/badges/v1/ed917c9a-1a45-4340-9c64-ca8be4348c51/2",
"3x": "https://static-cdn.jtvnw.net/badges/v1/ed917c9a-1a45-4340-9c64-ca8be4348c51/3"
},
"name": "",
"tooltip": "TwitchCon 2020 - Amsterdam"
},
"flags": "BadgeVanity",
"link": {
"type": "None",
"value": ""
},
"tooltip": "TwitchCon 2020 - Amsterdam",
"trailingSpace": true,
"type": "BadgeElement"
},
{
"color": "#ffff0000",
"flags": "Username",
"link": {
"type": "UserInfo",
"value": "Supinic"
},
"style": "ChatMediumBold",
"tooltip": "",
"trailingSpace": true,
"type": "TextElement",
"words": [
"Supinic:"
]
},
{
"color": "Text",
"flags": "Text",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": true,
"type": "TextElement",
"words": [
"mm"
]
},
{
"color": "Text",
"flags": "Text",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": true,
"type": "TextElement",
"words": [
"test"
]
},
{
"color": "Text",
"flags": "Text",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": true,
"type": "TextElement",
"words": [
"lol"
]
},
{
"background": "#ffa0a0a4",
"flags": "ReplyButton",
"link": {
"type": "ReplyToMessage",
"value": "8c26e1ab-b50c-4d9d-bc11-3fd57a941d90"
},
"padding": 2,
"tooltip": "",
"trailingSpace": true,
"type": "CircularImageElement",
"url": ""
}
],
"flags": "Collapsed|Subscription",
"id": "8c26e1ab-b50c-4d9d-bc11-3fd57a941d90",
"localizedName": "",
"loginName": "supinic",
"messageText": "mm test lol",
"searchText": "supinic supinic: mm test lol ",
"serverReceivedTime": "2022-03-31T21:30:19Z",
"timeoutUser": "",
"usernameColor": "#ffff0000"
},
{
"badgeInfos": {
},
"badges": [
],
"channelName": "",
"count": 1,
"displayName": "",
"elements": [
{
"element": {
"color": "System",
"flags": "Timestamp",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": true,
"type": "TextElement",
"words": [
"21:30"
]
},
"flags": "Timestamp",
"format": "",
"link": {
"type": "None",
"value": ""
},
"time": "21:30:19",
"tooltip": "",
"trailingSpace": true,
"type": "TimestampElement"
},
{
"color": "System",
"flags": "Text",
"link": {
"type": "None",
"value": ""
},
"style": "ChatMedium",
"tooltip": "",
"trailingSpace": true,
"type": "TextElement",
"words": [
"Announcement"
]
}
],
"flags": "System|DoNotTriggerNotification|Subscription",
"id": "",
"localizedName": "",
"loginName": "",
"messageText": "Announcement",
"searchText": "Announcement",
"serverReceivedTime": "",
"timeoutUser": "",
"usernameColor": "#ff000000"
}
]
}
Loading

0 comments on commit dab97b3

Please sign in to comment.