0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Added imported member count to the "Import" button

no issue

- When importing members from CSV file this change shows total amount of members that will attempt to be imported
This commit is contained in:
Nazar Gargol 2020-06-13 00:51:19 +12:00
parent d14c432264
commit 095e29d83d
2 changed files with 4 additions and 2 deletions

View file

@ -85,7 +85,9 @@
<button {{action "reset"}} class="gh-btn" data-test-button="close-import-members"> <button {{action "reset"}} class="gh-btn" data-test-button="close-import-members">
<span>Start over</span> <span>Start over</span>
</button> </button>
<button class="gh-btn gh-btn-green" {{action "upload"}} disabled={{this.importDisabled}}><span>Import</span></button> <button class="gh-btn gh-btn-green" {{action "upload"}} disabled={{this.importDisabled}}>
<span>Import{{#if this.fileData.length}} {{pluralize this.fileData.length 'member'}}{{/if}}</span>
</button>
{{else}} {{else}}
<button {{action "closeModal"}} disabled={{this.closeDisabled}} class="gh-btn" data-test-button="close-import-members"> <button {{action "closeModal"}} disabled={{this.closeDisabled}} class="gh-btn" data-test-button="close-import-members">
<span>Close</span> <span>Close</span>

View file

@ -66,7 +66,7 @@ describe('Integration: Component: modal-import-members-test', function () {
expect(find('label').textContent.trim(), 'labels label') expect(find('label').textContent.trim(), 'labels label')
.to.equal('Labels'); .to.equal('Labels');
expect(find('.gh-btn-green').textContent).to.equal('Import'); expect(find('.gh-btn-green').textContent).to.match(/Import/g);
await click('.gh-btn-green'); await click('.gh-btn-green');