-
Notifications
You must be signed in to change notification settings - Fork 59
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
[PR]: Add spontaneous assessment result #28
Open
christianjtr
wants to merge
45
commits into
aircall:master
Choose a base branch
from
christianjtr:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
β¦ers are not logged in
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π¨βπ¨ Assessment results
This pull request is divided into sections, following the tasks by the level of competencies suggested.
Jr. SE contributions
Call list page
Pagination
useState
React hook.callsPerPage
variable following theuseState
hook convention.callsPerPage
accordingly.Pagination
component with the proper props/values/handlers.Filters
(From the design system components):
sort by date
dropdown.call types
dropdown.handler functions
to control when the user applies/clears the filters, to emit/executes the callback operation(s) in the parent component.custom hook
to extract logic from the component. (Filters and maps operations).Group calls
SE contributions
Logout feature
logout
function from theuseAuth
custom hook.ProtectedLayout
component.Expiration token UX
refresh token mutation
to the gql/mutations folder.checkAuthToken
method to check whether the token is expired or not. On top of this implementation, we will need to add therefreshAuthToken
method.refreshAuthToken
will be executed.logout
method. (User will be automatically redirected to the Login page).isExpiredToken
method.Unit tests
The tool used to perform unit tests is Jest.
Added several unit tests:
dates.spec.ts
(Helper functions).useCallList.spec.ts
(Custom utils hook).CallsListFilters.spec.tsx
(Component).Output after running
yarn test
:Sr. SE contributions
E2E test (Cypress)
The tool selected to perform E2E tests is Cypress.
1. Scripts:
These scripts were added to the project.
2. Environment variables:
To ease the E2E testing, we can provide the Cypress runner with some variables. We only need to create a .env.e2e file at the project's root level, and fill in the variables accordingly.
http://localhost:3000
or anotherThen, we need to load them all using
dotenv
, as follows:Finally, we can use the variables within any spec file, as follows:
3. Fixtures
We can use these files to set dummy data across our tests.
4. Demo
4.1.
yarn cy:run
command output.4.2. Cypress E2E tets in action.
Archive call feature
GET_CALL_DETAILS
query is updated, to improve the performance and reduce the load on the back-end services.Sync tabs after archiving a call (Real-time support)
Apollo Client
service to handle either query/mutations operations or subscriptions, using the splitting link strategy as follows:httpLink
.webSocketLink
.Some extracts of code implemented within the
Apollo Client
definition:subscribeToMore
method from theGET_CALL_DETAILS
query (useQuery) in the CallsDetails page at theuseEffect
hook definition, as follows:subscribeToMore
follow-up method is executed, a change is detected by theuseEffect
hook, so the associated subscription will be triggered (Using the WebSocket implementation done at the split link section).Staff SE contributions
Release plan
Contributors process (Brief considerations):
Set a well-documented policy to let others know how to be capable of performing a deployment to production.
- Some considerations (Defining an ideal time frame):
Each developer should be able to perform a deployment to production, either on demand or by leveraging it to any automatic process already established.
- Some considerations:
Teams should be aware of any deployment to production (Using any communication tool.- automated messages for instance).
Deployment process (Brief considerations):
Additional improvements added
Loader
component.ProtectedRoute
component.Login page
if a user is not logged in.