2022-03-28 17:24:51 +02:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
2022-04-25 21:07:46 +01:00
|
|
|
exports[`Newsletters API Can add a newsletter - and subscribe existing members 1: [body] 1`] = `
|
|
|
|
Object {
|
|
|
|
"meta": Object {
|
|
|
|
"opted_in_member_count": 6,
|
|
|
|
},
|
|
|
|
"newsletters": Array [
|
|
|
|
Object {
|
|
|
|
"body_font_category": "serif",
|
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
|
|
"name": "New newsletter with existing members subscribed",
|
|
|
|
"sender_email": null,
|
|
|
|
"sender_name": "Test",
|
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
|
|
|
"show_header_name": true,
|
|
|
|
"show_header_title": true,
|
|
|
|
"slug": "new-newsletter-with-existing-members-subscribed",
|
2022-04-28 11:16:14 +01:00
|
|
|
"sort_order": 7,
|
2022-04-25 21:07:46 +01:00
|
|
|
"status": "active",
|
|
|
|
"subscribe_on_signup": true,
|
|
|
|
"title_alignment": "center",
|
|
|
|
"title_font_category": "serif",
|
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-27 19:20:25 +05:30
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
2022-04-25 21:07:46 +01:00
|
|
|
"visibility": "members",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Newsletters API Can add a newsletter - and subscribe existing members 2: [headers] 1`] = `
|
|
|
|
Object {
|
|
|
|
"access-control-allow-origin": "http://127.0.0.1:2369",
|
|
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
2022-04-27 19:20:25 +05:30
|
|
|
"content-length": "745",
|
2022-04-25 21:07:46 +01:00
|
|
|
"content-type": "application/json; charset=utf-8",
|
|
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
|
|
"location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/newsletters\\\\/\\[a-f0-9\\]\\{24\\}\\\\//,
|
|
|
|
"vary": "Origin, Accept-Encoding",
|
2022-04-26 18:06:41 +05:30
|
|
|
"x-cache-invalidate": "/*",
|
2022-04-25 21:07:46 +01:00
|
|
|
"x-powered-by": "Express",
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2022-04-22 13:20:44 +01:00
|
|
|
exports[`Newsletters API Can add a newsletter - with custom sender_email 1: [body] 1`] = `
|
|
|
|
Object {
|
|
|
|
"meta": Object {
|
|
|
|
"sent_email_verification": Array [
|
|
|
|
"sender_email",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
"newsletters": Array [
|
|
|
|
Object {
|
|
|
|
"body_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-22 13:20:44 +01:00
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
|
|
"name": "My test newsletter with custom sender_email",
|
|
|
|
"sender_email": null,
|
|
|
|
"sender_name": "Test",
|
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
|
|
|
"show_header_name": true,
|
|
|
|
"show_header_title": true,
|
|
|
|
"slug": "my-test-newsletter-with-custom-sender_email",
|
2022-04-28 11:16:14 +01:00
|
|
|
"sort_order": 6,
|
2022-04-22 13:20:44 +01:00
|
|
|
"status": "active",
|
|
|
|
"subscribe_on_signup": true,
|
|
|
|
"title_alignment": "center",
|
|
|
|
"title_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-27 19:20:25 +05:30
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
2022-04-22 13:20:44 +01:00
|
|
|
"visibility": "members",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Newsletters API Can add a newsletter - with custom sender_email 2: [headers] 1`] = `
|
|
|
|
Object {
|
|
|
|
"access-control-allow-origin": "http://127.0.0.1:2369",
|
|
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
2022-04-27 19:20:25 +05:30
|
|
|
"content-length": "754",
|
2022-04-22 13:20:44 +01:00
|
|
|
"content-type": "application/json; charset=utf-8",
|
|
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
2022-04-25 15:14:22 +01:00
|
|
|
"location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/newsletters\\\\/\\[a-f0-9\\]\\{24\\}\\\\//,
|
2022-04-22 13:20:44 +01:00
|
|
|
"vary": "Origin, Accept-Encoding",
|
2022-04-26 18:06:41 +05:30
|
|
|
"x-cache-invalidate": "/*",
|
2022-04-22 13:20:44 +01:00
|
|
|
"x-powered-by": "Express",
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2022-04-27 10:11:16 +01:00
|
|
|
exports[`Newsletters API Can add a newsletter - with custom sender_email and subscribe existing members 1: [body] 1`] = `
|
|
|
|
Object {
|
|
|
|
"meta": Object {
|
|
|
|
"opted_in_member_count": 6,
|
|
|
|
"sent_email_verification": Array [
|
|
|
|
"sender_email",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
"newsletters": Array [
|
|
|
|
Object {
|
|
|
|
"body_font_category": "serif",
|
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
|
|
"name": "My test newsletter with custom sender_email and subscribe existing",
|
|
|
|
"sender_email": null,
|
|
|
|
"sender_name": "Test",
|
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
|
|
|
"show_header_name": true,
|
|
|
|
"show_header_title": true,
|
|
|
|
"slug": "my-test-newsletter-with-custom-sender_email-and-subscribe-existing",
|
|
|
|
"sort_order": 8,
|
|
|
|
"status": "active",
|
|
|
|
"subscribe_on_signup": true,
|
|
|
|
"title_alignment": "center",
|
|
|
|
"title_font_category": "serif",
|
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
|
|
"visibility": "members",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Newsletters API Can add a newsletter - with custom sender_email and subscribe existing members 2: [headers] 1`] = `
|
|
|
|
Object {
|
|
|
|
"access-control-allow-origin": "http://127.0.0.1:2369",
|
|
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
|
|
|
"content-length": "826",
|
|
|
|
"content-type": "application/json; charset=utf-8",
|
|
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
|
|
"location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/newsletters\\\\/\\[a-f0-9\\]\\{24\\}\\\\//,
|
|
|
|
"vary": "Origin, Accept-Encoding",
|
|
|
|
"x-cache-invalidate": "/*",
|
|
|
|
"x-powered-by": "Express",
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Newsletters API Can add a newsletter - with custom sender_email and subscribe exsiting members 1: [body] 1`] = `
|
|
|
|
Object {
|
|
|
|
"meta": Object {
|
|
|
|
"opted_in_member_count": 6,
|
|
|
|
"sent_email_verification": Array [
|
|
|
|
"sender_email",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
"newsletters": Array [
|
|
|
|
Object {
|
|
|
|
"body_font_category": "serif",
|
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
|
|
"name": "My test newsletter with custom sender_email and subscribe existing",
|
|
|
|
"sender_email": null,
|
|
|
|
"sender_name": "Test",
|
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
|
|
|
"show_header_name": true,
|
|
|
|
"show_header_title": true,
|
|
|
|
"slug": "my-test-newsletter-with-custom-sender_email-and-subscribe-existing",
|
|
|
|
"sort_order": 6,
|
|
|
|
"status": "active",
|
|
|
|
"subscribe_on_signup": true,
|
|
|
|
"title_alignment": "center",
|
|
|
|
"title_font_category": "serif",
|
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
|
|
"visibility": "members",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Newsletters API Can add a newsletter - with custom sender_email and subscribe exsiting members 2: [headers] 1`] = `
|
|
|
|
Object {
|
|
|
|
"access-control-allow-origin": "http://127.0.0.1:2369",
|
|
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
|
|
|
"content-length": "780",
|
|
|
|
"content-type": "application/json; charset=utf-8",
|
|
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
|
|
"location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/newsletters\\\\/\\[a-f0-9\\]\\{24\\}\\\\//,
|
|
|
|
"vary": "Origin, Accept-Encoding",
|
|
|
|
"x-cache-invalidate": "/*",
|
|
|
|
"x-powered-by": "Express",
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2022-03-28 17:24:51 +02:00
|
|
|
exports[`Newsletters API Can add a newsletter 1: [body] 1`] = `
|
|
|
|
Object {
|
|
|
|
"newsletters": Array [
|
|
|
|
Object {
|
2022-04-08 19:06:30 +05:30
|
|
|
"body_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-03-28 17:24:51 +02:00
|
|
|
"description": null,
|
2022-04-08 19:06:30 +05:30
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
2022-03-28 17:24:51 +02:00
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
|
|
"name": "My test newsletter",
|
2022-04-22 13:20:44 +01:00
|
|
|
"sender_email": null,
|
2022-03-28 17:24:51 +02:00
|
|
|
"sender_name": "Test",
|
2022-04-08 19:06:30 +05:30
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
2022-04-21 16:14:16 +01:00
|
|
|
"show_header_name": true,
|
2022-04-08 19:06:30 +05:30
|
|
|
"show_header_title": true,
|
|
|
|
"slug": "my-test-newsletter",
|
2022-04-25 17:18:16 +01:00
|
|
|
"sort_order": 3,
|
2022-03-28 17:24:51 +02:00
|
|
|
"status": "active",
|
|
|
|
"subscribe_on_signup": true,
|
2022-04-08 19:06:30 +05:30
|
|
|
"title_alignment": "center",
|
|
|
|
"title_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-27 19:20:25 +05:30
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
2022-04-08 19:06:30 +05:30
|
|
|
"visibility": "members",
|
2022-03-28 17:24:51 +02:00
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Newsletters API Can add a newsletter 2: [headers] 1`] = `
|
|
|
|
Object {
|
|
|
|
"access-control-allow-origin": "http://127.0.0.1:2369",
|
|
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
2022-04-27 19:20:25 +05:30
|
|
|
"content-length": "652",
|
2022-03-28 17:24:51 +02:00
|
|
|
"content-type": "application/json; charset=utf-8",
|
|
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
2022-04-25 15:14:22 +01:00
|
|
|
"location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/newsletters\\\\/\\[a-f0-9\\]\\{24\\}\\\\//,
|
2022-03-28 17:24:51 +02:00
|
|
|
"vary": "Origin, Accept-Encoding",
|
2022-04-26 18:06:41 +05:30
|
|
|
"x-cache-invalidate": "/*",
|
2022-03-28 17:24:51 +02:00
|
|
|
"x-powered-by": "Express",
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2022-04-28 11:16:14 +01:00
|
|
|
exports[`Newsletters API Can add multiple newsletters 1: [body] 1`] = `
|
|
|
|
Object {
|
|
|
|
"newsletters": Array [
|
|
|
|
Object {
|
|
|
|
"body_font_category": "sans_serif",
|
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
|
|
"name": "My first test newsletter",
|
|
|
|
"sender_email": null,
|
|
|
|
"sender_name": null,
|
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
|
|
|
"show_header_name": true,
|
|
|
|
"show_header_title": true,
|
|
|
|
"slug": "my-first-test-newsletter",
|
|
|
|
"sort_order": 4,
|
|
|
|
"status": "active",
|
|
|
|
"subscribe_on_signup": true,
|
|
|
|
"title_alignment": "center",
|
|
|
|
"title_font_category": "sans_serif",
|
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
|
|
"visibility": "members",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Newsletters API Can add multiple newsletters 2: [headers] 1`] = `
|
|
|
|
Object {
|
|
|
|
"access-control-allow-origin": "http://127.0.0.1:2369",
|
|
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
|
|
|
"content-length": "672",
|
|
|
|
"content-type": "application/json; charset=utf-8",
|
|
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
|
|
"location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/newsletters\\\\/\\[a-f0-9\\]\\{24\\}\\\\//,
|
|
|
|
"vary": "Origin, Accept-Encoding",
|
|
|
|
"x-cache-invalidate": "/*",
|
|
|
|
"x-powered-by": "Express",
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Newsletters API Can add multiple newsletters 3: [body] 1`] = `
|
|
|
|
Object {
|
|
|
|
"newsletters": Array [
|
|
|
|
Object {
|
|
|
|
"body_font_category": "sans_serif",
|
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
|
|
"name": "My second test newsletter",
|
|
|
|
"sender_email": null,
|
|
|
|
"sender_name": null,
|
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
|
|
|
"show_header_name": true,
|
|
|
|
"show_header_title": true,
|
|
|
|
"slug": "my-second-test-newsletter",
|
|
|
|
"sort_order": 5,
|
|
|
|
"status": "active",
|
|
|
|
"subscribe_on_signup": true,
|
|
|
|
"title_alignment": "center",
|
|
|
|
"title_font_category": "sans_serif",
|
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
|
|
"visibility": "members",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Newsletters API Can add multiple newsletters 4: [headers] 1`] = `
|
|
|
|
Object {
|
|
|
|
"access-control-allow-origin": "http://127.0.0.1:2369",
|
|
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
|
|
|
"content-length": "674",
|
|
|
|
"content-type": "application/json; charset=utf-8",
|
|
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
|
|
"location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/newsletters\\\\/\\[a-f0-9\\]\\{24\\}\\\\//,
|
|
|
|
"vary": "Origin, Accept-Encoding",
|
|
|
|
"x-cache-invalidate": "/*",
|
|
|
|
"x-powered-by": "Express",
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2022-03-28 17:24:51 +02:00
|
|
|
exports[`Newsletters API Can browse newsletters 1: [body] 1`] = `
|
|
|
|
Object {
|
|
|
|
"meta": Object {
|
|
|
|
"pagination": Object {
|
|
|
|
"limit": 15,
|
|
|
|
"next": null,
|
|
|
|
"page": 1,
|
|
|
|
"pages": 1,
|
|
|
|
"prev": null,
|
2022-04-25 15:14:22 +01:00
|
|
|
"total": 4,
|
2022-03-28 17:24:51 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
"newsletters": Array [
|
2022-04-12 19:44:21 +05:30
|
|
|
Object {
|
|
|
|
"body_font_category": "sans_serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-12 19:44:21 +05:30
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
|
|
"name": "Default Newsletter",
|
|
|
|
"sender_email": null,
|
2022-04-25 15:14:22 +01:00
|
|
|
"sender_name": null,
|
2022-04-22 13:20:44 +01:00
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
|
|
|
"show_header_name": true,
|
|
|
|
"show_header_title": true,
|
2022-04-25 15:14:22 +01:00
|
|
|
"slug": "default-newsletter",
|
2022-04-22 13:20:44 +01:00
|
|
|
"sort_order": 0,
|
|
|
|
"status": "active",
|
|
|
|
"subscribe_on_signup": true,
|
|
|
|
"title_alignment": "center",
|
2022-04-25 15:14:22 +01:00
|
|
|
"title_font_category": "sans_serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-27 19:20:25 +05:30
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
2022-04-22 13:20:44 +01:00
|
|
|
"visibility": "members",
|
|
|
|
},
|
2022-04-21 09:59:44 +02:00
|
|
|
Object {
|
|
|
|
"body_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-21 09:59:44 +02:00
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
|
|
"name": "Daily newsletter",
|
|
|
|
"sender_email": "jamie@example.com",
|
|
|
|
"sender_name": "Jamie",
|
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
2022-04-21 16:14:16 +01:00
|
|
|
"show_header_name": true,
|
2022-04-21 09:59:44 +02:00
|
|
|
"show_header_title": true,
|
|
|
|
"slug": "daily-newsletter",
|
|
|
|
"sort_order": 1,
|
|
|
|
"status": "active",
|
|
|
|
"subscribe_on_signup": false,
|
|
|
|
"title_alignment": "center",
|
|
|
|
"title_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-27 19:20:25 +05:30
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
2022-04-21 09:59:44 +02:00
|
|
|
"visibility": "members",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"body_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-21 09:59:44 +02:00
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
|
|
"name": "Weekly newsletter",
|
|
|
|
"sender_email": "jamie@example.com",
|
|
|
|
"sender_name": "Jamie",
|
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
2022-04-21 16:14:16 +01:00
|
|
|
"show_header_name": true,
|
2022-04-21 09:59:44 +02:00
|
|
|
"show_header_title": true,
|
|
|
|
"slug": "weekly-newsletter",
|
|
|
|
"sort_order": 2,
|
|
|
|
"status": "active",
|
|
|
|
"subscribe_on_signup": true,
|
|
|
|
"title_alignment": "center",
|
|
|
|
"title_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-27 19:20:25 +05:30
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
2022-04-21 09:59:44 +02:00
|
|
|
"visibility": "members",
|
|
|
|
},
|
2022-03-28 17:24:51 +02:00
|
|
|
Object {
|
2022-04-25 15:14:22 +01:00
|
|
|
"body_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-03-28 17:24:51 +02:00
|
|
|
"description": null,
|
2022-04-08 19:06:30 +05:30
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
2022-03-28 17:24:51 +02:00
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
2022-04-25 15:14:22 +01:00
|
|
|
"name": "Old newsletter",
|
|
|
|
"sender_email": "jamie@example.com",
|
|
|
|
"sender_name": "Jamie",
|
2022-04-08 19:06:30 +05:30
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
2022-04-21 16:14:16 +01:00
|
|
|
"show_header_name": true,
|
2022-04-08 19:06:30 +05:30
|
|
|
"show_header_title": true,
|
2022-04-25 15:14:22 +01:00
|
|
|
"slug": "old-newsletter",
|
|
|
|
"sort_order": 2,
|
2022-04-25 20:11:27 +01:00
|
|
|
"status": "archived",
|
2022-03-28 17:24:51 +02:00
|
|
|
"subscribe_on_signup": true,
|
2022-04-08 19:06:30 +05:30
|
|
|
"title_alignment": "center",
|
2022-04-25 15:14:22 +01:00
|
|
|
"title_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-27 19:20:25 +05:30
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
2022-04-08 19:06:30 +05:30
|
|
|
"visibility": "members",
|
2022-03-28 17:24:51 +02:00
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2022-04-25 15:14:22 +01:00
|
|
|
exports[`Newsletters API Can browse newsletters 2: [headers] 1`] = `
|
2022-04-21 09:59:44 +02:00
|
|
|
Object {
|
|
|
|
"access-control-allow-origin": "http://127.0.0.1:2369",
|
|
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
2022-04-27 19:20:25 +05:30
|
|
|
"content-length": "2690",
|
2022-04-21 09:59:44 +02:00
|
|
|
"content-type": "application/json; charset=utf-8",
|
|
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
|
|
"vary": "Origin, Accept-Encoding",
|
|
|
|
"x-powered-by": "Express",
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2022-04-25 15:14:22 +01:00
|
|
|
exports[`Newsletters API Can edit a newsletters and update the sender_email when already set 1: [body] 1`] = `
|
2022-04-21 09:59:44 +02:00
|
|
|
Object {
|
2022-04-22 13:20:44 +01:00
|
|
|
"meta": Object {
|
2022-04-25 15:14:22 +01:00
|
|
|
"sent_email_verification": Array [
|
|
|
|
"sender_email",
|
|
|
|
],
|
2022-04-22 13:20:44 +01:00
|
|
|
},
|
2022-04-21 09:59:44 +02:00
|
|
|
"newsletters": Array [
|
|
|
|
Object {
|
2022-04-25 15:14:22 +01:00
|
|
|
"body_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-21 09:59:44 +02:00
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
2022-04-22 13:20:44 +01:00
|
|
|
"name": "Updated newsletter name",
|
2022-04-25 15:14:22 +01:00
|
|
|
"sender_email": "jamie@example.com",
|
|
|
|
"sender_name": "Jamie",
|
2022-04-21 09:59:44 +02:00
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
2022-04-21 16:14:16 +01:00
|
|
|
"show_header_name": true,
|
2022-04-21 09:59:44 +02:00
|
|
|
"show_header_title": true,
|
2022-04-25 15:14:22 +01:00
|
|
|
"slug": "daily-newsletter",
|
|
|
|
"sort_order": 1,
|
2022-04-21 09:59:44 +02:00
|
|
|
"status": "active",
|
2022-04-25 15:14:22 +01:00
|
|
|
"subscribe_on_signup": false,
|
2022-04-21 09:59:44 +02:00
|
|
|
"title_alignment": "center",
|
2022-04-25 15:14:22 +01:00
|
|
|
"title_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-27 19:20:25 +05:30
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
2022-04-21 09:59:44 +02:00
|
|
|
"visibility": "members",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2022-04-25 15:14:22 +01:00
|
|
|
exports[`Newsletters API Can edit a newsletters and update the sender_email when already set 2: [headers] 1`] = `
|
2022-03-28 17:24:51 +02:00
|
|
|
Object {
|
|
|
|
"access-control-allow-origin": "http://127.0.0.1:2369",
|
|
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
2022-04-27 19:20:25 +05:30
|
|
|
"content-length": "724",
|
2022-03-28 17:24:51 +02:00
|
|
|
"content-type": "application/json; charset=utf-8",
|
|
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
|
|
"vary": "Origin, Accept-Encoding",
|
2022-04-26 18:06:41 +05:30
|
|
|
"x-cache-invalidate": "/*",
|
2022-03-28 17:24:51 +02:00
|
|
|
"x-powered-by": "Express",
|
|
|
|
}
|
|
|
|
`;
|
2022-04-08 19:06:30 +05:30
|
|
|
|
2022-04-25 15:14:22 +01:00
|
|
|
exports[`Newsletters API Can edit newsletters 1: [body] 1`] = `
|
2022-04-08 19:06:30 +05:30
|
|
|
Object {
|
|
|
|
"newsletters": Array [
|
|
|
|
Object {
|
2022-04-25 15:14:22 +01:00
|
|
|
"body_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-08 19:06:30 +05:30
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
2022-04-22 13:20:44 +01:00
|
|
|
"name": "Updated newsletter name",
|
2022-04-25 15:14:22 +01:00
|
|
|
"sender_email": "jamie@example.com",
|
|
|
|
"sender_name": "Jamie",
|
2022-04-08 19:06:30 +05:30
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
2022-04-22 13:20:44 +01:00
|
|
|
"show_header_name": true,
|
2022-04-08 19:06:30 +05:30
|
|
|
"show_header_title": true,
|
2022-04-25 15:14:22 +01:00
|
|
|
"slug": "daily-newsletter",
|
|
|
|
"sort_order": 1,
|
2022-04-08 19:06:30 +05:30
|
|
|
"status": "active",
|
2022-04-25 15:14:22 +01:00
|
|
|
"subscribe_on_signup": false,
|
2022-04-08 19:06:30 +05:30
|
|
|
"title_alignment": "center",
|
2022-04-25 15:14:22 +01:00
|
|
|
"title_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-27 19:20:25 +05:30
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
2022-04-22 13:20:44 +01:00
|
|
|
"visibility": "members",
|
2022-04-08 19:06:30 +05:30
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2022-04-25 15:14:22 +01:00
|
|
|
exports[`Newsletters API Can edit newsletters 2: [headers] 1`] = `
|
2022-04-08 19:06:30 +05:30
|
|
|
Object {
|
|
|
|
"access-control-allow-origin": "http://127.0.0.1:2369",
|
|
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
2022-04-27 19:20:25 +05:30
|
|
|
"content-length": "672",
|
2022-04-08 19:06:30 +05:30
|
|
|
"content-type": "application/json; charset=utf-8",
|
|
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
|
|
"vary": "Origin, Accept-Encoding",
|
2022-04-26 18:06:41 +05:30
|
|
|
"x-cache-invalidate": "/*",
|
2022-04-08 19:06:30 +05:30
|
|
|
"x-powered-by": "Express",
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2022-04-25 15:14:22 +01:00
|
|
|
exports[`Newsletters API Can include members & posts counts when browsing newsletters 1: [body] 1`] = `
|
2022-04-22 17:42:52 +02:00
|
|
|
Object {
|
|
|
|
"meta": Object {
|
|
|
|
"pagination": Object {
|
|
|
|
"limit": 15,
|
|
|
|
"next": null,
|
|
|
|
"page": 1,
|
|
|
|
"pages": 1,
|
|
|
|
"prev": null,
|
2022-04-25 15:14:22 +01:00
|
|
|
"total": 4,
|
2022-04-22 17:42:52 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
"newsletters": Array [
|
|
|
|
Object {
|
|
|
|
"body_font_category": "sans_serif",
|
|
|
|
"count": Object {
|
|
|
|
"members": 0,
|
2022-04-25 15:14:22 +01:00
|
|
|
"posts": 0,
|
2022-04-22 17:42:52 +02:00
|
|
|
},
|
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
|
|
"name": "Default Newsletter",
|
|
|
|
"sender_email": null,
|
|
|
|
"sender_name": null,
|
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
|
|
|
"show_header_name": true,
|
|
|
|
"show_header_title": true,
|
|
|
|
"slug": "default-newsletter",
|
|
|
|
"sort_order": 0,
|
|
|
|
"status": "active",
|
|
|
|
"subscribe_on_signup": true,
|
|
|
|
"title_alignment": "center",
|
|
|
|
"title_font_category": "sans_serif",
|
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-27 19:20:25 +05:30
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
2022-04-22 17:42:52 +02:00
|
|
|
"visibility": "members",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"body_font_category": "serif",
|
|
|
|
"count": Object {
|
2022-04-25 15:14:22 +01:00
|
|
|
"members": 4,
|
|
|
|
"posts": 0,
|
2022-04-22 17:42:52 +02:00
|
|
|
},
|
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
|
|
"name": "Daily newsletter",
|
|
|
|
"sender_email": "jamie@example.com",
|
|
|
|
"sender_name": "Jamie",
|
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
|
|
|
"show_header_name": true,
|
|
|
|
"show_header_title": true,
|
|
|
|
"slug": "daily-newsletter",
|
|
|
|
"sort_order": 1,
|
|
|
|
"status": "active",
|
|
|
|
"subscribe_on_signup": false,
|
|
|
|
"title_alignment": "center",
|
|
|
|
"title_font_category": "serif",
|
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-27 19:20:25 +05:30
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
2022-04-22 17:42:52 +02:00
|
|
|
"visibility": "members",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"body_font_category": "serif",
|
|
|
|
"count": Object {
|
2022-04-25 15:14:22 +01:00
|
|
|
"members": 3,
|
|
|
|
"posts": 0,
|
2022-04-22 17:42:52 +02:00
|
|
|
},
|
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
|
|
"name": "Weekly newsletter",
|
|
|
|
"sender_email": "jamie@example.com",
|
|
|
|
"sender_name": "Jamie",
|
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
|
|
|
"show_header_name": true,
|
|
|
|
"show_header_title": true,
|
|
|
|
"slug": "weekly-newsletter",
|
|
|
|
"sort_order": 2,
|
|
|
|
"status": "active",
|
|
|
|
"subscribe_on_signup": true,
|
|
|
|
"title_alignment": "center",
|
|
|
|
"title_font_category": "serif",
|
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-27 19:20:25 +05:30
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
2022-04-22 17:42:52 +02:00
|
|
|
"visibility": "members",
|
|
|
|
},
|
|
|
|
Object {
|
|
|
|
"body_font_category": "serif",
|
|
|
|
"count": Object {
|
2022-04-25 15:14:22 +01:00
|
|
|
"members": 2,
|
|
|
|
"posts": 0,
|
2022-04-22 17:42:52 +02:00
|
|
|
},
|
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
2022-04-25 15:14:22 +01:00
|
|
|
"name": "Old newsletter",
|
2022-04-22 17:42:52 +02:00
|
|
|
"sender_email": "jamie@example.com",
|
|
|
|
"sender_name": "Jamie",
|
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
|
|
|
"show_header_name": true,
|
|
|
|
"show_header_title": true,
|
2022-04-25 15:14:22 +01:00
|
|
|
"slug": "old-newsletter",
|
|
|
|
"sort_order": 2,
|
2022-04-25 20:11:27 +01:00
|
|
|
"status": "archived",
|
2022-04-25 15:14:22 +01:00
|
|
|
"subscribe_on_signup": true,
|
2022-04-22 17:42:52 +02:00
|
|
|
"title_alignment": "center",
|
|
|
|
"title_font_category": "serif",
|
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-27 19:20:25 +05:30
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
2022-04-22 17:42:52 +02:00
|
|
|
"visibility": "members",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2022-04-25 15:14:22 +01:00
|
|
|
exports[`Newsletters API Can include members & posts counts when browsing newsletters 2: [headers] 1`] = `
|
2022-04-22 17:42:52 +02:00
|
|
|
Object {
|
|
|
|
"access-control-allow-origin": "http://127.0.0.1:2369",
|
|
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
2022-04-27 19:20:25 +05:30
|
|
|
"content-length": "2818",
|
2022-04-22 17:42:52 +02:00
|
|
|
"content-type": "application/json; charset=utf-8",
|
|
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
|
|
"vary": "Origin, Accept-Encoding",
|
|
|
|
"x-powered-by": "Express",
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2022-04-25 15:14:22 +01:00
|
|
|
exports[`Newsletters API Can include members & posts counts when reading a newsletter 1: [body] 1`] = `
|
2022-04-22 17:42:52 +02:00
|
|
|
Object {
|
|
|
|
"newsletters": Array [
|
|
|
|
Object {
|
|
|
|
"body_font_category": "serif",
|
|
|
|
"count": Object {
|
2022-04-25 15:14:22 +01:00
|
|
|
"members": 4,
|
2022-04-22 17:42:52 +02:00
|
|
|
"posts": 0,
|
|
|
|
},
|
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
|
|
"name": "Daily newsletter",
|
|
|
|
"sender_email": "jamie@example.com",
|
|
|
|
"sender_name": "Jamie",
|
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
|
|
|
"show_header_name": true,
|
|
|
|
"show_header_title": true,
|
|
|
|
"slug": "daily-newsletter",
|
|
|
|
"sort_order": 1,
|
|
|
|
"status": "active",
|
|
|
|
"subscribe_on_signup": false,
|
|
|
|
"title_alignment": "center",
|
|
|
|
"title_font_category": "serif",
|
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-27 19:20:25 +05:30
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
2022-04-22 17:42:52 +02:00
|
|
|
"visibility": "members",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2022-04-25 15:14:22 +01:00
|
|
|
exports[`Newsletters API Can include members & posts counts when reading a newsletter 2: [headers] 1`] = `
|
2022-04-22 17:42:52 +02:00
|
|
|
Object {
|
|
|
|
"access-control-allow-origin": "http://127.0.0.1:2369",
|
|
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
2022-04-27 19:20:25 +05:30
|
|
|
"content-length": "697",
|
2022-04-22 17:42:52 +02:00
|
|
|
"content-type": "application/json; charset=utf-8",
|
|
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
|
|
"vary": "Origin, Accept-Encoding",
|
|
|
|
"x-powered-by": "Express",
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2022-04-22 13:20:44 +01:00
|
|
|
exports[`Newsletters API Can read a newsletter 1: [body] 1`] = `
|
|
|
|
Object {
|
|
|
|
"newsletters": Array [
|
|
|
|
Object {
|
|
|
|
"body_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-22 13:20:44 +01:00
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
|
|
"name": "Daily newsletter",
|
|
|
|
"sender_email": "jamie@example.com",
|
|
|
|
"sender_name": "Jamie",
|
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
|
|
|
"show_header_name": true,
|
|
|
|
"show_header_title": true,
|
|
|
|
"slug": "daily-newsletter",
|
|
|
|
"sort_order": 1,
|
|
|
|
"status": "active",
|
|
|
|
"subscribe_on_signup": false,
|
|
|
|
"title_alignment": "center",
|
|
|
|
"title_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-27 19:20:25 +05:30
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
2022-04-22 13:20:44 +01:00
|
|
|
"visibility": "members",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Newsletters API Can read a newsletter 2: [headers] 1`] = `
|
2022-04-08 19:06:30 +05:30
|
|
|
Object {
|
|
|
|
"access-control-allow-origin": "http://127.0.0.1:2369",
|
|
|
|
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
|
2022-04-27 19:20:25 +05:30
|
|
|
"content-length": "665",
|
2022-04-08 19:06:30 +05:30
|
|
|
"content-type": "application/json; charset=utf-8",
|
|
|
|
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,
|
|
|
|
"vary": "Origin, Accept-Encoding",
|
|
|
|
"x-powered-by": "Express",
|
|
|
|
}
|
|
|
|
`;
|
2022-04-22 13:20:44 +01:00
|
|
|
|
|
|
|
exports[`Newsletters API Can verify property updates 1: [body] 1`] = `
|
|
|
|
Object {
|
|
|
|
"newsletters": Array [
|
|
|
|
Object {
|
2022-04-25 15:14:22 +01:00
|
|
|
"body_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-22 13:20:44 +01:00
|
|
|
"description": null,
|
|
|
|
"footer_content": null,
|
|
|
|
"header_image": null,
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{24\\}/,
|
|
|
|
"name": "Updated newsletter name",
|
|
|
|
"sender_email": "verify@example.com",
|
2022-04-25 15:14:22 +01:00
|
|
|
"sender_name": "Jamie",
|
2022-04-22 13:20:44 +01:00
|
|
|
"sender_reply_to": "newsletter",
|
|
|
|
"show_badge": true,
|
|
|
|
"show_feature_image": true,
|
|
|
|
"show_header_icon": true,
|
|
|
|
"show_header_name": true,
|
|
|
|
"show_header_title": true,
|
2022-04-25 15:14:22 +01:00
|
|
|
"slug": "daily-newsletter",
|
|
|
|
"sort_order": 1,
|
2022-04-22 13:20:44 +01:00
|
|
|
"status": "active",
|
2022-04-25 15:14:22 +01:00
|
|
|
"subscribe_on_signup": false,
|
2022-04-22 13:20:44 +01:00
|
|
|
"title_alignment": "center",
|
2022-04-25 15:14:22 +01:00
|
|
|
"title_font_category": "serif",
|
2022-04-22 14:39:27 +02:00
|
|
|
"updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/,
|
2022-04-27 19:20:25 +05:30
|
|
|
"uuid": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
2022-04-22 13:20:44 +01:00
|
|
|
"visibility": "members",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
`;
|
2022-04-27 17:44:16 +01:00
|
|
|
|
|
|
|
exports[`Newsletters API Host Settings: newsletter limits Request fails when newsletter limit is in place 1: [body] 1`] = `
|
|
|
|
Object {
|
|
|
|
"errors": Array [
|
|
|
|
Object {
|
|
|
|
"code": null,
|
|
|
|
"context": "Nuh uh",
|
|
|
|
"details": Object {
|
|
|
|
"name": "newsletters",
|
|
|
|
},
|
|
|
|
"help": "https://ghost.org/help/",
|
|
|
|
"id": StringMatching /\\[a-f0-9\\]\\{8\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{4\\}-\\[a-f0-9\\]\\{12\\}/,
|
|
|
|
"message": "Host Limit error, cannot save newsletter.",
|
|
|
|
"property": null,
|
|
|
|
"type": "HostLimitError",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
`;
|