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