mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
Added acceptance test for members import modal display
refs https://github.com/TryGhost/Team/issues/1320 - start of acceptance tests ready for more detailed testing - added ignore of `no-duplicate-landmark-elements` lint rule in import modal template - the rule was a false flag because the conditionals only allow one `<header>` element to be rendered at a time
This commit is contained in:
parent
b9d5e7dca6
commit
152e9ff7d1
@ -1819,3 +1819,7 @@ remove|ember-template-lint|no-invalid-interactive|134|46|134|46|4ad7f6bd069828b7
|
||||
remove|ember-template-lint|no-invalid-interactive|141|46|141|46|dc3a0826d71522512799c650db29247eaa5d28a0|1643760000000|1646352000000|1648940400000|app/components/gh-post-settings-menu.hbs
|
||||
remove|ember-template-lint|no-invalid-interactive|159|46|159|46|25a012ac1658c40850fc7509fbcc324d6a66f6f8|1643760000000|1646352000000|1648940400000|app/components/gh-post-settings-menu.hbs
|
||||
add|ember-template-lint|no-invalid-interactive|2|4|2|4|07ed10079a06774ee9528c2b13dc8178744f0a97|1644537600000|1647129600000|1649718000000|app/components/gh-posts-list-item.hbs
|
||||
remove|ember-template-lint|no-duplicate-landmark-elements|9|8|9|8|09aee7e3475b800a35000dc220f7773c41bcba52|1643760000000|1646352000000|1648940400000|app/components/modal-import-members.hbs
|
||||
remove|ember-template-lint|no-duplicate-landmark-elements|15|8|15|8|027a945914f8d962353d049ba76df782815eb777|1643760000000|1646352000000|1648940400000|app/components/modal-import-members.hbs
|
||||
remove|ember-template-lint|no-duplicate-landmark-elements|22|8|22|8|b46a5eafbe20704195c70caef63feb2a42467e5e|1643760000000|1646352000000|1648940400000|app/components/modal-import-members.hbs
|
||||
remove|ember-template-lint|no-duplicate-landmark-elements|37|8|37|8|54b2819b311941c35c0cc1d64e431ee9d9145b82|1643760000000|1646352000000|1648940400000|app/components/modal-import-members.hbs
|
||||
|
@ -1,4 +1,5 @@
|
||||
<div class="gh-member-import-wrapper {{if (or (eq this.state 'MAPPING') (eq this.state 'UPLOADING')) "wide"}}">
|
||||
{{!-- template-lint-disable no-duplicate-landmark-elements --}}
|
||||
{{#if (eq this.state 'INIT')}}
|
||||
<header class="modal-header" data-test-modal="import-members">
|
||||
<h1>Import members</h1>
|
||||
|
34
ghost/admin/tests/acceptance/members/import-test.js
Normal file
34
ghost/admin/tests/acceptance/members/import-test.js
Normal file
@ -0,0 +1,34 @@
|
||||
import {authenticateSession} from 'ember-simple-auth/test-support';
|
||||
import {click, currentURL, find} from '@ember/test-helpers';
|
||||
import {expect} from 'chai';
|
||||
import {setupApplicationTest} from 'ember-mocha';
|
||||
import {setupMirage} from 'ember-cli-mirage/test-support';
|
||||
import {visit} from '../../helpers/visit';
|
||||
|
||||
describe('Acceptance: Members import', function () {
|
||||
let hooks = setupApplicationTest();
|
||||
setupMirage(hooks);
|
||||
|
||||
beforeEach(async function () {
|
||||
this.server.loadFixtures('configs');
|
||||
|
||||
let role = this.server.create('role', {name: 'Owner'});
|
||||
this.server.create('user', {roles: [role]});
|
||||
|
||||
return await authenticateSession();
|
||||
});
|
||||
|
||||
it('can open and close import modal', async function () {
|
||||
await visit('/members');
|
||||
await click('[data-test-button="members-actions"]');
|
||||
await click('[data-test-link="import-csv"]');
|
||||
|
||||
expect(find('[data-test-modal="import-members"]'), 'members import modal').to.exist;
|
||||
expect(currentURL()).to.equal('/members/import');
|
||||
|
||||
await click('[data-test-button="close-import-members"]');
|
||||
|
||||
expect(find('[data-test-modal="import-members"]'), 'members import modal').to.not.exist;
|
||||
expect(currentURL()).to.equal('/members');
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user