Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ebe0988
HT-13 Add vue router
JakeMinor Feb 3, 2022
9cf6f3c
HT-13 Create axios request to interact with the api
JakeMinor Feb 3, 2022
651f8f2
HT-13 Add My Bills page and navbar
JakeMinor Feb 3, 2022
7ef84c9
HT-13 Add filtering to table
JakeMinor Feb 3, 2022
b4fc670
HT-13 Add help icon to navbar
JakeMinor Feb 3, 2022
3063724
HT-13 Add pagination to my bills table
JakeMinor Feb 3, 2022
64ad70e
HT-13 Change document title based on route meta data and add spacing …
JakeMinor Feb 3, 2022
47b11e7
HT-13 Add Cypress
JakeMinor Feb 3, 2022
4cc784b
HT-13 Fix backend integration tests
JakeMinor Feb 3, 2022
b582210
HT-13 Add currency conversion
JakeMinor Feb 3, 2022
14fa390
Merge branch 'develop' into HT-13-create-ui-to-view-all-outstanding-b…
JakeMinor Feb 3, 2022
0e9ea07
HT-13 return currency as a float
JakeMinor Feb 3, 2022
a2a702a
HT-13 Add cypress web GUI integration tests and jest unit tests
JakeMinor Feb 3, 2022
a6b41e8
HT-13 Write end to end tests for My Bills and Navbar
JakeMinor Feb 3, 2022
068b8ca
HT-13 fix syntax error
JakeMinor Feb 3, 2022
b215781
HT-13 update workflow to implement both ui testing types
jarrodback Feb 3, 2022
ecfa640
HT-13 Fix workflow file
jarrodback Feb 3, 2022
97e5b6e
HT-13 Remove watch all from test:unit script
JakeMinor Feb 3, 2022
3b55ddf
Merge branch 'HT-13-create-ui-to-view-all-outstanding-bills' of https…
JakeMinor Feb 3, 2022
3bcd62a
HT-13 Fix workflow file #2
jarrodback Feb 3, 2022
2f2e447
Merge branch 'HT-13-create-ui-to-view-all-outstanding-bills' of https…
jarrodback Feb 3, 2022
12975cb
HT-13 Update job name
jarrodback Feb 3, 2022
0bffa8b
HT-13 Attempt to get integration tests working
jarrodback Feb 3, 2022
3ad0657
HT-13 fix steps position
jarrodback Feb 3, 2022
c2871e8
HT-13 add install to workflow
jarrodback Feb 3, 2022
ccf0c36
HT-13 Remove integration workflow for now
jarrodback Feb 3, 2022
5919d6f
HT-13 remove reference to unknown job
jarrodback Feb 3, 2022
92a5f73
HT-13 Add comments as per merge review
JakeMinor Feb 3, 2022
d80fe05
Merge branch 'HT-13-create-ui-to-view-all-outstanding-bills' of https…
JakeMinor Feb 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
server
!server/node_modules

test-ui:
test-ui-unit:
runs-on: ubuntu-latest
needs: [build]

Expand All @@ -61,10 +61,16 @@ jobs:
with:
name: build-ui

- name: UI - run tests
- name: UI - run unit tests
run: |
npm i
npm test
npm run test:unit

- uses: actions/upload-artifact@master
with:
name: coverage-ui
path: |
coverage

test-server:
runs-on: ubuntu-latest
Expand All @@ -84,7 +90,7 @@ jobs:
with:
name: build-server

- name: Server - run tests
- name: Server - run unit and integration tests
run: |
npm i
npm test
Expand All @@ -97,7 +103,7 @@ jobs:

coverage:
runs-on: ubuntu-latest
needs: [test-server,test-ui]
needs: [test-server,test-ui-unit]

if: >-
github.event_name == 'pull_request'
Expand All @@ -106,15 +112,25 @@ jobs:
with:
name: coverage-server

- name: Code Coverage
- name: Code Coverage Server
uses: romeovs/lcov-reporter-action@v0.3.1
with:
lcov-file: lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/download-artifact@master
with:
name: coverage-ui

- name: Code Coverage UI
uses: romeovs/lcov-reporter-action@v0.3.1
with:
lcov-file: lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}

deploy:
runs-on: ubuntu-latest
needs: [test-server,test-ui]
needs: [test-server,test-ui-unit]

