mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
Removed non multipleNewslettersUI tests
This commit is contained in:
parent
025fe3e6ae
commit
032f4d2ced
@ -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'});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user