discourse-calendar/test/javascripts/helpers/event-topic-fixture.js

263 lines
7.5 KiB
JavaScript

const eventTopicFixture = {
post_stream: {
posts: [
{
id: 375,
name: null,
username: "jan",
avatar_template: "/letter_avatar_proxy/v4/letter/j/ce7236/{size}.png",
created_at: "2023-09-08T16:50:07.638Z",
raw: '[calendar weekends=true tzPicker="true" fullDay="true" showAddToCalendar="false" defaultTimezone="Europe/Lisbon"] [/calendar]',
cooked:
'\u003cdiv class="discourse-calendar-wrap"\u003e\n\u003cdiv class="discourse-calendar-header"\u003e\n\u003ch2 class="discourse-calendar-title"\u003e\u003c/h2\u003e\n\u003cspan class="discourse-calendar-timezone-wrap"\u003e\n\u003cselect class="discourse-calendar-timezone-picker"\u003e\u003c/select\u003e\n\u003c/span\u003e\n\u003c/div\u003e\n\u003cdiv class="calendar" data-calendar-type="dynamic" data-calendar-default-timezone="Europe/Lisbon" data-weekends="true" data-calendar-show-add-to-calendar="false" data-calendar-full-day="true"\u003e\u003c/div\u003e\n\u003c/div\u003e',
post_number: 1,
post_type: 1,
updated_at: "2023-09-08T16:50:07.638Z",
reply_count: 0,
reply_to_post_number: null,
quote_count: 0,
incoming_link_count: 2,
reads: 1,
readers_count: 0,
score: 10.2,
yours: true,
topic_id: 252,
topic_slug: "awesome-calendar",
display_username: null,
primary_group_name: null,
flair_name: null,
flair_url: null,
flair_bg_color: null,
flair_color: null,
flair_group_id: null,
version: 1,
can_edit: true,
can_delete: false,
can_recover: false,
can_see_hidden_post: true,
can_wiki: true,
read: true,
user_title: null,
bookmarked: false,
actions_summary: [
{ id: 3, can_act: true },
{ id: 4, can_act: true },
{ id: 8, can_act: true },
{ id: 7, can_act: true },
],
moderator: false,
admin: true,
staff: true,
user_id: 1,
hidden: false,
trust_level: 1,
deleted_at: null,
user_deleted: false,
edit_reason: null,
can_view_edit_history: true,
wiki: false,
reviewable_id: 0,
reviewable_score_count: 0,
reviewable_score_pending_count: 0,
mentioned_users: [],
calendar_details: [
{
type: "standalone",
post_number: 2,
message: "Event 1",
from: "2023-09-08T00:00:00.000Z",
to: "2023-09-08T00:00:00.000Z",
username: "jan",
recurring: null,
post_url: "/t/-/252/2",
timezone: "America/Cordoba",
},
{
type: "standalone",
post_number: 5,
message: "Event 2",
from: "2023-09-20T00:00:00.000Z",
to: "2023-09-20T00:00:00.000Z",
username: "jan",
recurring: null,
post_url: "/t/-/252/5",
timezone: "Europe/Lisbon",
},
{
type: "standalone",
post_number: 2,
message: "Cordoba",
from: "2023-09-14T00:00:00.000Z",
to: "2023-09-14T00:00:00.000Z",
username: "jan",
recurring: null,
post_url: "/t/-/252/2",
timezone: "America/Cordoba",
},
{
type: "standalone",
post_number: 4,
message: "Moscow",
from: "2023-09-17T00:00:00.000Z",
to: "2023-09-18T00:00:00.000Z",
username: "jan",
recurring: null,
post_url: "/t/-/252/3",
timezone: "Europe/Moscow",
},
{
type: "standalone",
post_number: 3,
message: "Tokyo",
from: "2023-09-20T00:00:00.000Z",
to: "2023-09-21T00:00:00.000Z",
username: "jan",
recurring: null,
post_url: "/t/-/252/4",
timezone: "Asia/Tokyo",
},
{
type: "standalone",
post_number: 5,
message: "Lisbon",
from: "2023-09-28T00:00:00.000Z",
to: "2023-09-28T00:00:00.000Z",
username: "jan",
recurring: null,
post_url: "/t/-/252/5",
timezone: "Europe/Lisbon",
},
{
type: "grouped",
from: "2023-09-04T05:00:00.000Z",
name: "Labor Day",
users: [
{
username: "gmt-5_user",
timezone: "America/Chicago",
},
{
username: "gmt-6_user",
timezone: "America/Denver",
},
{
username: "gmt-7_user",
timezone: "America/Los_Angeles",
},
],
},
],
},
],
},
timeline_lookup: [[1, 0]],
tags: [],
tags_descriptions: {},
id: 252,
title: "Awesome Calendar",
fancy_title: "Awesome Calendar",
posts_count: 5,
created_at: "2023-09-08T16:50:07.371Z",
views: 1,
reply_count: 0,
like_count: 0,
last_posted_at: "2023-09-08T16:50:52.936Z",
visible: true,
closed: false,
archived: false,
has_summary: false,
archetype: "regular",
slug: "awesome-calendar",
category_id: 5,
word_count: 56,
deleted_at: null,
user_id: 1,
featured_link: null,
pinned_globally: false,
pinned_at: null,
pinned_until: null,
image_url: null,
slow_mode_seconds: 0,
draft: null,
draft_key: "topic_252",
draft_sequence: 9,
posted: true,
unpinned: null,
pinned: false,
current_post_number: 1,
highest_post_number: 4,
last_read_post_number: 4,
last_read_post_id: 378,
deleted_by: null,
has_deleted: false,
actions_summary: [
{ id: 4, count: 0, hidden: false, can_act: true },
{ id: 8, count: 0, hidden: false, can_act: true },
{ id: 7, count: 0, hidden: false, can_act: true },
],
chunk_size: 20,
bookmarked: false,
bookmarks: [],
topic_timer: null,
message_bus_last_id: 16,
participant_count: 1,
show_read_indicator: false,
thumbnails: null,
slow_mode_enabled_until: null,
summarizable: false,
details: {
can_edit: true,
notification_level: 3,
notifications_reason_id: 1,
can_move_posts: true,
can_delete: true,
can_remove_allowed_users: true,
can_invite_to: true,
can_invite_via_email: true,
can_create_post: true,
can_reply_as_new_topic: true,
can_flag_topic: true,
can_convert_topic: true,
can_review_topic: true,
can_close_topic: true,
can_archive_topic: true,
can_split_merge_topic: true,
can_edit_staff_notes: true,
can_toggle_topic_visibility: true,
can_pin_unpin_topic: true,
can_moderate_category: true,
can_remove_self_id: 1,
participants: [
{
id: 1,
username: "jan",
name: null,
avatar_template: "/letter_avatar_proxy/v4/letter/j/ce7236/{size}.png",
post_count: 4,
primary_group_name: null,
flair_name: null,
flair_url: null,
flair_color: null,
flair_bg_color: null,
flair_group_id: null,
admin: true,
trust_level: 1,
},
],
created_by: {
id: 1,
username: "jan",
name: null,
avatar_template: "/letter_avatar_proxy/v4/letter/j/ce7236/{size}.png",
},
last_poster: {
id: 1,
username: "jan",
name: null,
avatar_template: "/letter_avatar_proxy/v4/letter/j/ce7236/{size}.png",
},
},
};
export default eventTopicFixture;