Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
fix: rename cyclicGroup to cyclicDimension (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
linhnguyen-qlik authored Feb 9, 2024
1 parent 33bb494 commit aefe1ea
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/ext.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ describe("ext", () => {
});

it("Should return only cyclic group dimensions", async () => {
options = await actionItems.cyclicGroup.options(null, handler);
options = await actionItems.cyclicDimension.options(null, handler);
expect(options).toHaveLength(1);
expect(options[0].label).toEqual("cyclic");
});
Expand Down
6 changes: 3 additions & 3 deletions src/ext.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ export default function ext({ translator, shouldHide, senseNavigation, theme, is
items: getAutomationProps(multiUserAutomation, getAutomations),
show: (data) => checkShowAction(data, "automation"),
},
cyclicGroup: {
cyclicDimension: {
type: "string",
ref: "cyclicGroupId",
ref: "cyclicDimensionId",
component: "expression-with-dropdown",
translation: "Common.Dimension",
defaultValue: "",
Expand All @@ -180,7 +180,7 @@ export default function ext({ translator, shouldHide, senseNavigation, theme, is
value: dim.qInfo.qId,
}));
},
show: (data) => checkShowAction(data, "cyclicGroup"),
show: (data) => checkShowAction(data, "cyclicDimension"),
},
indexStepper: {
type: "string",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/__tests__/actions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ describe("actions", () => {
});

it("should do step cycle", async () => {
const actionObject = actions.find((action) => action.value === "cyclicGroup");
const actionObject = actions.find((action) => action.value === "cyclicDimension");
const stepCycle = jest.fn();
app.getDimension = () => ({ stepCycle });
await actionObject.getActionCall({ app, partial: true })();
Expand Down
10 changes: 5 additions & 5 deletions src/utils/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,17 @@ const actions = [
requiredInput: ["field", "softLock"],
},
{
value: "cyclicGroup",
translation: "Dimensions.Dialog.Type.CyclicGroup",
value: "cyclicDimension",
translation: "Object.ActionButton.CyclicDimension",
group: "selection",
getActionCall:
({ cyclicGroupId, indexStepper, app }) =>
({ cyclicDimensionId, indexStepper, app }) =>
async () => {
const model = await app.getDimension(cyclicGroupId);
const model = await app.getDimension(cyclicDimensionId);
await model.stepCycle(indexStepper);
},
hide: ({ isEnabled }) => !isEnabled("PS_21223_CYCLIC_GROUPS"),
requiredInput: ["cyclicGroup", "indexStepper"],
requiredInput: ["cyclicDimension", "indexStepper"],
},
{
value: "selectExcluded",
Expand Down

0 comments on commit aefe1ea

Please sign in to comment.