Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
9001fa5
update readme
vherus Jul 12, 2024
5387d5a
add line space
Hamada-AB Jul 16, 2024
89585e7
change step 2 to step 4
MyrtheDullaart Jul 17, 2024
5fd7850
add step 2 form
MyrtheDullaart Jul 17, 2024
6cc68c8
handle login error messages
Hamada-AB Jul 17, 2024
dd8d7c5
add step 3 for create profile form
Jul 17, 2024
0f85b67
add * for required fields
MyrtheDullaart Jul 17, 2024
d2b7307
fix: add default value to readOnly and variable for the ternary Butto…
Jul 17, 2024
690c9af
Merge pull request #31 from boolean-uk/LeonardoSaraceli-#23-create_pr…
LeonardoSaraceli Jul 17, 2024
3430344
resolve conflicts
MyrtheDullaart Jul 17, 2024
4e704b4
edit stepper order
MyrtheDullaart Jul 17, 2024
cf26efd
Merge pull request #32 from boolean-uk/myrthedullaart-#23-create-step…
MyrtheDullaart Jul 17, 2024
2f933f4
handle registration error messages-c
Hamada-AB Jul 17, 2024
f7a4251
remove comments/ use {}
Hamada-AB Jul 18, 2024
29034c9
res conflict
Hamada-AB Jul 18, 2024
803e730
resolve conflict
Hamada-AB Jul 18, 2024
8ea78d4
fix: step 2 from create profile and improve token logic
Jul 18, 2024
2d64fa7
style: formatting changes
Jul 18, 2024
c50490b
Merge pull request #44 from boolean-uk/LeonardoSaraceli-#40-fix_creat…
LeonardoSaraceli Jul 18, 2024
2c19a24
fix: required first and last names at create profile and remove back …
Jul 18, 2024
27ec195
handle login/resgitration error messages
Hamada-AB Jul 19, 2024
4354c2a
fix: remove data from stepper
Jul 19, 2024
8cb8117
fix: adjust can progress at step one
Jul 19, 2024
c2c50e5
merge main
Hamada-AB Jul 19, 2024
2a89688
fix: set can progress boolean to true
Jul 19, 2024
8c76165
remove the debug log
Hamada-AB Jul 19, 2024
b82ca26
Merge pull request #35 from boolean-uk/Hamada-AB-#12-user_login_regis…
Hamada-AB Jul 19, 2024
8f2cd4f
fix: merge to main
Jul 19, 2024
b4188a3
style: adjust position of icon
Jul 19, 2024
4c551a3
Merge pull request #48 from boolean-uk/LeonardoSaraceli-#43-require_f…
LeonardoSaraceli Jul 19, 2024
15cf732
fix navigation on create profile
MyrtheDullaart Jul 19, 2024
64ebbf5
Merge pull request #55 from boolean-uk/myrthedullaart-#49-fix-navigation
MyrtheDullaart Jul 19, 2024
10d17f4
fix: password bug not changing value
Jul 19, 2024
82189e9
Merge pull request #60 from boolean-uk/LeonardoSaraceli-#59-password_…
LeonardoSaraceli Jul 19, 2024
edd8af4
fix typo
MyrtheDullaart Jul 19, 2024
45e6925
Merge pull request #63 from boolean-uk/myrthedullaart-#62-fix-typo
MyrtheDullaart Jul 19, 2024
5715862
Locate hardcoded values
angustownsley Jul 22, 2024
c9fa909
Create current user context and replace hardcoded data
angustownsley Jul 22, 2024
8b1748d
feat: install vite
Jul 22, 2024
8773fdd
fix: env name
Jul 22, 2024
ec32e2e
fix: undo env change name
Jul 22, 2024
1e01e3b
fix: change env name
Jul 22, 2024
8ba6750
fix: change icon
Jul 22, 2024
5def8a5
Merge pull request #84 from boolean-uk/LeonardoSaraceli-#69-install_vite
LeonardoSaraceli Jul 22, 2024
2c00232
fix:(auth) prevent login redirect during profile creation after refresh
Hamada-AB Jul 22, 2024
30c3b7e
Merge branch 'main' into Hamada-AB-#81-prevent_login_redirect_during_…
Hamada-AB Jul 22, 2024
9bc4274
Implement requested changes
angustownsley Jul 22, 2024
12409ec
Merge branch 'main' into angustownsley-79-fix_hardcoded_user_details
angustownsley Jul 22, 2024
0dd816d
Resolve merge conflict
angustownsley Jul 22, 2024
dbb049e
Extracted relevant data into components
angustownsley Jul 22, 2024
2f57e3f
Remove unused import
angustownsley Jul 23, 2024
5bbd7d3
Implement requested changes
angustownsley Jul 23, 2024
e031954
Merge pull request #83 from boolean-uk/angustownsley-79-fix_hardcoded…
angustownsley Jul 23, 2024
4cd76c0
Update to reference correct cohort key
angustownsley Jul 23, 2024
ed2543d
Remove unused function
angustownsley Jul 23, 2024
3ac179e
Merge pull request #91 from boolean-uk/angustownsley-fix_object_key_r…
angustownsley Jul 23, 2024
28fb3a6
update env and run npm ci
PerikK Jul 23, 2024
33079a3
feat: add search students modal
Jul 23, 2024
0febf5f
fix: merge main
Jul 23, 2024
63f2948
style: formmat
Jul 23, 2024
22e6070
merge main
Hamada-AB Jul 23, 2024
c4ac799
refactor(auth):use return and delete else block
Hamada-AB Jul 23, 2024
bfd5919
feat: add student menu modal
Jul 23, 2024
3f35562
Merge pull request #85 from boolean-uk/Hamada-AB-#81-prevent_login_re…
Hamada-AB Jul 23, 2024
7c702de
update env and run npm ci
PerikK Jul 23, 2024
e4b07f6
fix: adjust filter from search
Jul 23, 2024
40fdb45
fix: return null
Jul 23, 2024
b82c5a8
fix: change b tag for span tag
Jul 23, 2024
4812fab
Merge pull request #92 from boolean-uk/LeonardoSaraceli-#74-create_se…
LeonardoSaraceli Jul 23, 2024
e0a4e7a
pull
PerikK Jul 23, 2024
a2bb8db
trying to pull
PerikK Jul 23, 2024
1943acb
fix: missing components
Jul 23, 2024
2c2d74b
Merge pull request #94 from boolean-uk/LeonardoSaraceli-#93-fix_auth_…
LeonardoSaraceli Jul 23, 2024
11d52e9
Merge branch 'main' of github.com:boolean-uk/team-dev-client-c12
PerikK Jul 23, 2024
434c7c2
Remove hardcoded data
angustownsley Jul 24, 2024
952f537
fix: nullable firstName and lastName
Jul 24, 2024
3758455
Merge pull request #97 from boolean-uk/angustownsley-96-remove_hardco…
angustownsley Jul 24, 2024
4ccb713
Merge pull request #99 from boolean-uk/LeonardoSaraceli-#98-fix_nulla…
LeonardoSaraceli Jul 24, 2024
91db862
fix close popup on window click
MyrtheDullaart Jul 24, 2024
dea7f97
Merge branch 'main' of github.com:boolean-uk/team-dev-client-c12
PerikK Jul 24, 2024
1c87abe
resolve merge conflicts
MyrtheDullaart Jul 24, 2024
94ce472
Fix: nullable user initials and its full name when searching
Jul 24, 2024
e427c37
Fix: searching fullName instead of firstName or lastName
Jul 24, 2024
437eb6a
Fix: only people with firstName and lastName should be searched
Jul 24, 2024
78a04b1
Merge pull request #101 from boolean-uk/LeonardoSaraceli-#100-fix_nul…
LeonardoSaraceli Jul 24, 2024
b917a15
Merge branch 'main' of github.com:boolean-uk/team-dev-client-c12
PerikK Jul 24, 2024
a4cc481
fix clicking outside of menu should close it
MyrtheDullaart Jul 24, 2024
f3326fc
resolve conflicts
MyrtheDullaart Jul 24, 2024
7b700e5
Fix bug not allowing logged in users to access other routes
angustownsley Jul 24, 2024
57fcd01
Merge pull request #104 from boolean-uk/myrthedullaart-#80-close-moda…
MyrtheDullaart Jul 24, 2024
86bab0f
Remove workaround for get user endpoint bug
angustownsley Jul 24, 2024
cba2918
Add accessing parameters safely
angustownsley Jul 24, 2024
b0d20b0
Merge pull request #106 from boolean-uk/angustownsley-102-fix_navigat…
angustownsley Jul 24, 2024
957fdd1
first try on all search results - add left arrow svg
PerikK Jul 24, 2024
09e7203
Merge branch 'main' of github.com:boolean-uk/team-dev-client-c12
PerikK Jul 24, 2024
60a049a
Merge branch 'main' into PeriK_#76_Create_search_all_results-student_…
PerikK Jul 24, 2024
bc83f17
search results page (student-view) created -routing provided
PerikK Jul 24, 2024
1763be0
starting css
PerikK Jul 24, 2024
c0963c2
set up for fronten
tzoltie Jul 24, 2024
1f7e596
Some css done needs more
PerikK Jul 24, 2024
221f1ad
more css - -arrow link not working -moved to pages
PerikK Jul 25, 2024
36974bf
removed some superfluous code
PerikK Jul 25, 2024
b9052fe
Redirect users to profile stepper if firstName is missing
angustownsley Jul 25, 2024
7526b79
Remove redundant if
angustownsley Jul 25, 2024
aa5a71e
arrow link now works -fixed bug where when naviagting to the results …
PerikK Jul 25, 2024
cb265a2
Remove user nested objects workaround
angustownsley Jul 25, 2024
e2c4f40
Added route and nav bar link:
MrStashy Jul 25, 2024
d6840a3
change arrow size -alter some styling
PerikK Jul 25, 2024
64ab727
Merge pull request #113 from boolean-uk/angustownsley-107-users_witho…
angustownsley Jul 25, 2024
1fe2390
login component tests created
tzoltie Jul 25, 2024
a2aea2b
styling closer to design
PerikK Jul 25, 2024
a64f21b
Merge branch 'main' of github.com:boolean-uk/team-dev-client-c12
PerikK Jul 25, 2024
2612d1d
Merge branch 'main' into PeriK_#76_Create_search_all_results-student_…
PerikK Jul 25, 2024
3c410be
Page layout set with card import
MrStashy Jul 25, 2024
a8136e9
dashboard component test created
tzoltie Jul 25, 2024
dddf834
apllied changes according to boss demands
PerikK Jul 25, 2024
5bb9115
Revert "update env and run npm ci"
PerikK Jul 25, 2024
be1f909
run npm ci
PerikK Jul 25, 2024
7705e23
Merge branch 'main' into PeriK_#76_Create_search_all_results-student_…
PerikK Jul 25, 2024
6cd9ed4
add create new post
MyrtheDullaart Jul 25, 2024
ebbf9d3
Merge branch 'main' into myrthedullaart-#112-create-new-post
MyrtheDullaart Jul 25, 2024
644016a
Merge pull request #116 from boolean-uk/myrthedullaart-#112-create-ne…
MyrtheDullaart Jul 25, 2024
96d533a
Create errors file
angustownsley Jul 25, 2024
3a5b368
Merge branch 'main' into angustownsley-115-move_errors_to_seperate_file
angustownsley Jul 25, 2024
daa3684
UserDetails card added to profile page
MrStashy Jul 25, 2024
17d8de0
refactor on change to not use cohorts but getUsers
PerikK Jul 25, 2024
6917cf5
Merge pull request #117 from boolean-uk/angustownsley-115-move_errors…
angustownsley Jul 25, 2024
151994d
Merge branch 'main' of github.com:boolean-uk/team-dev-client-c12
PerikK Jul 25, 2024
cfee914
Merge branch 'main' into PeriK_#76_Create_search_all_results-student_…
PerikK Jul 25, 2024
6783a5d
Added user details to top of card
MrStashy Jul 25, 2024
e42559b
refactor to get initials before the return block
PerikK Jul 25, 2024
8328830
Merge pull request #114 from boolean-uk/PeriK_#76_Create_search_all_r…
PerikK Jul 25, 2024
9a1c257
IMported text input
MrStashy Jul 25, 2024
7db3504
cypress library test suit added
tzoltie Jul 26, 2024
5637e9b
fixed currentUser to properly redirect
PerikK Jul 26, 2024
3db8d37
feat:user side errors handler for login and register pages
Jul 26, 2024
97bc42f
fixed currentUser to properly redirect-fixed pr
PerikK Jul 26, 2024
f20838d
Merge pull request #123 from boolean-uk/Perik_#122_fix_redirect-after…
PerikK Jul 26, 2024
0defb2a
refactor
Jul 26, 2024
53909c7
fix:if statement response changed
Jul 26, 2024
eea7cbb
changed arrow colur according to design
PerikK Jul 26, 2024
4414ea9
add icons for search -teachers view
PerikK Jul 26, 2024
0e5e73b
refactor : validatePassword function
Jul 26, 2024
6674120
Merge pull request #124 from boolean-uk/farshad-#25-user_side_errors_…
FBagdeli Jul 26, 2024
c3b562b
login tests created
tzoltie Jul 26, 2024
a34c3e5
Merge branch 'main' into Perik_#119_Create_search_all_results_teacher…
PerikK Jul 26, 2024
9efa52d
refactored navigation to check for role and render icons accordingly
PerikK Jul 26, 2024
3d0bd0f
login/register component testing update
tzoltie Jul 26, 2024
6d247ad
search-results page refactored to condit- render for teacher and student
PerikK Jul 26, 2024
057db56
some formating in the return block
PerikK Jul 26, 2024
92f9d12
more formating in the return block
PerikK Jul 26, 2024
ad1b0d3
create separate classes for li elements according to current user role
PerikK Jul 27, 2024
8ab666e
change header logout navlink to /login
PerikK Jul 27, 2024
608964e
almost done -a css problem
PerikK Jul 27, 2024
c511f78
css sketchy but seems to work
PerikK Jul 27, 2024
7389c5a
Merge branch 'main' into Perik_#119_Create_search_all_results_teacher…
PerikK Jul 27, 2024
1ef5128
create three dots menu component for teacher view
PerikK Jul 27, 2024
0bc6ee8
add conditional rendering and proper styling for 3 dots menu
PerikK Jul 27, 2024
3b3ddeb
add cohort id in found user details -styling closer to design
PerikK Jul 28, 2024
00e91d0
done except menu -it must pop-up left
PerikK Jul 28, 2024
9fce6e8
some cleanup -menu still not left
PerikK Jul 28, 2024
0c8739a
little more cleanup
PerikK Jul 28, 2024
d3f71d9
corrected teachers view user card styling
PerikK Jul 29, 2024
f0312f9
Refactor
MrStashy Jul 29, 2024
d3c57b0
merge conflicts resolved
tzoltie Jul 29, 2024
0cfcada
menu popsup correctly -some cleaning
PerikK Jul 29, 2024
bb187cb
Input fields populating
MrStashy Jul 29, 2024
c30ca7d
combined ifs in navigation
PerikK Jul 29, 2024
8c12fcb
Merge pull request #126 from boolean-uk/tim_#417_frontend-tests
tzoltie Jul 29, 2024
690b18b
Inputs populate correctly for currently logged-in user
MrStashy Jul 29, 2024
ac9b0b1
SOS
MrStashy Jul 29, 2024
6ea0dc6
Fixed broken git
MrStashy Jul 29, 2024
4fcf92d
Merge pull request #136 from boolean-uk/Perik_#119_Create_search_all_…
PerikK Jul 29, 2024
b00f782
Merged main
MrStashy Jul 29, 2024
4e257b2
Swapped switch statement for labelMap object
MrStashy Jul 30, 2024
6f3bb52
Merge pull request #137 from boolean-uk/MrStashy-111-profile_page
MrStashy Jul 30, 2024
f8b8b04
added dotenv file
homonoviscoding Jul 30, 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
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1 @@
REACT_APP_API_URL="http://localhost:4000"
VITE_API_URL="http://localhost:4000"
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
### Team Dev Client

