Преглед изворни кода

:sparkles: added a test command

tags/0.0.1^2
J пре 3 година
родитељ
комит
3c943d36c5

+ 2
- 1
frontend/package.json Прегледај датотеку

@@ -1,6 +1,7 @@
1 1
 {
2 2
     "name": "vite-project",
3 3
     "version": "0.0.0",
4
+    "type": "module",
4 5
     "scripts": {
5 6
         "nodev": "cross-env VITE_DEV=false vite",
6 7
         "dev": "cross-env VITE_DEV=true vite",
@@ -8,7 +9,7 @@
8 9
         "serve": "vite preview",
9 10
         "lint": "eslint --ext .js,.vue --fix src",
10 11
         "format": "prettier .  --write",
11
-        "test": "echo 'no tests at this time...'"
12
+        "test": "ava"
12 13
     },
13 14
     "dependencies": {
14 15
         "joi": "^17.6.0",

+ 3
- 3
frontend/src/components/MainNav.vue Прегледај датотеку

@@ -3,15 +3,15 @@ w-toolbar.mt6.py1.no-grow(bottom)
3 3
     router-link.w-flex.column(:to='`/chats`')
4 4
         w-button.pa5.bdrsr.bd1.sh1(bg-color='primary' disabled)
5 5
             w-icon.mr1(xl) mdi mdi-forum
6
-            p.text-upper chats
6
+            p.text-upper active chats
7 7
     router-link.w-flex.column(:to='`/matches`')
8 8
         w-button.pa5.bdrsr.bd1.sh1(bg-color='primary')
9 9
             w-icon.mr1(xl) mdi mdi-tooltip-account
10
-            p.text-upper matches
10
+            p.text-upper pending matches
11 11
     router-link.w-flex.column(:to='`/`')
12 12
         w-button.pa5.bdrsr.bd1.sh1(bg-color='primary')
13 13
             w-icon.mr1(xl) mdi mdi-home
14
-            p.text-upper home
14
+            p.text-upper home queue
15 15
     router-link.w-flex.column(:to='`/survey`')
16 16
         w-button.pa5.bdrsr.bd1.sh1(bg-color='primary')
17 17
             w-icon.mr1(xl) mdi mdi-account-check

+ 4
- 8
frontend/src/views/HomeView.vue Прегледај датотеку

@@ -2,17 +2,13 @@
2 2
 main.view--home(
3 3
     style='display: flex; flex-direction: column; gap: 40px; margin-top: 1em'
4 4
 )
5
-    h2 Match Queue
5
+    header
6
+        h2 Match Queue
7
+
6 8
     article(v-if='cards.length && !loading')
7 9
         ProfileCardList(:pid='pid' :profiles='cards' @reload='getCards')
8 10
 
9
-    p(v-else) Loading...
10
-
11
-    h2 Matches
12
-    article(v-if='matches.length && !loading')
13
-        ProfileCardList(:pid='pid' :profiles='matches' @reload='getCards')
14
-
15
-    p(v-else-if='matches.length === 0') No matches.
11
+    p(v-else-if='cards.length === 0') No profiles in match_queue.
16 12
     p(v-else) Loading...
17 13
 
18 14
     MainNav

+ 6
- 5
frontend/src/views/MatchesView.vue Прегледај датотеку

@@ -1,13 +1,14 @@
1 1
 <template lang="pug">
2 2
 main.view--matches.f-col.start.w-full
3 3
     header
4
-        h2 Match Page
4
+        h2 Matches
5 5
 
6
-    article(v-if="!loading")
7
-        ProfileCardList(:profiles="cards" :pid="pid" :is-grid="true")
8
-    
6
+    article(v-if='matches.length && !loading')
7
+        ProfileCardList(:pid='pid' :profiles='matches' @reload='getCards')
8
+
9
+    p(v-else-if='matches.length === 0') No matches.
9 10
     p(v-else) Loading...
10
-    
11
+
11 12
     MainNav
12 13
 </template>
13 14
 

+ 5
- 0
frontend/tests/test.js Прегледај датотеку

@@ -0,0 +1,5 @@
1
+import test from 'ava'
2
+
3
+test('make sure ava works on the frontend', async t => {
4
+    t.pass()
5
+})

Loading…
Откажи
Сачувај