This commit is contained in:
Rick Carlino 2018-01-22 14:29:38 -06:00
parent 3905c7ee1d
commit 0b622e834a

View file

@ -131,7 +131,7 @@ describe("<FarmwarePanel/>: farmware list", () => {
it("lists farmware", () => {
const p = fakeProps();
p.showFirstParty = true;
p.showFirstParty = false;
const firstPartyFarmware = fakeFarmwares().farmware_0;
if (firstPartyFarmware) { firstPartyFarmware.name = "first-party farmware"; }
p.farmwares.farmware_1 = firstPartyFarmware;
@ -139,7 +139,8 @@ describe("<FarmwarePanel/>: farmware list", () => {
expect(panel.find("FBSelect").props().list).toEqual([{
label: "My Farmware 0.0.0", value: "My Farmware"
}]);
panel.setState({ showFirstParty: true });
panel.setProps({ showFirstParty: true });
panel.update();
expect(panel.find("FBSelect").props().list).toEqual([
{ label: "My Farmware 0.0.0", value: "My Farmware" },
{ label: "first-party farmware 0.0.0", value: "first-party farmware" }