diff options
author | 2024-07-15 11:47:57 +0200 | |
---|---|---|
committer | 2024-07-15 10:47:57 +0100 | |
commit | 9efb11d8485f8273f7d64d46f2675a78fc41d6e8 (patch) | |
tree | c58847c1afc0d29110d06c8b6a7a24652f53dc6b /internal/typeutils/internaltofrontend_test.go | |
parent | [chore]: Bump github.com/tdewolff/minify/v2 from 2.20.34 to 2.20.37 (#3106) (diff) | |
download | gotosocial-9efb11d8485f8273f7d64d46f2675a78fc41d6e8.tar.xz |
[feature/frontend] Add player for audio files; use thumbnail for `poster` (#3099)
* [feature/frontend] Audio player for audio media types
* use video preview images for previews instead of video itself
* don't preload
* update tests for new zork status
* collapse media gallery into single row when small
Diffstat (limited to 'internal/typeutils/internaltofrontend_test.go')
-rw-r--r-- | internal/typeutils/internaltofrontend_test.go | 58 |
1 files changed, 32 insertions, 26 deletions
diff --git a/internal/typeutils/internaltofrontend_test.go b/internal/typeutils/internaltofrontend_test.go index 7bbca8ae7..6429df4fa 100644 --- a/internal/typeutils/internaltofrontend_test.go +++ b/internal/typeutils/internaltofrontend_test.go @@ -63,8 +63,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontend() { "header_description": "A very old-school screenshot of the original team fortress mod for quake", "followers_count": 2, "following_count": 2, - "statuses_count": 7, - "last_status_at": "2023-12-10T09:24:00.000Z", + "statuses_count": 8, + "last_status_at": "2024-01-10T09:24:00.000Z", "emojis": [], "fields": [], "enable_rss": true, @@ -116,8 +116,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendAliasedAndMoved() "header_description": "A very old-school screenshot of the original team fortress mod for quake", "followers_count": 2, "following_count": 2, - "statuses_count": 7, - "last_status_at": "2023-12-10T09:24:00.000Z", + "statuses_count": 8, + "last_status_at": "2024-01-10T09:24:00.000Z", "emojis": [], "fields": [], "source": { @@ -209,8 +209,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendWithEmojiStruct() "header_description": "A very old-school screenshot of the original team fortress mod for quake", "followers_count": 2, "following_count": 2, - "statuses_count": 7, - "last_status_at": "2023-12-10T09:24:00.000Z", + "statuses_count": 8, + "last_status_at": "2024-01-10T09:24:00.000Z", "emojis": [ { "shortcode": "rainbow", @@ -259,8 +259,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendWithEmojiIDs() { "header_description": "A very old-school screenshot of the original team fortress mod for quake", "followers_count": 2, "following_count": 2, - "statuses_count": 7, - "last_status_at": "2023-12-10T09:24:00.000Z", + "statuses_count": 8, + "last_status_at": "2024-01-10T09:24:00.000Z", "emojis": [ { "shortcode": "rainbow", @@ -305,8 +305,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendSensitive() { "header_description": "A very old-school screenshot of the original team fortress mod for quake", "followers_count": 2, "following_count": 2, - "statuses_count": 7, - "last_status_at": "2023-12-10T09:24:00.000Z", + "statuses_count": 8, + "last_status_at": "2024-01-10T09:24:00.000Z", "emojis": [], "fields": [], "source": { @@ -943,6 +943,18 @@ func (suite *InternalToFrontendTestSuite) TestStatusToWebStatus() { "emojis": [], "fields": [] }, + "mentions": [ + { + "id": "01F8MH17FWEB39HZJ76B6VXSKF", + "username": "admin", + "url": "http://localhost:8080/@admin", + "acct": "admin" + } + ], + "tags": [], + "emojis": [], + "card": null, + "poll": null, "media_attachments": [ { "id": "01HE7Y3C432WRSNS10EZM86SA5", @@ -971,7 +983,9 @@ func (suite *InternalToFrontendTestSuite) TestStatusToWebStatus() { } }, "description": "Photograph of a sloth, Public Domain.", - "blurhash": "LNEC{|w}0K9GsEtPM|j[NFbHoeof" + "blurhash": "LNEC{|w}0K9GsEtPM|j[NFbHoeof", + "Sensitive": true, + "MIMEType": "image/jpg" }, { "id": "01HE7ZFX9GKA5ZZVD4FACABSS9", @@ -983,7 +997,9 @@ func (suite *InternalToFrontendTestSuite) TestStatusToWebStatus() { "preview_remote_url": null, "meta": null, "description": "SVG line art of a sloth, public domain", - "blurhash": "L26*j+~qE1RP?wxut7ofRlM{R*of" + "blurhash": "L26*j+~qE1RP?wxut7ofRlM{R*of", + "Sensitive": true, + "MIMEType": "image/svg" }, { "id": "01HE88YG74PVAB81PX2XA9F3FG", @@ -995,21 +1011,11 @@ func (suite *InternalToFrontendTestSuite) TestStatusToWebStatus() { "preview_remote_url": null, "meta": null, "description": "Jolly salsa song, public domain.", - "blurhash": null + "blurhash": null, + "Sensitive": true, + "MIMEType": "audio/mpeg" } ], - "mentions": [ - { - "id": "01F8MH17FWEB39HZJ76B6VXSKF", - "username": "admin", - "url": "http://localhost:8080/@admin", - "acct": "admin" - } - ], - "tags": [], - "emojis": [], - "card": null, - "poll": null, "LanguageTag": "en", "PollOptions": null, "Local": false, @@ -1249,7 +1255,7 @@ func (suite *InternalToFrontendTestSuite) TestInstanceV1ToFrontend() { }, "stats": { "domain_count": 2, - "status_count": 19, + "status_count": 20, "user_count": 4 }, "thumbnail": "http://localhost:8080/assets/logo.png", |