if: >-
github.event_name == 'pull_request'
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ node_modules
server/.nyc_output/*.json
server/.nyc_output/processinfo/*.json
server/coverage/lcov-report
ui/coverage/lcov-report
ui/coverage/clover.xml
ui/coverage/coverage-final.json

# local env files
.env.local
Expand Down
2 changes: 1 addition & 1 deletion server/.nyc_output/processinfo/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"processes":{"4d150775-f277-4c3e-a138-a2031d24611b":{"parent":null,"children":[]}},"files":{"C:\\Projects\\CSSD-Assignment\\server\\app.js":["4d150775-f277-4c3e-a138-a2031d24611b"],"C:\\Projects\\CSSD-Assignment\\server\\database\\index.js":["4d150775-f277-4c3e-a138-a2031d24611b"],"C:\\Projects\\CSSD-Assignment\\server\\config\\db.config.js":["4d150775-f277-4c3e-a138-a2031d24611b"],"C:\\Projects\\CSSD-Assignment\\server\\models\\journey.model.js":["4d150775-f277-4c3e-a138-a2031d24611b"],"C:\\Projects\\CSSD-Assignment\\server\\models\\bill.model.js":["4d150775-f277-4c3e-a138-a2031d24611b"],"C:\\Projects\\CSSD-Assignment\\server\\utilities.js":["4d150775-f277-4c3e-a138-a2031d24611b"],"C:\\Projects\\CSSD-Assignment\\server\\models\\location.model.js":["4d150775-f277-4c3e-a138-a2031d24611b"],"C:\\Projects\\CSSD-Assignment\\server\\models\\user.model.js":["4d150775-f277-4c3e-a138-a2031d24611b"],"C:\\Projects\\CSSD-Assignment\\server\\routes\\auth.routes.js":["4d150775-f277-4c3e-a138-a2031d24611b"],"C:\\Projects\\CSSD-Assignment\\server\\controllers\\auth.controller.js":["4d150775-f277-4c3e-a138-a2031d24611b"],"C:\\Projects\\CSSD-Assignment\\server\\business\\user.business.js":["4d150775-f277-4c3e-a138-a2031d24611b"],"C:\\Projects\\CSSD-Assignment\\server\\datalayer\\mongo.js":["4d150775-f277-4c3e-a138-a2031d24611b"],"C:\\Projects\\CSSD-Assignment\\server\\routes\\bill.routes.js":["4d150775-f277-4c3e-a138-a2031d24611b"],"C:\\Projects\\CSSD-Assignment\\server\\controllers\\bill.controller.js":["4d150775-f277-4c3e-a138-a2031d24611b"],"C:\\Projects\\CSSD-Assignment\\server\\business\\bill.business.js":["4d150775-f277-4c3e-a138-a2031d24611b"]},"externalIds":{}}
{"processes":{"12f11c28-311f-49b3-9c08-cfa6cf70d965":{"parent":null,"children":[]}},"files":{"C:\\Projects\\CSSD-Assignment\\server\\app.js":["12f11c28-311f-49b3-9c08-cfa6cf70d965"],"C:\\Projects\\CSSD-Assignment\\server\\database\\index.js":["12f11c28-311f-49b3-9c08-cfa6cf70d965"],"C:\\Projects\\CSSD-Assignment\\server\\config\\db.config.js":["12f11c28-311f-49b3-9c08-cfa6cf70d965"],"C:\\Projects\\CSSD-Assignment\\server\\models\\journey.model.js":["12f11c28-311f-49b3-9c08-cfa6cf70d965"],"C:\\Projects\\CSSD-Assignment\\server\\models\\bill.model.js":["12f11c28-311f-49b3-9c08-cfa6cf70d965"],"C:\\Projects\\CSSD-Assignment\\server\\utilities.js":["12f11c28-311f-49b3-9c08-cfa6cf70d965"],"C:\\Projects\\CSSD-Assignment\\server\\models\\location.model.js":["12f11c28-311f-49b3-9c08-cfa6cf70d965"],"C:\\Projects\\CSSD-Assignment\\server\\models\\user.model.js":["12f11c28-311f-49b3-9c08-cfa6cf70d965"],"C:\\Projects\\CSSD-Assignment\\server\\routes\\auth.routes.js":["12f11c28-311f-49b3-9c08-cfa6cf70d965"],"C:\\Projects\\CSSD-Assignment\\server\\controllers\\auth.controller.js":["12f11c28-311f-49b3-9c08-cfa6cf70d965"],"C:\\Projects\\CSSD-Assignment\\server\\business\\user.business.js":["12f11c28-311f-49b3-9c08-cfa6cf70d965"],"C:\\Projects\\CSSD-Assignment\\server\\datalayer\\mongo.js":["12f11c28-311f-49b3-9c08-cfa6cf70d965"],"C:\\Projects\\CSSD-Assignment\\server\\routes\\bill.routes.js":["12f11c28-311f-49b3-9c08-cfa6cf70d965"],"C:\\Projects\\CSSD-Assignment\\server\\controllers\\bill.controller.js":["12f11c28-311f-49b3-9c08-cfa6cf70d965"],"C:\\Projects\\CSSD-Assignment\\server\\business\\bill.business.js":["12f11c28-311f-49b3-9c08-cfa6cf70d965"]},"externalIds":{}}
1 change: 0 additions & 1 deletion server/business/bill.business.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const DataLayer = require("../datalayer/mongo");
const Utilities = require("../utilities")
const model = require("../database").getModel("bill");
const httpError = require("http-errors");

Expand Down
93 changes: 49 additions & 44 deletions server/coverage/lcov.info
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ BRH:0
end_of_record
TN:
SF:business\bill.business.js
FN:7,(anonymous_0)
FN:15,(anonymous_1)
FN:24,(anonymous_2)
FN:31,(anonymous_3)
FN:36,(anonymous_4)
FN:6,(anonymous_0)
FN:14,(anonymous_1)
FN:23,(anonymous_2)
FN:30,(anonymous_3)
FN:35,(anonymous_4)
FNF:5
FNH:4
FNDA:1,(anonymous_0)
Expand All @@ -63,21 +63,20 @@ FNDA:1,(anonymous_4)
DA:1,1
DA:2,1
DA:3,1
DA:4,1
DA:6,1
DA:9,1
DA:16,5
DA:22,5
DA:25,0
DA:32,2
DA:35,2
DA:36,1
LF:12
LH:11
BRDA:19,0,0,5
BRDA:19,0,1,4
BRDA:20,1,0,5
BRDA:20,1,1,4
DA:5,1
DA:8,1
DA:15,5
DA:21,5
DA:24,0
DA:31,2
DA:34,2
DA:35,1
LF:11
LH:10
BRDA:18,0,0,5
BRDA:18,0,1,4
BRDA:19,1,0,5
BRDA:19,1,1,4
BRF:4
BRH:4
end_of_record
Expand Down Expand Up @@ -240,9 +239,9 @@ TN:
SF:database\index.js
FN:25,(anonymous_0)
FN:29,setRunValidators
FN:39,(anonymous_2)
FN:42,(anonymous_3)
FN:50,(anonymous_4)
FN:38,(anonymous_2)
FN:41,(anonymous_3)
FN:49,(anonymous_4)
FNF:5
FNH:2
FNDA:0,(anonymous_0)
Expand All @@ -267,13 +266,13 @@ DA:25,1
DA:26,0
DA:27,0
DA:30,0
DA:34,1
DA:40,1
DA:33,1
DA:39,1
DA:42,0
DA:43,0
DA:44,0
DA:47,1
DA:49,1
DA:51,2
DA:46,1
DA:48,1
DA:50,2
LF:24
LH:18
BRDA:17,0,0,0
Expand All @@ -285,27 +284,33 @@ TN:
SF:datalayer\mongo.js
FN:2,(anonymous_0)
FN:10,(anonymous_1)
FN:20,(anonymous_2)
FN:27,(anonymous_3)
FN:34,(anonymous_4)
FN:37,(anonymous_5)
FNF:6
FNH:6
FN:15,(anonymous_2)
FN:16,(anonymous_3)
FN:25,(anonymous_4)
FN:32,(anonymous_5)
FN:39,(anonymous_6)
FN:42,(anonymous_7)
FNF:8
FNH:8
FNDA:2,(anonymous_0)
FNDA:5,(anonymous_1)
FNDA:2,(anonymous_2)
FNDA:3,(anonymous_3)
FNDA:5,(anonymous_2)
FNDA:5,(anonymous_3)
FNDA:2,(anonymous_4)
FNDA:1,(anonymous_5)
FNDA:3,(anonymous_5)
FNDA:2,(anonymous_6)
FNDA:1,(anonymous_7)
DA:4,2
DA:11,5
DA:21,2
DA:28,3
DA:35,2
DA:37,1
DA:16,5
DA:17,5
DA:26,2
DA:33,3
DA:40,2
DA:42,1
LF:7
LH:7
DA:47,1
LF:9
LH:9
BRF:0
BRH:0
end_of_record
Expand Down
5 changes: 5 additions & 0 deletions server/datalayer/mongo.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ class DataLayer {
.limit(filter.limit)
.skip(filter.offset * filter.limit)
.populate(JSON.parse(JSON.stringify(populateFilter)))
.then((bills) => {
return this.model.countDocuments().then((count) => {
return {bills: bills, count: count}
})
})
}

/**
Expand Down
Loading