Don't miss out Virtual Happy Hour this Friday (April 26).
Don't miss out Virtual Happy Hour this Friday (April 26).
Oct 13, 2015
May 13, 2016
CMS UI
Closed, Fixed and tested
This is hard to reproduce without Commerce installed, since only Commerce is using CollectionEditor at this point.
1. Log in to a commerce site > go to New Catalog Commerce UI.
2. Select any product under Departmental Catalog>Departments>Fashion>Tops>Tops-Tunic ( eg: Tops-Tunics-CowlNeck)
3. Open the item in Categories view.
4. On the Categories related list, there should only be one Tops-Tunic category.
5. Drag it and drop it to the drop area (the area with downward arrow).
Expected: The category (Tops-Tunic) still shows on the grid.
Actual: The categories grid list is empty.
Note: If list has at least 2 categories, the issue does not occur.
To reproduce the error, add the following unit test to CollectionEditorModel_specs.js
describe("#moveItem", function () { //this already exist in the file // ... describe("when #before is true", function () { //also this describe('and there is only one item', function () { //this is the new test beforeEach(function (done) { model.data = [{ id: 1 }]; model.initialize().then(function () { done(); }); }); it('should not change the list', function () { item = model.get("items")[0]; model.moveItem(item, null, true); var pos = model.get("items").indexOf(item); expect(pos).to.equal(0); }); });