Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stable #37

Merged
merged 92 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
4d0b096
intial sign up implementation
bukhosi-eugene-mpande May 27, 2024
9f08b7f
addition of linter action
bukhosi-eugene-mpande May 27, 2024
d59944b
added sign in and changed the background of the auth pages to auroara
bukhosi-eugene-mpande May 28, 2024
e716415
addition of husky
bukhosi-eugene-mpande May 28, 2024
ef506dc
Merge branch 'feature/frontend/signup' of github.com:COS301-SE-2024/C…
bukhosi-eugene-mpande May 28, 2024
a903ec8
added: app.modules.ts
ayandajuqu May 29, 2024
d7937d6
added: auth.controller
ayandajuqu May 29, 2024
4d0fd12
added: auth.modules.ts
ayandajuqu May 29, 2024
1b66744
added: auth.service.ts
ayandajuqu May 29, 2024
05b4978
added: jwt.strategy
ayandajuqu May 29, 2024
ab513e2
initial admin implementation
bukhosi-eugene-mpande May 29, 2024
4a2fb22
modified schema for json response
ayandajuqu May 30, 2024
f0ddb0d
added updateUser endpoint
ayandajuqu May 30, 2024
8c42e70
API: added deleteUser endpoint
ayandajuqu May 30, 2024
8068fc4
API: added structure for organisations
ayandajuqu May 30, 2024
7622a23
added intial form halding for sign up and sign in
bukhosi-eugene-mpande May 30, 2024
bc37b0f
initial implementation of sidebar component
Lunga-Ntando-Ndlovu May 30, 2024
0b15bd2
Merge branch 'feature/frontend/sidebar' into feature/frontend/signup
bukhosi-eugene-mpande May 30, 2024
3fb89ed
API: finalised createOrganisation endpoint and (authorisation)
ayandajuqu May 30, 2024
4ca865f
API: added updateOrganisation endpoit
ayandajuqu May 30, 2024
000b20b
updated sidebar
bukhosi-eugene-mpande May 30, 2024
9d8533c
addition of admin, lecturers and students page
bukhosi-eugene-mpande May 30, 2024
d763f81
added announcement and activities page
bukhosi-eugene-mpande May 31, 2024
aba5a61
removal of left side panel and addition of off-white background color
bukhosi-eugene-mpande May 31, 2024
495c0e9
update schemas
ProkingK May 31, 2024
69fa696
Merge branch 'feature/frontend/signup' of github.com-university:COS30…
joshuawereley May 31, 2024
ff5211a
add user, organisation and workspace
ProkingK May 31, 2024
5147528
add user crud
ProkingK May 31, 2024
56fb3b2
fix user routes
ProkingK May 31, 2024
c90a20d
added profile page, organisation pages
bukhosi-eugene-mpande May 31, 2024
cbfbe27
Merge branch 'feature/frontend/signup' of github.com:COS301-SE-2024/C…
bukhosi-eugene-mpande May 31, 2024
de897f4
add auth
ProkingK May 31, 2024
0bef1f4
add organisation
ProkingK May 31, 2024
a432400
add workspace
ProkingK Jun 1, 2024
e529498
add user utils functions
ProkingK Jun 1, 2024
0d3e040
fix bun.lockb merge conflict
ProkingK Jun 1, 2024
ff35042
update bun.lockb
ProkingK Jun 1, 2024
e38d151
add testing to all backend endpoints
ProkingK Jun 1, 2024
8c9218b
added sign in and sign up handling
bukhosi-eugene-mpande Jun 1, 2024
35791f3
fix to incorrect formating to ensure linter passes
bukhosi-eugene-mpande Jun 1, 2024
7f2cb70
Merge pull request #26 from COS301-SE-2024/feature/frontend/signup
bukhosi-eugene-mpande Jun 1, 2024
3a9a595
Merge pull request #22 from COS301-SE-2024/update/backend
bukhosi-eugene-mpande Jun 1, 2024
520c9ec
edit organisation modal added
bukhosi-eugene-mpande Jun 1, 2024
5b94bc2
changing sign-in to use username instead email
Lunga-Ntando-Ndlovu Jun 1, 2024
37112b3
add signup function
ProkingK Jun 1, 2024
0fb8729
add signup function
ProkingK Jun 1, 2024
90ed165
integration: added signin endpoint
ayandajuqu Jun 1, 2024
25fd80d
integration of degrees dashboard
Lunga-Ntando-Ndlovu Jun 1, 2024
f5389d5
added organisation modals
bukhosi-eugene-mpande Jun 1, 2024
94b3ea4
Merge pull request #28 from COS301-SE-2024/feature/frontend/modals
bukhosi-eugene-mpande Jun 1, 2024
0e4ff49
stored userID
ayandajuqu Jun 1, 2024
0d52e53
Merge branch 'feature/OrgIntegration' into integration/signin_signup
ayandajuqu Jun 1, 2024
945a207
latest add/ org
ayandajuqu Jun 1, 2024
cd3ecb9
add and edit modals added
bukhosi-eugene-mpande Jun 2, 2024
e1a9d37
addition of remove modal
bukhosi-eugene-mpande Jun 2, 2024
7087dbd
integration/add,edit
ayandajuqu Jun 2, 2024
7abb852
Merge pull request #29 from COS301-SE-2024/feature/frontend/modals
Ashley-Kapaso Jun 2, 2024
b2a15a8
Merge branch 'develop' into integration/all
ProkingK Jun 2, 2024
441a601
integration/removeOrganisation
ayandajuqu Jun 2, 2024
f2fc9f3
add admin intergration
ProkingK Jun 2, 2024
ba414d8
add lecture integration
ProkingK Jun 2, 2024
56f6b88
add student integration
ProkingK Jun 2, 2024
a4bdf80
enrollent integration
ProkingK Jun 2, 2024
e3d58e1
Merge branch 'integration/enrollment' into integration/all
ProkingK Jun 2, 2024
798fb3f
run prettier
ProkingK Jun 2, 2024
39dada0
fix tests
ProkingK Jun 2, 2024
513a96b
formating fix
bukhosi-eugene-mpande Jun 2, 2024
cb7fd58
initial implementaion of darkmode
Lunga-Ntando-Ndlovu Jun 2, 2024
662da33
Merge pull request #31 from COS301-SE-2024/integration/all
bukhosi-eugene-mpande Jun 2, 2024
f36e64f
Update README.md/projectboard link
ayandajuqu Jun 2, 2024
1a5052d
Merge branch 'develop' into feature/darkmode
Lunga-Ntando-Ndlovu Jun 2, 2024
2623186
completion of darkmode for sign in and sign up and sidebar
Lunga-Ntando-Ndlovu Jun 2, 2024
0a78428
cypress install
bukhosi-eugene-mpande Jun 2, 2024
e63b8a6
completion of darkmode
Lunga-Ntando-Ndlovu Jun 3, 2024
d3a13b8
fixed issue with linter for files
Lunga-Ntando-Ndlovu Jun 3, 2024
ac1f96a
addition of jest test coverage
Lunga-Ntando-Ndlovu Jun 3, 2024
567dad4
infinite api call loop fix
ayandajuqu Jun 3, 2024
64f7ba0
addition of new test
bukhosi-eugene-mpande Jun 3, 2024
9c847ce
Merge branch 'integration/all' into update/comp-testing
bukhosi-eugene-mpande Jun 3, 2024
0233339
addition of relevant links and removal of non-relevant info
Lunga-Ntando-Ndlovu Jun 3, 2024
4c4b567
frontend tests
bukhosi-eugene-mpande Jun 3, 2024
4ac1450
naming error fix
bukhosi-eugene-mpande Jun 3, 2024
adb9c35
formating fix
bukhosi-eugene-mpande Jun 3, 2024
5cb45ed
Merge pull request #33 from COS301-SE-2024/integration/all
Ashley-Kapaso Jun 3, 2024
769f0fb
Merge pull request #32 from COS301-SE-2024/feature/darkmode
Ashley-Kapaso Jun 3, 2024
0f8c68f
Merge branch 'develop' into update/comp-testing
bukhosi-eugene-mpande Jun 3, 2024
9c3d866
formating fix
bukhosi-eugene-mpande Jun 3, 2024
a4b6362
added link to video
Lunga-Ntando-Ndlovu Jun 3, 2024
18b6703
Merge pull request #34 from COS301-SE-2024/update/comp-testing
Ashley-Kapaso Jun 3, 2024
960c07f
Merge pull request #35 from COS301-SE-2024/update/doumentation
Ashley-Kapaso Jun 3, 2024
66ac4d6
Update README.md
Lunga-Ntando-Ndlovu Jun 3, 2024
9a4a31f
Merge pull request #36 from COS301-SE-2024/develop
Ashley-Kapaso Jun 3, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/backend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
build:
name: Run ESLint
name: Run Backend tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -25,7 +25,7 @@ jobs:
run: bun install
working-directory: src/server/workspace
- name: Run Backend Tests
run: bun run test
run: bun run test:cov
working-directory: src/server/workspace
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/frontend-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Run Frontend Tests
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

