mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
Fixed tests
no refs.
This commit is contained in:
parent
1dd2a3db07
commit
6511a47524
@ -12,7 +12,7 @@
|
||||
{{#if this.importResponse}}
|
||||
{{!-- post upload step with import stats --}}
|
||||
|
||||
<div class="modaly-body">
|
||||
<div class="modal-body">
|
||||
|
||||
{{!-- Summary --}}
|
||||
<div class="ba b--whitegrey br3 middarkgrey bg-whitegrey-l2">
|
||||
@ -29,7 +29,7 @@
|
||||
</div>
|
||||
|
||||
{{#if this.importResponse.invalid.count}}
|
||||
<div class="modal-body mt6 gh-members-upload-errorcontainer error">
|
||||
<div class="mt6 gh-members-upload-errorcontainer error">
|
||||
<div class="flex items-start">
|
||||
{{svg-jar "warning" class="w5 h5 fill-red nudge-top--3 mr3"}}
|
||||
<div class="flex-grow w-100">
|
||||
|
@ -62,6 +62,7 @@ export default Service.extend({
|
||||
// check can be done on whole set as it won't be too slow
|
||||
const {invalidCount, emptyCount, duplicateCount} = this._checkEmails(data, mapping);
|
||||
if (invalidCount) {
|
||||
// @TODO: Remove error from displayed errors
|
||||
validationErrors.push(new MemberImportError({
|
||||
message: `Invalid email address (${invalidCount})`,
|
||||
type: 'warning'
|
||||
@ -76,6 +77,7 @@ export default Service.extend({
|
||||
}
|
||||
|
||||
if (duplicateCount) {
|
||||
// @TODO: Remove error from displayed errors
|
||||
validationErrors.push(new MemberImportError({
|
||||
message: `Duplicate email address (${duplicateCount})`,
|
||||
type: 'warning'
|
||||
@ -192,13 +194,11 @@ export default Service.extend({
|
||||
}
|
||||
|
||||
if (emailValue && !validator.isEmail(emailValue)) {
|
||||
// Temporarily not returning this error
|
||||
// invalidCount += 1;
|
||||
invalidCount += 1;
|
||||
} else if (emailValue) {
|
||||
if (emailMap[emailValue]) {
|
||||
emailMap[emailValue] += 1;
|
||||
// Temporarily not returning this error
|
||||
// duplicateCount += 1;
|
||||
duplicateCount += 1;
|
||||
} else {
|
||||
emailMap[emailValue] = 1;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ describe('Integration: Component: modal-import-members-test', function () {
|
||||
expect(find('h1').textContent.trim(), 'default header')
|
||||
.to.equal('Import members');
|
||||
expect(find('.description').textContent.trim(), 'upload label')
|
||||
.to.equal('Select or drag-and-drop a CSV File');
|
||||
.to.equal('Select or drag-and-drop a CSV file');
|
||||
});
|
||||
|
||||
it('generates request to supplied endpoint', async function () {
|
||||
|
Loading…
Reference in New Issue
Block a user