From e39050ed97c1277136cde6af9c986acad2a922ac Mon Sep 17 00:00:00 2001
From: hujambo-dunia <“MSavage07@gsb.columbia.edu”>
Date: Thu, 26 May 2022 13:14:02 -0400
Subject: [PATCH 1/6] new Vue file with retained SEO performance considerations
and test script
---
client/src/components/Tour/Tour.test.js | 30 ++++++++
client/src/components/Tour/TourList.vue | 80 +++++++++++++++++++++
client/src/entry/analysis/AnalysisRouter.js | 5 +-
client/src/layout/menu.js | 5 ++
4 files changed, 119 insertions(+), 1 deletion(-)
create mode 100644 client/src/components/Tour/Tour.test.js
create mode 100644 client/src/components/Tour/TourList.vue
diff --git a/client/src/components/Tour/Tour.test.js b/client/src/components/Tour/Tour.test.js
new file mode 100644
index 00000000000..b1d6eb74b2d
--- /dev/null
+++ b/client/src/components/Tour/Tour.test.js
@@ -0,0 +1,30 @@
+import { shallowMount } from "@vue/test-utils";
+import { getLocalVue } from "jest/helpers";
+import TourList from "./TourList.vue";
+import MockAdapter from "axios-mock-adapter";
+import axios from "axios";
+import flushPromises from "flush-promises";
+
+const localVue = getLocalVue();
+const TEST_TOUR_URI = "/api/tours";
+
+jest.mock("app");
+
+describe("Tour", () => {
+ let axiosMock;
+ let wrapper;
+
+ beforeEach(async () => {
+ axiosMock = new MockAdapter(axios);
+ axiosMock.onGet(TEST_TOUR_URI).reply(200, [{ id: "foo", writable: false }]);
+ wrapper = shallowMount(TourList, {
+ propsData: {},
+ localVue,
+ });
+ await flushPromises();
+ });
+
+ it("test tours", async () => {
+ expect(wrapper.find("#tourList").exists()).toBeTruthy();
+ });
+});
diff --git a/client/src/components/Tour/TourList.vue b/client/src/components/Tour/TourList.vue
new file mode 100644
index 00000000000..57442a54172
--- /dev/null
+++ b/client/src/components/Tour/TourList.vue
@@ -0,0 +1,80 @@
+
+
+
Galaxy Tours
+
+ This page presents a list of interactive tours available on this Galaxy server. Select any tour to get
+ started (and remember, you can click 'End Tour' at any time).
+