Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,6 @@ describe('navigation dispatcher', () => {
expectNavTo(`/bot/${projectId}/dialogs/dialogId`);
expect(mockConvertPathToUrl).toBeCalledWith(projectId, projectId, 'dialogId');
});

it("doesn't navigate to a destination where we already are", async () => {
mockCheckUrl.mockReturnValue(true);
await act(async () => {
await dispatcher.navTo(projectId, 'dialogId', 'trigger');
});
expect(mockNavigateTo).not.toBeCalled();
});
});

describe('selectTo', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,13 @@ export const navigationDispatcher = () => {

const projectId = skillId ?? rootBotProjectId;

const designPageLocation = await snapshot.getPromise(designPageLocationState(projectId));
set(currentProjectIdState, projectId);

const currentUri =
trigger == null
? convertPathToUrl(rootBotProjectId, skillId, dialogId)
: convertPathToUrl(rootBotProjectId, skillId, dialogId, `selected=triggers[${trigger}]`);
if (checkUrl(currentUri, rootBotProjectId, projectId, designPageLocation)) return;

set(designPageLocationState(projectId), {
dialogId: dialogId ?? '',
selected: trigger ?? '',
Expand Down