diff --git a/__TESTS__/unit/actions/PSDTools.test.ts b/__TESTS__/unit/actions/PSDTools.test.ts index 999ddb4d..fa2e6a15 100644 --- a/__TESTS__/unit/actions/PSDTools.test.ts +++ b/__TESTS__/unit/actions/PSDTools.test.ts @@ -65,13 +65,13 @@ describe('Tests for Transformation Action -- PSDTools', () => { expect(url).toBe('https://res.cloudinary.com/demo/image/upload/pg_embedded:8;5/sample'); }); - it('Creates a cloudinaryURL with smartObject.byFileName', () => { + it('Creates a cloudinaryURL with smartObject.byLayerName', () => { const url = createNewImage() - .psdTools(PSDTools.smartObject().byFileName('myFile').byFileName('myFile2')) + .psdTools(PSDTools.smartObject().byLayerName('myLayer').byLayerName('myLayer2')) .setPublicID('sample') .toURL(); - expect(url).toBe('https://res.cloudinary.com/demo/image/upload/pg_embedded:name:myFile;myFile2/sample'); + expect(url).toBe('https://res.cloudinary.com/demo/image/upload/pg_embedded:name:myLayer;myLayer2/sample'); }); it('Uses multiple qualifiers', () => { diff --git a/src/actions/psdTools/SmartObjectAction.ts b/src/actions/psdTools/SmartObjectAction.ts index fcee05e3..68cf789d 100644 --- a/src/actions/psdTools/SmartObjectAction.ts +++ b/src/actions/psdTools/SmartObjectAction.ts @@ -31,11 +31,11 @@ class SmartObjectAction extends Action{ /** * @description Creates an instance using the name. - * @param fileName The name + * @param {string} layerName The name of the layer */ - byFileName(fileName:string): this{ + byLayerName(layerName: string): this{ this.useName = true; - this.qualifierValue.addValue(fileName); + this.qualifierValue.addValue(layerName); return this; }