Client repository for team dev project.

### Set up

1. Copy the `.env.example` file to a new file named `.env` (NOTE: Make sure to copy the file, don't remove the original .env.example)
Expand All @@ -11,8 +7,8 @@ Client repository for team dev project.

### Project Management

https://github.com/orgs/boolean-uk/projects/10/views/1
https://github.com/orgs/boolean-uk/projects/13/views/1

### Contributing

- Pull requests should be made from branches following the naming convention: `<username>-<issue_number>-<feature>`, e.g. `vherus-#1-user_registration`
- Pull requests MUST be made from branches following the naming convention: `<username>-<issue_number>-<feature>`, e.g. `vherus-#1-user_registration`
16 changes: 16 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { defineConfig } from "cypress";

export default defineConfig({
component: {
devServer: {
framework: "react",
bundler: "vite",
},
},

e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});
143 changes: 143 additions & 0 deletions cypress/e2e/1-getting-started/todo.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
/// <reference types="cypress" />

// Welcome to Cypress!
//
// This spec file contains a variety of sample tests
// for a todo list app that are designed to demonstrate
// the power of writing tests in Cypress.
//
// To learn more about how Cypress works and
// what makes it such an awesome testing tool,
// please read our getting started guide:
// https://on.cypress.io/introduction-to-cypress

describe('example to-do app', () => {
beforeEach(() => {
// Cypress starts out with a blank slate for each test
// so we must tell it to visit our website with the `cy.visit()` command.
// Since we want to visit the same URL at the start of all our tests,
// we include it in our beforeEach function so that it runs before each test
cy.visit('https://example.cypress.io/todo')
})

it('displays two todo items by default', () => {
// We use the `cy.get()` command to get all elements that match the selector.
// Then, we use `should` to assert that there are two matched items,
// which are the two default items.
cy.get('.todo-list li').should('have.length', 2)

// We can go even further and check that the default todos each contain
// the correct text. We use the `first` and `last` functions
// to get just the first and last matched elements individually,
// and then perform an assertion with `should`.
cy.get('.todo-list li').first().should('have.text', 'Pay electric bill')
cy.get('.todo-list li').last().should('have.text', 'Walk the dog')
})

it('can add new todo items', () => {
// We'll store our item text in a variable so we can reuse it
const newItem = 'Feed the cat'

// Let's get the input element and use the `type` command to
// input our new list item. After typing the content of our item,
// we need to type the enter key as well in order to submit the input.
// This input has a data-test attribute so we'll use that to select the
// element in accordance with best practices:
// https://on.cypress.io/selecting-elements
cy.get('[data-test=new-todo]').type(`${newItem}{enter}`)

// Now that we've typed our new item, let's check that it actually was added to the list.
// Since it's the newest item, it should exist as the last element in the list.
// In addition, with the two default items, we should have a total of 3 elements in the list.
// Since assertions yield the element that was asserted on,
// we can chain both of these assertions together into a single statement.
cy.get('.todo-list li')
.should('have.length', 3)
.last()
.should('have.text', newItem)
})

it('can check off an item as completed', () => {
// In addition to using the `get` command to get an element by selector,
// we can also use the `contains` command to get an element by its contents.
// However, this will yield the <label>, which is lowest-level element that contains the text.
// In order to check the item, we'll find the <input> element for this <label>
// by traversing up the dom to the parent element. From there, we can `find`
// the child checkbox <input> element and use the `check` command to check it.
cy.contains('Pay electric bill')
.parent()
.find('input[type=checkbox]')
.check()

// Now that we've checked the button, we can go ahead and make sure
// that the list element is now marked as completed.
// Again we'll use `contains` to find the <label> element and then use the `parents` command
// to traverse multiple levels up the dom until we find the corresponding <li> element.
// Once we get that element, we can assert that it has the completed class.
cy.contains('Pay electric bill')
.parents('li')
.should('have.class', 'completed')
})

context('with a checked task', () => {
beforeEach(() => {
// We'll take the command we used above to check off an element
// Since we want to perform multiple tests that start with checking
// one element, we put it in the beforeEach hook
// so that it runs at the start of every test.
cy.contains('Pay electric bill')
.parent()
.find('input[type=checkbox]')
.check()
})

it('can filter for uncompleted tasks', () => {
// We'll click on the "active" button in order to
// display only incomplete items
cy.contains('Active').click()

// After filtering, we can assert that there is only the one
// incomplete item in the list.
cy.get('.todo-list li')
.should('have.length', 1)
.first()
.should('have.text', 'Walk the dog')

// For good measure, let's also assert that the task we checked off
// does not exist on the page.
cy.contains('Pay electric bill').should('not.exist')
})

it('can filter for completed tasks', () => {
// We can perform similar steps as the test above to ensure
// that only completed tasks are shown
cy.contains('Completed').click()

cy.get('.todo-list li')
.should('have.length', 1)
.first()
.should('have.text', 'Pay electric bill')

cy.contains('Walk the dog').should('not.exist')
})

it('can delete all completed tasks', () => {
// First, let's click the "Clear completed" button
// `contains` is actually serving two purposes here.
// First, it's ensuring that the button exists within the dom.
// This button only appears when at least one task is checked
// so this command is implicitly verifying that it does exist.
// Second, it selects the button so we can click it.
cy.contains('Clear completed').click()

// Then we can make sure that there is only one element
// in the list and our element does not exist
cy.get('.todo-list li')
.should('have.length', 1)
.should('not.have.text', 'Pay electric bill')

// Finally, make sure that the clear button no longer exists.
cy.contains('Clear completed').should('not.exist')
})
})
})
Loading