Removed non multipleNewslettersUI tests

This commit is contained in:
Simon Backx 2022-05-16 14:11:51 +02:00
parent 025fe3e6ae
commit 032f4d2ced

View File

@ -6,41 +6,6 @@ import {setupApplicationTest} from 'ember-mocha';
import {setupMirage} from 'ember-cli-mirage/test-support';
import {visit} from '../../helpers/visit';
describe('Acceptance: Settings - Newsletters (multipleNewsletters)', function () {
const hooks = setupApplicationTest();
setupMirage(hooks);
beforeEach(async function () {
this.server.loadFixtures('configs');
const role = this.server.create('role', {name: 'Owner'});
this.server.create('user', {roles: [role]});
enableLabsFlag(this.server, 'multipleNewsletters');
return await authenticateSession();
});
it('with flag - redirects original to labs', async function () {
await visit('/settings/members-email');
expect(currentURL()).to.equal('/settings/newsletters');
});
it('can manage open rate tracking', async function () {
this.server.db.settings.update({key: 'email_track_opens'}, {value: 'true'});
await visit('/settings/newsletters');
expect(find('[data-test-checkbox="email-track-opens"]')).to.be.checked;
await click('[data-test-label="email-track-opens"]');
expect(find('[data-test-checkbox="email-track-opens"]')).to.not.be.checked;
await click('[data-test-button="save-members-settings"]');
expect(this.server.db.settings.findBy({key: 'email_track_opens'}).value).to.equal(false);
});
});
describe('Acceptance: Settings - Newsletters (multipleNewslettersUI)', function () {
const hooks = setupApplicationTest();
setupMirage(hooks);
@ -57,6 +22,11 @@ describe('Acceptance: Settings - Newsletters (multipleNewslettersUI)', function
return await authenticateSession();
});
it('redirects old path', async function () {
await visit('/settings/members-email');
expect(currentURL()).to.equal('/settings/newsletters');
});
it('can manage open rate tracking', async function () {
this.server.db.settings.update({key: 'email_track_opens'}, {value: 'true'});