Skip to content

Commit

Permalink
Imports, rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Aug 30, 2024
1 parent a3eedbf commit bdd2b18
Show file tree
Hide file tree
Showing 24 changed files with 53 additions and 57 deletions.
2 changes: 1 addition & 1 deletion client/src/components/History/Content/ContentItem.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { updateContentFields } from "@/components/History/model/queries";

import ContentItem from "./ContentItem.vue";

jest.mock("components/History/model/queries");
jest.mock("@/components/History/model/queries");

const { server, http } = useServerMock();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import VueRouter from "vue-router";

import GenericElement from "./GenericElement";

jest.mock("components/History/model/queries");
jest.mock("@/components/History/model/queries");

const localVue = getLocalVue();
localVue.use(VueRouter);
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/History/HistoriesFilters.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Filtering, { compare, contains, expandNameTag, toDate } from "utils/filtering";
import Filtering, { compare, contains, expandNameTag, toDate } from "@/utils/filtering";

const validFilters = {
name: { placeholder: "name", type: String, handler: contains("name"), menuItem: true },
Expand Down
5 changes: 2 additions & 3 deletions client/src/components/History/HistoryFilters.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { STATES } from "@/components/History/Content/model/states";
import Filtering, {
compare,
contains,
Expand All @@ -6,9 +7,7 @@ import Filtering, {
quotaSourceFilter,
toBool,
toDate,
} from "utils/filtering";

import { STATES } from "@/components/History/Content/model/states";
} from "@/utils/filtering";

import StatesInfo from "@/components/History/Content/model/StatesInfo.vue";

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/HistoryExport/ToLink.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const TEST_HISTORY_ID = "hist1235";
const TEST_EXPORTS_URL = `/api/histories/${TEST_HISTORY_ID}/exports`;
const TEST_JOB_ID = "test1234job";

jest.mock("components/JobStates/wait");
jest.mock("@/components/JobStates/wait");

describe("ToLink.vue", () => {
let axiosMock;
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/HistoryExport/ToRemoteFile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const TEST_HISTORY_ID = "hist1235";
const TEST_JOB_ID = "job123789";
const TEST_EXPORTS_URL = `/api/histories/${TEST_HISTORY_ID}/exports`;

jest.mock("components/JobStates/wait");
jest.mock("@/components/JobStates/wait");

describe("ToRemoteFile.vue", () => {
let axiosMock;
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/JobInformation/CodeRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
import { library } from "@fortawesome/fontawesome-svg-core";
import { faCompressAlt, faExpandAlt } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import HelpText from "components/Help/HelpText";
import HelpText from "@/components/Help/HelpText";
library.add(faCompressAlt, faExpandAlt);
export default {
Expand Down
5 changes: 0 additions & 5 deletions client/src/components/JobInformation/JobInformation.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<script setup>
import CopyToClipboard from "components/CopyToClipboard";
import HelpText from "components/Help/HelpText";
import { JobDetailsProvider } from "components/providers/JobProvider";
import UtcDate from "components/UtcDate";
import { NON_TERMINAL_STATES } from "components/WorkflowInvocationState/util";
import { formatDuration, intervalToDuration } from "date-fns";
import { computed, ref } from "vue";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/JobInformation/JobOutputs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { shallowMount } from "@vue/test-utils";

import JobOutputs from "./JobOutputs";

jest.mock("components/providers/DatasetCollectionProvider");
jest.mock("@/components/providers/DatasetCollectionProvider");

describe("JobInformation/JobOutputs.vue", () => {
let wrapper;
Expand Down
5 changes: 3 additions & 2 deletions client/src/components/JobStates/wait.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import axios from "axios";
import { ERROR_STATES, NON_TERMINAL_STATES } from "components/WorkflowInvocationState/util";
import { getAppRoot } from "onload/loadConfig";

import { ERROR_STATES, NON_TERMINAL_STATES } from "@/components/WorkflowInvocationState/util";
import { getAppRoot } from "@/onload/loadConfig";

export function waitOnJob(jobId, onStateUpdate = null, interval = 1000) {
// full=true to capture standard error on last iteration for building
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import restrictedDatasetResponse from "./testData/restrictedDataset.json";
import unrestrictedDatasetResponse from "./testData/unrestrictedDataset.json";

jest.mock("app");
jest.mock("onload/loadConfig");
jest.mock("@/onload/loadConfig");
getAppRoot.mockImplementation(() => "/");
jest.mock("../services");

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Login/ChangePassword.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { withPrefix } from "@/utils/redirect";

import MountTarget from "./ChangePassword.vue";

jest.mock("utils/redirect");
jest.mock("@/utils/redirect");

const mockSafePath = jest.fn();
(withPrefix as jest.Mock).mockImplementation(mockSafePath);
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Markdown/MarkdownContainer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { withPrefix } from "@/utils/redirect";
import MountTarget from "./MarkdownContainer.vue";

// mock routes
jest.mock("utils/redirect");
jest.mock("@/utils/redirect");
withPrefix.mockImplementation((url) => url);

jest.mock("@/composables/config", () => ({
Expand Down
37 changes: 19 additions & 18 deletions client/src/components/RuleCollectionBuilder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -569,29 +569,30 @@
import HotTable from "@handsontable/vue";
import axios from "axios";
import BootstrapVue from "bootstrap-vue";
import ColumnSelector from "components/RuleBuilder/ColumnSelector";
import IdentifierDisplay from "components/RuleBuilder/IdentifierDisplay";
import RegularExpressionInput from "components/RuleBuilder/RegularExpressionInput";
import RuleDefs from "components/RuleBuilder/rule-definitions";
import RuleComponent from "components/RuleBuilder/RuleComponent";
import RuleDisplay from "components/RuleBuilder/RuleDisplay";
import RuleModalFooter from "components/RuleBuilder/RuleModalFooter";
import RuleModalHeader from "components/RuleBuilder/RuleModalHeader";
import RuleModalMiddle from "components/RuleBuilder/RuleModalMiddle";
import RuleTargetComponent from "components/RuleBuilder/RuleTargetComponent";
import SavedRulesSelector from "components/RuleBuilder/SavedRulesSelector";
import SaveRules from "components/RuleBuilder/SaveRules";
import StateDiv from "components/RuleBuilder/StateDiv";
import Select2 from "components/Select2";
import UploadUtils from "components/Upload/utils";
import { ERROR_STATES, NON_TERMINAL_STATES } from "components/WorkflowInvocationState/util";
import $ from "jquery";
import _ from "underscore";
import { refreshContentsWrapper } from "utils/data";
import _l from "utils/localization";
import Vue from "vue";
import { getGalaxyInstance } from "@/app";
import ColumnSelector from "@/components/RuleBuilder/ColumnSelector";
import IdentifierDisplay from "@/components/RuleBuilder/IdentifierDisplay";
import RegularExpressionInput from "@/components/RuleBuilder/RegularExpressionInput";
import RuleDefs from "@/components/RuleBuilder/rule-definitions";
import RuleComponent from "@/components/RuleBuilder/RuleComponent";
import RuleDisplay from "@/components/RuleBuilder/RuleDisplay";
import RuleModalFooter from "@/components/RuleBuilder/RuleModalFooter";
import RuleModalHeader from "@/components/RuleBuilder/RuleModalHeader";
import RuleModalMiddle from "@/components/RuleBuilder/RuleModalMiddle";
import RuleTargetComponent from "@/components/RuleBuilder/RuleTargetComponent";
import SavedRulesSelector from "@/components/RuleBuilder/SavedRulesSelector";
import SaveRules from "@/components/RuleBuilder/SaveRules";
import StateDiv from "@/components/RuleBuilder/StateDiv";
import Select2 from "@/components/Select2";
import UploadUtils from "@/components/Upload/utils";
import { ERROR_STATES, NON_TERMINAL_STATES } from "@/components/WorkflowInvocationState/util";
import { getAppRoot } from "@/onload/loadConfig";
import { refreshContentsWrapper } from "@/utils/data";
import _l from "@/utils/localization";
import TooltipOnHover from "@/components/TooltipOnHover.vue";
Expand Down
1 change: 0 additions & 1 deletion client/src/components/ToolRecommendation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { getDatatypesMapper } from "@/components/Datatypes";
import { getToolPredictions } from "@/components/Workflow/Editor/modules/services";
import { getCompatibleRecommendations } from "@/components/Workflow/Editor/modules/utilities";
import { getAppRoot } from "@/onload/loadConfig";
import { getShortToolId } from "@/utils/tool";
export default {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Services } from "../services";
import Details from "./Details";

jest.mock("app");
jest.mock("onload/loadConfig");
jest.mock("@/onload/loadConfig");
getAppRoot.mockImplementation(() => "/");
jest.mock("../services");

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Toolshed/InstalledList/Index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Services } from "../services";
import Index from "./Index";

jest.mock("app");
jest.mock("onload/loadConfig");
jest.mock("@/onload/loadConfig");
getAppRoot.mockImplementation(() => "/");
jest.mock("../services");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Services } from "../services";
import Monitor from "./Monitor";

jest.mock("app");
jest.mock("onload/loadConfig");
jest.mock("@/onload/loadConfig");
getAppRoot.mockImplementation(() => "/");
jest.mock("../services");

Expand Down
3 changes: 1 addition & 2 deletions client/src/components/Visualizations/PluginList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,12 @@
</template>
<script>
import axios from "axios";
import { absPath } from "utils/redirect";
import { getGalaxyInstance } from "@/app";
import DelayedInput from "@/components/Common/DelayedInput";
import { getAppRoot } from "@/onload/loadConfig";
import _l from "@/utils/localization";
import { absPath } from "@/utils/redirect";
export default {
components: {
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Workflow/Editor/Index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import Index from "./Index.vue";
const localVue = getLocalVue();
localVue.use(PiniaVuePlugin);

jest.mock("components/Datatypes/factory");
jest.mock("@/components/Datatypes/factory");
jest.mock("./modules/services");
jest.mock("layout/modal");
jest.mock("onload/loadConfig");
jest.mock("@/onload/loadConfig");
jest.mock("./modules/utilities");

jest.mock("app");
Expand Down
11 changes: 6 additions & 5 deletions client/src/components/admin/JobsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,12 @@

<script>
import axios from "axios";
import filtersMixin from "components/Indices/filtersMixin";
import { jobsProvider } from "components/providers/JobProvider";
import { NON_TERMINAL_STATES } from "components/WorkflowInvocationState/util";
import { getAppRoot } from "onload/loadConfig";
import { errorMessageAsString } from "utils/simple-error";
import filtersMixin from "@/components/Indices/filtersMixin";
import { jobsProvider } from "@/components/providers/JobProvider";
import { NON_TERMINAL_STATES } from "@/components/WorkflowInvocationState/util";
import { getAppRoot } from "@/onload/loadConfig";
import { errorMessageAsString } from "@/utils/simple-error";
import { commonJobFields } from "./JobFields";
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/providers/utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { NON_TERMINAL_STATES } from "components/WorkflowInvocationState/util";
import { snakeCase } from "lodash";

import { NON_TERMINAL_STATES } from "@/components/WorkflowInvocationState/util";

export function stateIsTerminal(result) {
return !NON_TERMINAL_STATES.includes(result.state);
}
Expand Down
8 changes: 4 additions & 4 deletions client/tests/jest/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
*/
import { createLocalVue, shallowMount } from "@vue/test-utils";
import BootstrapVue from "bootstrap-vue";
import { iconPlugin } from "components/plugins/icons";
import { localizationPlugin } from "components/plugins/localization";
import { vueRxShortcutPlugin } from "components/plugins/vueRxShortcuts";
import { iconPlugin } from "@/components/plugins/icons";
import { localizationPlugin } from "@/components/plugins/localization";
import { vueRxShortcutPlugin } from "@/components/plugins/vueRxShortcuts";
import { PiniaVuePlugin } from "pinia";
import { fromEventPattern, timer } from "rxjs";
import { debounceTime, take, takeUntil } from "rxjs/operators";
import _l from "utils/localization";
import _l from "@/utils/localization";

import _short from "@/components/plugins/short";
import VueRouter from "vue-router";
Expand Down
1 change: 0 additions & 1 deletion client/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const scriptsBase = path.resolve(__dirname, "./src");
const styleBase = path.join(scriptsBase, "style");
const buildDate = new Date();


console.debug(license);
export default defineConfig({
define: {
Expand Down

0 comments on commit bdd2b18

Please sign in to comment.