mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
🐛 Fixed duplicate email open rate column when filtering members by open rate
no issue - email open rate is shown by default so we don't need to add the column a second time when the list is filtered by that data - added `email_open_rate` to the default columns list so it's ignored when adding any filtered-by columns
This commit is contained in:
parent
b0bd691d52
commit
091ae194bf
@ -161,7 +161,7 @@ export default class MembersController extends Controller {
|
||||
}
|
||||
|
||||
get filterColumns() {
|
||||
const defaultColumns = ['name', 'email', 'created_at'];
|
||||
const defaultColumns = ['name', 'email', 'email_open_rate', 'created_at'];
|
||||
if (this.feature.get('membersTableStatus')) {
|
||||
defaultColumns.push('status', 'product');
|
||||
}
|
||||
|
@ -116,7 +116,7 @@
|
||||
<th data-test-table-column="status">Status</th>
|
||||
{{/if}}
|
||||
{{#if (not-eq this.settings.editorDefaultEmailRecipients "disabled")}}
|
||||
<th data-test-table-column="open_rate">Open rate</th>
|
||||
<th data-test-table-column="email_open_rate">Open rate</th>
|
||||
{{/if}}
|
||||
<th data-test-table-column="location">Location</th>
|
||||
<th data-test-table-column="created">Created</th>
|
||||
|
@ -520,6 +520,10 @@ describe('Acceptance: Members filtering', function () {
|
||||
expect(findAll('[data-test-list="members-list-item"]').length, '# of filtered member rows - operator is-greater')
|
||||
.to.equal(4);
|
||||
|
||||
// it does not add duplicate column
|
||||
expect(find('[data-test-table-column="email_open_rate"]')).to.exist;
|
||||
expect(findAll('[data-test-table-column="email_open_rate"]').length).to.equal(1);
|
||||
|
||||
// can clear filter
|
||||
await fillIn(valueInput, '');
|
||||
await blur(valueInput);
|
||||
|
Loading…
Reference in New Issue
Block a user