Fix plot composition (#6206)
* Fixed composition * Remove unnecessary guard code * Removing deprecated code * Use valid key for stacked plot v-for * Fixed object API specs to expect old values as well as new values in mutation callbacks * Fixed existing tests * Added E2E test * Fixed linting error --------- Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
This commit is contained in:
@@ -399,7 +399,7 @@ describe("The Object API", () => {
|
||||
unlisten = objectAPI.observe(mutableSecondInstance, 'otherAttribute', mutationCallback);
|
||||
objectAPI.mutate(mutable, 'otherAttribute', 'some-new-value');
|
||||
}).then(function () {
|
||||
expect(mutationCallback).toHaveBeenCalledWith('some-new-value');
|
||||
expect(mutationCallback).toHaveBeenCalledWith('some-new-value', 'other-attribute-value');
|
||||
unlisten();
|
||||
});
|
||||
});
|
||||
@@ -419,14 +419,20 @@ describe("The Object API", () => {
|
||||
|
||||
objectAPI.mutate(mutable, 'objectAttribute.embeddedObject.embeddedKey', 'updated-embedded-value');
|
||||
}).then(function () {
|
||||
expect(embeddedKeyCallback).toHaveBeenCalledWith('updated-embedded-value');
|
||||
expect(embeddedKeyCallback).toHaveBeenCalledWith('updated-embedded-value', 'embedded-value');
|
||||
expect(embeddedObjectCallback).toHaveBeenCalledWith({
|
||||
embeddedKey: 'updated-embedded-value'
|
||||
}, {
|
||||
embeddedKey: 'embedded-value'
|
||||
});
|
||||
expect(objectAttributeCallback).toHaveBeenCalledWith({
|
||||
embeddedObject: {
|
||||
embeddedKey: 'updated-embedded-value'
|
||||
}
|
||||
}, {
|
||||
embeddedObject: {
|
||||
embeddedKey: 'embedded-value'
|
||||
}
|
||||
});
|
||||
|
||||
listeners.forEach(listener => listener());
|
||||
|
||||
Reference in New Issue
Block a user