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

Commit

Permalink
remove SegmentEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
archywillhe committed Sep 30, 2023
1 parent 0496695 commit 979cf04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
5 changes: 4 additions & 1 deletion packages/insomnia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"bugs": {
"url": "https://github.com/Kong/insomnia/issues"
},
"build": {
"asar": true
},
"repository": {
"type": "git",
"url": "git+https://github.com/Kong/insomnia.git",
Expand All @@ -26,7 +29,7 @@
"start": "concurrently -n dev,app --kill-others \"npm run start:dev-server\" \"npm run start:electron\"",
"start:dev-server": "vite dev",
"start:electron": "cross-env NODE_ENV=development esr esbuild.main.ts && electron .",
"test": "jest",
"test": "jest",
"electron:dev-build": "electron ./build/main.min.js",
"test:watch": "jest --watch",
"type-check": "tsc --noEmit --project tsconfig.build.json",
Expand Down
12 changes: 1 addition & 11 deletions packages/insomnia/src/ui/routes/actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export const deleteProjectAction: ActionFunction = async ({ params }) => {
await models.stats.incrementDeletedRequestsForDescendents(project);
await models.project.remove(project);

window.main.trackSegmentEvent({ event: SegmentEvent.projectLocalDelete });

return redirect(`/organization/${DEFAULT_ORGANIZATION_ID}/project/${DEFAULT_PROJECT_ID}`);
};
Expand Down Expand Up @@ -128,11 +127,7 @@ export const createNewWorkspaceAction: ActionFunction = async ({
}
}

window.main.trackSegmentEvent({
event: isCollection(workspace)
? SegmentEvent.collectionCreate
: SegmentEvent.documentCreate,
});


return redirect(
`/organization/${organizationId}/project/${projectId}/workspace/${workspace._id}/${workspace.scope === 'collection' ? ACTIVITY_DEBUG : ACTIVITY_SPEC
Expand Down Expand Up @@ -282,7 +277,6 @@ export const createNewTestSuiteAction: ActionFunction = async ({
name,
});

window.main.trackSegmentEvent({ event: SegmentEvent.testSuiteCreate });

return redirect(`/organization/${organizationId}/project/${projectId}/workspace/${workspaceId}/test/test-suite/${unitTestSuite._id}`);
};
Expand All @@ -299,7 +293,6 @@ export const deleteTestSuiteAction: ActionFunction = async ({ params }) => {

await models.unitTestSuite.remove(unitTestSuite);

window.main.trackSegmentEvent({ event: SegmentEvent.testSuiteDelete });

return redirect(`/organization/${organizationId}/project/${projectId}/workspace/${workspaceId}/test`);
};
Expand Down Expand Up @@ -378,7 +371,6 @@ expect(response1.status).to.equal(200);`,
name,
});

window.main.trackSegmentEvent({ event: SegmentEvent.unitTestCreate });

return null;
};
Expand All @@ -394,7 +386,6 @@ export const deleteTestAction: ActionFunction = async ({ params }) => {
invariant(unitTest, 'Test not found');

await models.unitTest.remove(unitTest);
window.main.trackSegmentEvent({ event: SegmentEvent.unitTestDelete });

return null;
};
Expand Down Expand Up @@ -450,7 +441,6 @@ export const runTestAction: ActionFunction = async ({ params }) => {
parentId: unitTest.parentId,
});

window.main.trackSegmentEvent({ event: SegmentEvent.unitTestRun });

return redirect(`/organization/${organizationId}/project/${projectId}/workspace/${workspaceId}/test/test-suite/${testSuiteId}/test-result/${testResult._id}`);
};
Expand Down

0 comments on commit 979cf04

Please sign in to comment.