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:
Andrew Henry
2023-01-30 22:01:00 -08:00
committed by GitHub
parent cc1bf47f5a
commit 871362d469
13 changed files with 158 additions and 91 deletions

View File

@@ -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());