From e94bdd57ae49baa1edbca33a55877b7ac9287f7d Mon Sep 17 00:00:00 2001 From: Simon Backx Date: Wed, 21 Jun 2023 16:57:54 +0200 Subject: [PATCH] Updated posts exporter comment tests fixes https://github.com/TryGhost/Team/issues/3505 I've investigated this, but luckily this is expected behaviour, and was just an error previously in the test: - The `feedback_more_like_this` and `feedback_less_like_this` columns are only hidden if there is no newsletter with feedback enabled, or if member features are disabled. - Having a post which is a draft, should not change the visible columns, only global settings should change the comments (so the format is consistent). - Instead of that, the columns should be null, which means it will be visible but empty. --- ghost/posts-service/test/PostsExporter.test.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ghost/posts-service/test/PostsExporter.test.js b/ghost/posts-service/test/PostsExporter.test.js index 53433bdaa3..6d54ef2f32 100644 --- a/ghost/posts-service/test/PostsExporter.test.js +++ b/ghost/posts-service/test/PostsExporter.test.js @@ -179,8 +179,7 @@ describe('PostsExporter', function () { post.status = 'draft'; const posts = await exporter.export({}); - // @TODO: why are these all nulls and not undefined? - // No feedback columns + // Feedback columns are empty, but present because of global settings (newsletter with feedback enabled) assert.equal(posts[0].feedback_more_like_this, null); assert.equal(posts[0].feedback_less_like_this, null);