diff --git a/test/e2e-api/admin/__snapshots__/members-newsletters.test.js.snap b/test/e2e-api/admin/__snapshots__/members-newsletters.test.js.snap index 07a5d87cdd..de81b53085 100644 --- a/test/e2e-api/admin/__snapshots__/members-newsletters.test.js.snap +++ b/test/e2e-api/admin/__snapshots__/members-newsletters.test.js.snap @@ -1,223 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Members API - No Newsletters Can fetch members who are NOT subscribed 1: [body] 1`] = ` -Object { - "members": Array [ - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "with-product@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Dana Barrett", - "note": null, - "status": "paid", - "subscribed": false, - "subscriptions": Any, - "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\\}/, - }, - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "vip-paid@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Peter Venkman", - "note": null, - "status": "paid", - "subscribed": false, - "subscriptions": Any, - "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\\}/, - }, - ], - "meta": Object { - "pagination": Object { - "limit": 15, - "next": null, - "page": 1, - "pages": 1, - "prev": null, - "total": 2, - }, - }, -} -`; - -exports[`Members API - No Newsletters Can fetch members who are NOT subscribed 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": "2028", - "content-type": "application/json; charset=utf-8", - "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, - "vary": "Origin, Accept-Encoding", - "x-powered-by": "Express", -} -`; - -exports[`Members API - No Newsletters Can fetch members who are subscribed 1: [body] 1`] = ` -Object { - "members": Array [ - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "vip@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Winston Zeddemore", - "note": null, - "status": "free", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "comped@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Vinz Clortho", - "note": null, - "status": "paid", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "trialing@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Ray Stantz", - "note": null, - "status": "paid", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "paid@test.com", - "email_count": 0, - "email_open_rate": 80, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Egon Spengler", - "note": null, - "status": "paid", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "member2@test.com", - "email_count": 0, - "email_open_rate": 50, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": null, - "note": null, - "status": "free", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "member1@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Mr Egg", - "note": null, - "status": "free", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - ], - "meta": Object { - "pagination": Object { - "limit": 15, - "next": null, - "page": 1, - "pages": 1, - "prev": null, - "total": 6, - }, - }, -} -`; - -exports[`Members API - No Newsletters Can fetch members who are subscribed 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": "6501", - "content-type": "application/json; charset=utf-8", - "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, - "vary": "Origin, Accept-Encoding", - "x-powered-by": "Express", -} -`; - exports[`Members API - With Newsletters - compat mode Can fetch members who are NOT subscribed 1: [body] 1`] = ` Object { "members": Array [ diff --git a/test/e2e-api/admin/__snapshots__/members.test.js.snap b/test/e2e-api/admin/__snapshots__/members.test.js.snap index dd038c9cb1..0fb9433a74 100644 --- a/test/e2e-api/admin/__snapshots__/members.test.js.snap +++ b/test/e2e-api/admin/__snapshots__/members.test.js.snap @@ -246,33 +246,6 @@ Object { } `; -exports[`Members API Bulk operations doesn't delete labels apart from the passed label id 1: [body] 1`] = ` -Object { - "bulk": Object { - "meta": Object { - "errors": Array [], - "stats": Object { - "successful": 1, - "unsuccessful": 0, - }, - "unsuccessfulData": Array [], - }, - }, -} -`; - -exports[`Members API Bulk operations doesn't delete labels apart from the passed label id 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": "95", - "content-type": "application/json; charset=utf-8", - "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, - "vary": "Origin, Accept-Encoding", - "x-powered-by": "Express", -} -`; - exports[`Members API Can add 1: [body] 1`] = ` Object { "members": Array [ @@ -2108,18 +2081,6 @@ Object { } `; -exports[`Members API Can filter on tier slug 1: [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": "17658", - "content-type": "application/json; charset=utf-8", - "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, - "vary": "Origin, Accept-Encoding", - "x-powered-by": "Express", -} -`; - exports[`Members API Can filter on tier slug 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", @@ -3053,124 +3014,6 @@ Object { } `; -exports[`Members API Can subscribe to a newsletter 5: [body] 1`] = ` -Object { - "events": Array [ - Object { - "data": Object { - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "member": Object { - "avatar_image": null, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "member3change@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "last_seen_at": null, - "name": "change me", - "note": null, - "status": "free", - "subscribed": true, - "updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "uuid": "afd6010c-53ab-4e33-a1f0-600d942fa1ae", - }, - "member_id": "6267babe96506b05ae3a6285", - "newsletter_id": "6267babd96506b05ae3a6050", - "source": "admin", - "subscribed": true, - }, - "type": Any, - }, - Object { - "data": Object { - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "member": Object { - "avatar_image": null, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "member3change@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "last_seen_at": null, - "name": "change me", - "note": null, - "status": "free", - "subscribed": true, - "updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "uuid": "afd6010c-53ab-4e33-a1f0-600d942fa1ae", - }, - "member_id": "6267babe96506b05ae3a6285", - "newsletter_id": "6267baba96506b05ae3a5db9", - "source": "admin", - "subscribed": true, - }, - "type": Any, - }, - Object { - "data": Object { - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "member": Object { - "avatar_image": null, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "member3change@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "last_seen_at": null, - "name": "change me", - "note": null, - "status": "free", - "subscribed": true, - "updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "uuid": "afd6010c-53ab-4e33-a1f0-600d942fa1ae", - }, - "member_id": "6267babe96506b05ae3a6285", - "newsletter_id": "6267babd96506b05ae3a6050", - "source": "admin", - "subscribed": false, - }, - "type": Any, - }, - Object { - "data": Object { - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "from_status": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "member": Object { - "avatar_image": null, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "member3change@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "last_seen_at": null, - "name": "change me", - "note": null, - "status": "free", - "subscribed": true, - "updated_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "uuid": "afd6010c-53ab-4e33-a1f0-600d942fa1ae", - }, - "member_id": "6267babe96506b05ae3a6285", - "to_status": "free", - }, - "type": Any, - }, - ], -} -`; - exports[`Members API Can subscribe to a newsletter 5: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", @@ -3183,18 +3026,6 @@ Object { } `; -exports[`Members API Can subscribe to a newsletter 6: [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": "2425", - "content-type": "application/json; charset=utf-8", - "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, - "vary": "Origin, Accept-Encoding", - "x-powered-by": "Express", -} -`; - exports[`Members API Can unsubscribe by setting (old) subscribed property to false 1: [body] 1`] = ` Object { "members": Array [ @@ -3644,582 +3475,3 @@ Object { "x-powered-by": "Express", } `; - -exports[`Members API: with multiple newsletters Can add and edit with custom newsletters 1: [body] 1`] = ` -Object { - "members": Array [ - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "memberTestAddNewsletter2@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "test newsletter", - "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": "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/, - "visibility": "members", - }, - ], - "note": "test note", - "products": Array [], - "status": "free", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - ], -} -`; - -exports[`Members API: with multiple newsletters Can add and edit with custom 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": "1248", - "content-type": "application/json; charset=utf-8", - "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, - "location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/members\\\\/\\[a-f0-9\\]\\{24\\}\\\\//, - "vary": "Origin, Accept-Encoding", - "x-powered-by": "Express", -} -`; - -exports[`Members API: with multiple newsletters Can add and edit with custom newsletters 3: [body] 1`] = ` -Object { - "members": Array [ - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "memberTestAddNewsletter2@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "test newsletter", - "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": "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/, - "visibility": "members", - }, - ], - "note": "test note", - "products": Array [], - "status": "free", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - ], -} -`; - -exports[`Members API: with multiple newsletters Can add and edit with custom 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": "1247", - "content-type": "application/json; charset=utf-8", - "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, - "vary": "Origin, Accept-Encoding", - "x-powered-by": "Express", -} -`; - -exports[`Members API: with multiple newsletters Can add with default newsletters 1: [body] 1`] = ` -Object { - "members": Array [ - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "memberTestNewsletterAdd@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "test", - "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": "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/, - "visibility": "members", - }, - 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": "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/, - "visibility": "members", - }, - ], - "note": "test note", - "products": Array [], - "status": "free", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - ], -} -`; - -exports[`Members API: with multiple newsletters Can add with default 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": "1833", - "content-type": "application/json; charset=utf-8", - "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, - "location": StringMatching /https\\?:\\\\/\\\\/\\.\\*\\?\\\\/members\\\\/\\[a-f0-9\\]\\{24\\}\\\\//, - "vary": "Origin, Accept-Encoding", - "x-powered-by": "Express", -} -`; - -exports[`Members API: with multiple newsletters Can browse 1: [body] 1`] = ` -Object { - "members": Array [ - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "with-product@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Dana Barrett", - "newsletters": Any, - "note": null, - "status": "paid", - "subscribed": false, - "subscriptions": Any, - "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\\}/, - }, - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "vip-paid@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Peter Venkman", - "newsletters": Any, - "note": null, - "status": "paid", - "subscribed": false, - "subscriptions": Any, - "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\\}/, - }, - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "vip@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Winston Zeddemore", - "newsletters": Any, - "note": null, - "status": "free", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "comped@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Vinz Clortho", - "newsletters": Any, - "note": null, - "status": "paid", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "trialing@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Ray Stantz", - "newsletters": Any, - "note": null, - "status": "paid", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "paid@test.com", - "email_count": 0, - "email_open_rate": 80, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Egon Spengler", - "newsletters": Any, - "note": null, - "status": "paid", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "member2@test.com", - "email_count": 0, - "email_open_rate": 50, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": null, - "newsletters": Any, - "note": null, - "status": "free", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "member1@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Mr Egg", - "newsletters": Any, - "note": null, - "status": "free", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - ], - "meta": Object { - "pagination": Object { - "limit": 15, - "next": null, - "page": 1, - "pages": 1, - "prev": null, - "total": 8, - }, - }, -} -`; - -exports[`Members API: with multiple newsletters Can browse 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": "12775", - "content-type": "application/json; charset=utf-8", - "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, - "vary": "Origin, Accept-Encoding", - "x-powered-by": "Express", -} -`; - -exports[`Members API: with multiple newsletters Can filter on newsletter slug 1: [body] 1`] = ` -Object { - "members": Array [ - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "memberTestNewsletterAdd@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "test", - "newsletters": Any, - "note": "test note", - "status": "free", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "vip@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Winston Zeddemore", - "newsletters": Any, - "note": null, - "status": "free", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "comped@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Vinz Clortho", - "newsletters": Any, - "note": null, - "status": "paid", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "trialing@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Ray Stantz", - "newsletters": Any, - "note": null, - "status": "paid", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - ], - "meta": Object { - "pagination": Object { - "limit": 15, - "next": null, - "page": 1, - "pages": 1, - "prev": null, - "total": 4, - }, - }, -} -`; - -exports[`Members API: with multiple newsletters Can filter on newsletter slug 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": "8174", - "content-type": "application/json; charset=utf-8", - "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, - "vary": "Origin, Accept-Encoding", - "x-powered-by": "Express", -} -`; - -exports[`Members API: with multiple newsletters Can read 1: [body] 1`] = ` -Object { - "members": Array [ - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "member1@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any, - "last_seen_at": null, - "name": "Mr Egg", - "newsletters": Any, - "note": null, - "products": Array [], - "status": "free", - "subscribed": true, - "subscriptions": Any, - "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\\}/, - }, - ], -} -`; - -exports[`Members API: with multiple newsletters Can read 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": "1208", - "content-type": "application/json; charset=utf-8", - "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, - "vary": "Origin, Accept-Encoding", - "x-powered-by": "Express", -} -`; diff --git a/test/e2e-api/admin/__snapshots__/newsletters.test.js.snap b/test/e2e-api/admin/__snapshots__/newsletters.test.js.snap index 60aa7a35f7..2f5fc83002 100644 --- a/test/e2e-api/admin/__snapshots__/newsletters.test.js.snap +++ b/test/e2e-api/admin/__snapshots__/newsletters.test.js.snap @@ -102,111 +102,6 @@ Object { } `; -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": 10, - "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": "827", - "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", -} -`; - exports[`Newsletters API Can add a newsletter 1: [body] 1`] = ` Object { "newsletters": Array [ @@ -1148,42 +1043,6 @@ Object { } `; -exports[`Newsletters API Host Settings: newsletter limits Max limit Adding an archived newsletter doesn't fail 2: [body] 1`] = ` -Object { - "meta": Object { - "opted_in_member_count": 6, - }, - "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": "Archived 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": "archived-newsletter", - "sort_order": 3, - "status": "archived", - "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 Host Settings: newsletter limits Max limit Adding an archived newsletter doesn't fail 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", @@ -1198,20 +1057,6 @@ Object { } `; -exports[`Newsletters API Host Settings: newsletter limits Max limit Adding an archived newsletter doesn't fail 3: [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": "699", - "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 Host Settings: newsletter limits Max limit Adding newsletter fails 1: [body] 1`] = ` Object { "errors": Array [ @@ -1394,52 +1239,6 @@ Object { } `; -exports[`Newsletters API Host Settings: newsletter limits Max limit Editing an archived newsletter doesn't fails 1: [body] 1`] = ` -Object { - "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": "Updated archived newsletter name", - "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": "old-newsletter", - "sort_order": 2, - "status": "archived", - "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 Host Settings: newsletter limits Max limit Editing an archived newsletter doesn't fails 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": "680", - "content-type": "application/json; charset=utf-8", - "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, - "vary": "Origin, Accept-Encoding", - "x-cache-invalidate": "/*", - "x-powered-by": "Express", -} -`; - exports[`Newsletters API Host Settings: newsletter limits Max limit Unarchiving a newsletter fails 1: [body] 1`] = ` Object { "errors": Array [ diff --git a/test/e2e-api/content/__snapshots__/settings.test.js.snap b/test/e2e-api/content/__snapshots__/settings.test.js.snap index 0856c4459d..0f1c0703e4 100644 --- a/test/e2e-api/content/__snapshots__/settings.test.js.snap +++ b/test/e2e-api/content/__snapshots__/settings.test.js.snap @@ -80,18 +80,6 @@ Object { } `; -exports[`Settings Content API Can request settings 1: [headers] 1`] = ` -Object { - "access-control-allow-origin": "*", - "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "942", - "content-type": "application/json; charset=utf-8", - "etag": "W/\\"3ae-FBGPtlUjSvGtTGLOj2sW5Rbn33s\\"", - "vary": "Accept-Encoding", - "x-powered-by": "Express", -} -`; - exports[`Settings Content API Can request settings 2: [headers] 1`] = ` Object { "access-control-allow-origin": "*",