diff --git a/ghost/admin/mirage/serializers/member.js b/ghost/admin/mirage/serializers/member.js new file mode 100644 index 0000000000..a831c2232e --- /dev/null +++ b/ghost/admin/mirage/serializers/member.js @@ -0,0 +1,15 @@ +import BaseSerializer from './application'; + +export default BaseSerializer.extend({ + embed: true, + + include(request) { + let queryIncludes = (request.queryParams.include || '').split(',').compact(); + const includes = new Set(queryIncludes); + + // embedded records that are included by default in the API + includes.add('labels'); + + return Array.from(includes); + } +}); diff --git a/ghost/admin/tests/acceptance/members/filter-test.js b/ghost/admin/tests/acceptance/members/filter-test.js index f4146c2f82..de4627b750 100644 --- a/ghost/admin/tests/acceptance/members/filter-test.js +++ b/ghost/admin/tests/acceptance/members/filter-test.js @@ -96,7 +96,11 @@ describe('Acceptance: Members filtering', function () { expect(findAll('[data-test-list="members-list-item"]').length, `# of filtered member rows - ${label.name}`) .to.equal(3); + + // table shows labels column+data expect(find('[data-test-table-column="label"]')).to.exist; + expect(findAll('[data-test-table-data="label"]').length).to.equal(3); + expect(find('[data-test-table-data="label"]')).to.contain.text(label.name); // can delete filter await click('[data-test-delete-members-filter="0"]');