jobs:
build:
name: Frontend tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18.17.0
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies for the frontend
run: bun install
working-directory: src/client
- name: Boot frontend
run: bash boot.sh
working-directory: scripts
- name: Run Frontend Tests
run: npm run cy:run-ct
working-directory: src/client
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
working-directory: src/client
- name: Run Backend Linters
run: bun run lint
working-directory: src/server/workspace
working-directory: src/server/workspace
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,16 @@ is revolutionising education by making learning more immersive and engaging.

#### Main Documentation

- [SRS Documentation](#)
- [Software Architectures](#)
- [SRS Documentation](https://drive.google.com/file/d/1wYVm633sFN6IBOVznN6bsqExY96VErcM/view?usp=sharing)
- [Services Contract](https://drive.google.com/file/d/1WEbWfYYVXaN96uxKSO9148U9itmog2K2/view?usp=sharing)

#### Extra Documentation

- [Coding Standards](#)
- [Testing Policy](#)
- [Development Diagram](#)
- [Installation Manual](#)
- [User Manuals](#)

### Demos

#### Demo 1

- [Demo 1 Slides](#)
- [Demo 1 Video](#)
- [Demo 1 Slides](https://docs.google.com/presentation/d/1L8ZY2dsLOlN_DjLjXGGN0u27xAqYxq00/edit?usp=sharing&ouid=106314516968758648353&rtpof=true&sd=true)
- [Demo 1 Video](https://drive.google.com/file/d/1AJAgftIAKCBaGVa4KQGHvoX01R3dvBUb/view?usp=sharing)

### Technologies

Expand All @@ -55,7 +48,7 @@ is revolutionising education by making learning more immersive and engaging.

### Project Management

[Project Board](#)
[Project Board](https://github.com/orgs/COS301-SE-2024/projects/80)

### Team Members And Their Roles

Expand Down
19 changes: 19 additions & 0 deletions scripts/boot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# Start up the frontend
cd ../src/client || exit
bun run dev &

# Store the process ID (PID) of the server
next_pid=$!

# Wait for the server to start up
while ! curl -s http://localhost:5173 > /dev/null
do
echo "Waiting for server to start up..."
sleep 1
done

sleep 10

echo "Server has started."
15 changes: 14 additions & 1 deletion src/client/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,18 @@ module.exports = {
parser: '@typescript-eslint/parser'
}
}
]
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-types': [
'error',
{
extendDefaults: true,
types: {
'{}': false
}
}
],
'@typescript-eslint/no-namespace': 'off'
}
};
2 changes: 1 addition & 1 deletion src/client/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
Binary file modified src/client/bun.lockb
Binary file not shown.
15 changes: 15 additions & 0 deletions src/client/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineConfig } from 'cypress';

export default defineConfig({
component: {
devServer: {
framework: 'svelte',
bundler: 'vite'
},
typescript: {
configFile: './tsconfig.json'
}
},

e2e: {}
});
22 changes: 22 additions & 0 deletions src/client/cypress/e2e/act.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
describe('Activities page', () => {
it('displays the heading', () => {
cy.visit('http://localhost:5173/activities');
cy.get('h1').contains('Activities').should('be.visible');
});

const activities = [
'Budget Planning Meeting',
'Faculty Evaluation',
'Student Affairs Committee',
'Campus Safety Review',
'Strategic Planning Workshop',
'Alumni Networking Event'
];

activities.forEach((activity) => {
it(`displays the activity: ${activity}`, () => {
cy.visit('http://localhost:5173/activities');
cy.contains(activity).should('be.visible');
});
});
});
16 changes: 16 additions & 0 deletions src/client/cypress/e2e/adm.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
describe('Admins page', () => {
it('displays the heading', () => {
cy.visit('http://localhost:5173/admins');
cy.get('h2').contains('Admins').should('be.visible');
});

it('displays the button', () => {
cy.visit('http://localhost:5173/admins');
cy.get('button').should('be.visible');
});

it('displays the search input', () => {
cy.visit('http://localhost:5173/admins');
cy.get('input[type="text"]').should('be.visible');
});
});
15 changes: 15 additions & 0 deletions src/client/cypress/e2e/ann.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
describe('Announcements page', () => {
it('displays the heading', () => {
cy.visit('http://localhost:5173/announcements');
cy.get('h1').contains('Announcements').should('be.visible');
});

const announcements = ['Campus Safety Drill', 'New Library Hours', 'Guest Lecture Series'];

announcements.forEach((announcement) => {
it(`displays the announcement: ${announcement}`, () => {
cy.visit('http://localhost:5173/announcements');
cy.contains(announcement).should('be.visible');
});
});
});
28 changes: 28 additions & 0 deletions src/client/cypress/e2e/hm.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
describe('Degree Dashboard page', () => {
it('displays the heading', () => {
cy.visit('http://localhost:5173');
cy.get('h1').contains('Degree Dashboard').should('be.visible');
});

const degrees = [
'BEng Mechanical Engineering',
'BEng Electrical Engineering',
'BEng Civil Engineering',
'BSc Computer Science',
'BEng Chemical Engineering',
'BSc Information Technology',
'MEng Industrial Engineering',
'MEng Mechanical Engineering',
'MEng Electrical Engineering',
'MSc Computer Science',
'PhD Civil Engineering',
'PhD Information Technology'
];

degrees.forEach((degree) => {
it(`displays the degree: ${degree}`, () => {
cy.visit('http://localhost:5173');
cy.contains(degree).should('be.visible');
});
});
});
16 changes: 16 additions & 0 deletions src/client/cypress/e2e/lec.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
describe('Lecturers page', () => {
it('displays the heading', () => {
cy.visit('http://localhost:5173/lecturers');
cy.get('h2').contains('Lecturers').should('be.visible');
});

it('displays the button', () => {
cy.visit('http://localhost:5173/lecturers');
cy.get('button').should('be.visible');
});

it('displays the search input', () => {
cy.visit('http://localhost:5173/lecturers');
cy.get('input[type="text"]').should('be.visible');
});
});
11 changes: 11 additions & 0 deletions src/client/cypress/e2e/org.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
describe('Organisation page', () => {
it('displays the heading', () => {
cy.visit('http://localhost:5173/organisation');
cy.get('h2').contains('Organisation').should('be.visible');
});

it('displays the button', () => {
cy.visit('http://localhost:5173/organisation');
cy.get('button').should('be.visible');
});
});
16 changes: 16 additions & 0 deletions src/client/cypress/e2e/stu.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
describe('Students page', () => {
it('displays the heading', () => {
cy.visit('http://localhost:5173/students');
cy.get('h2').contains('Students').should('be.visible');
});

it('displays the button', () => {
cy.visit('http://localhost:5173/students');
cy.get('button').should('be.visible');
});

it('displays the search input', () => {
cy.visit('http://localhost:5173/students');
cy.get('input[type="text"]').should('be.visible');
});
});
5 changes: 5 additions & 0 deletions src/client/cypress/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}
37 changes: 37 additions & 0 deletions src/client/cypress/support/commands.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/// <reference types="cypress" />
// ***********************************************
// This example commands.ts shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
//
// declare global {
// namespace Cypress {
// interface Chainable {
// login(email: string, password: string): Chainable<void>
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
// }
// }
// }
12 changes: 12 additions & 0 deletions src/client/cypress/support/component-index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>Components App</title>
</head>
<body>
<div data-cy-root></div>
</body>
</html>
39 changes: 39 additions & 0 deletions src/client/cypress/support/component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// ***********************************************************
// This example support/component.ts is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands';

// Alternatively you can use CommonJS syntax:
// require('./commands')

import { mount } from 'cypress/svelte';

// Augment the Cypress namespace to include type definitions for
// your custom command.
// Alternatively, can be defined in cypress/support/component.d.ts
// with a <reference path="./component" /> at the top of your spec.
declare global {
namespace Cypress {
interface Chainable {
mount: typeof mount;
}
}
}

Cypress.Commands.add('mount', mount);

// Example use:
// cy.mount(MyComponent)
Loading
Loading