Przeglądaj źródła

:sparkles: added a test command

tags/0.0.1^2
J 3 lat temu
rodzic
commit
3c943d36c5

+ 2
- 1
frontend/package.json Wyświetl plik

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

+ 3
- 3
frontend/src/components/MainNav.vue Wyświetl plik

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

+ 4
- 8
frontend/src/views/HomeView.vue Wyświetl plik

2
 main.view--home(
2
 main.view--home(
3
     style='display: flex; flex-direction: column; gap: 40px; margin-top: 1em'
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
     article(v-if='cards.length && !loading')
8
     article(v-if='cards.length && !loading')
7
         ProfileCardList(:pid='pid' :profiles='cards' @reload='getCards')
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
     p(v-else) Loading...
12
     p(v-else) Loading...
17
 
13
 
18
     MainNav
14
     MainNav

+ 6
- 5
frontend/src/views/MatchesView.vue Wyświetl plik

1
 <template lang="pug">
1
 <template lang="pug">
2
 main.view--matches.f-col.start.w-full
2
 main.view--matches.f-col.start.w-full
3
     header
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
     p(v-else) Loading...
10
     p(v-else) Loading...
10
-    
11
+
11
     MainNav
12
     MainNav
12
 </template>
13
 </template>
13
 
14
 

+ 5
- 0
frontend/tests/test.js Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz