Skip to content

Commit

Permalink
fix property naming in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
interim17 committed Oct 2, 2024
1 parent 68e60ab commit 86a41a0
Showing 1 changed file with 27 additions and 11 deletions.
38 changes: 27 additions & 11 deletions src/state/trajectory/selectors/selectors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,24 @@ describe("trajectory composed selectors", () => {
it("returns empty array if default UI data has not been entered yet", () => {
expect(getCurrentUIData(initialState)).toEqual([]);
});
it("returns userSelectedUIData if colorSetting is equal to ColorSettings.UserSelected", () => {
it("returns userColorSelections if colorSetting is equal to ColorSettings.UserSelected", () => {
expect(
getCurrentUIData({
...initialState,
trajectory: {
...initialState.trajectory,
currentColorSettings: ColorSettings.UserSelected,
defaultUIData: [
{
name: "agent1",
displayStates: [],
color: "#bbbbbb",
},
],
userSelectedUIData: [
},
selection: {
...initialState.selection,
currentColorSettings: ColorSettings.UserSelected,
userColorSelections: [
{
name: "agent1",
displayStates: [],
Expand All @@ -86,15 +89,18 @@ describe("trajectory composed selectors", () => {
...initialState,
trajectory: {
...initialState.trajectory,
currentColorSettings: ColorSettings.Default,
defaultUIData: [
{
name: "agent1",
displayStates: [],
color: "#bbbbbb",
},
],
userSelectedUIData: [
},
selection: {
...initialState.selection,
currentColorSettings: ColorSettings.Default,
userColorSelections: [
{
name: "agent1",
displayStates: [],
Expand Down Expand Up @@ -179,7 +185,7 @@ describe("trajectory composed selectors", () => {
});

describe("getDefaultUISettingsApplied", () => {
it("returns false if userSelectedUIData contains selections and userSelectedUIData and defaultUIData are not equal", () => {
it("returns false if userColorSelections contains selections and userColorSelections and defaultUIData are not equal", () => {
expect(
getDefaultUISettingsApplied({
...initialState,
Expand All @@ -191,7 +197,17 @@ describe("trajectory composed selectors", () => {
color: "#bbbbbb",
},
],
userSelectedUIData: [
userColorSelections: [
{
name: "agent1",
displayStates: [],
color: "#000",
},
],
},
selection: {
...initialState.selection,
userColorSelections: [
{
name: "agent1",
displayStates: [],
Expand All @@ -202,7 +218,7 @@ describe("trajectory composed selectors", () => {
})
).toBe(false);
});
it("returns true if userSelectedUIData contains no selections", () => {
it("returns true if userColorSelections contains no selections", () => {
expect(
getDefaultUISettingsApplied({
...initialState,
Expand All @@ -214,12 +230,12 @@ describe("trajectory composed selectors", () => {
color: "#bbbbbb",
},
],
userSelectedUIData: [],
userColorSelections: [],
},
})
).toBe(true);
});
it("returns true if userSelectedUIData and userSelectedUIData are equal", () => {
it("returns true if userColorSelections and defaultUIData are equal", () => {
expect(
getDefaultUISettingsApplied({
...initialState,
Expand All @@ -231,7 +247,7 @@ describe("trajectory composed selectors", () => {
color: "#bbbbbb",
},
],
userSelectedUIData: [
userColorSelections: [
{
name: "agent1",
displayStates: [],
Expand Down

0 comments on commit 86a41a0

Please sign in to comment.