This project was generated with Angular CLI version 12.2.6.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.
Cases:
- If user is not authenticated, it should show public links, login and register. Restrict access to Newsletter (rows: 1, 2, 3).
- If user is authenticated and is not admin, it should hide login and register links, show navigation items (rows: 4, 5).
- If user is authenticated and is admin, it should hide Register, Contact and Donation links. It should show Dashboard link. (rows: 6, 7).
Test case type | Description | Test Step | Expected Result | Status |
---|---|---|---|---|
Functionality | If user is not authenticated, Should show public links, when not logged in | Mocked AuthState as : { auth: false, isAdmin: false, user: null, googleUser: null, token!: null, isGoogleAuth: false } | Should show public links, when not logged in | Pass |
If user is not authenticated, Should show login and register button, when not logged in | Mocked AuthState as : { auth: false, isAdmin: false, user: null, googleUser: null, token!: null, isGoogleAuth: false } | Should show login and register button, when not logged in | Pass | |
If user is not authenticated, Should restrict access to Newsletter., when not logged in | Mocked AuthState as : { auth: false, isAdmin: false, user: null, googleUser: null, token!: null, isGoogleAuth: false } | Should restrict access to Newsletter., when not logged in | pass | |
Functionality | If user is authenticated and is not admin, Should hide login and register links | Mocked AuthState as :{ auth: true, isAdmin: false, user: null, googleUser: null, token!: null, isGoogleAuth: false } | Should hide login and register links | Pass |
If user is authenticated and is not admin, Should show navigation links | Mocked AuthState as :{ auth: true, isAdmin: false, user: null, googleUser: null, token!: null, isGoogleAuth: false } | Should show navigation links | Pass | |
Functionality | If user is authenticated and is admin, Should hide Register, Contact and Donation links | Mocked AuthState as :{ auth: true, isAdmin: true, user: null, googleUser: null, token!: null, isGoogleAuth: false } | Should hide Register, Contact and Donation links | Pass |
If user is not authenticated, Should show dashboard link | Mocked AuthState as :{ auth: true, isAdmin: true, user: null, googleUser: null, token!: null, isGoogleAuth: false } | Should show dashboard link | Pass |
· Component: Contact component.
· Author: Federico Rojas
Cases:
- Contact layout rendering (rows: 1, 2, 3, 4).
- Display error messages when needed (rows: 5).
Testing for contact component rendering | ||||
---|---|---|---|---|
Test Case Type | Description | Test Step | Expected Result | Status |
Functionality | Should create | Create component | The contact component exists | Pass |
Functionality | Should be using leafleet map | Check if leafleet map component exists on contact component | The leafleet component must exist | Pass |
Functionality | Should call public API service when component is created | Check if the function that make the get API method has been called | The method should have been called | Pass |
Functionality | Should render contact info | Check if contact info component exists on contact component | The contact info component must exist | Pass |
Functionality | Should show a message when public API response is 404 | Make a API call that returns an 404 error response, and check if it displays a message | Display an error message when 404 response is received | Pass |
· Component: Contact component.
· Author: Federico Rojas
Cases:
- Contact layout rendering (rows: 1).
- Check the contact form functionality (rows: 2-11).
Testing the contact form component functionality | ||||
---|---|---|---|---|
Test Case Type | Description | Test Step | Expected Result | Status |
Functionality | Should create | Create component | The contact form component exists | Pass |
Functionality | Should not send the contact form if it’s invalid | Make the form invalid and try to send it | The form should not have been sent | Pass |
Functionality | Should call submit method when click 'submit' button | Press the submit button and check if the submit method is called | The method should have been called | Pass |
Functionality | Form should be invalid when all the fields are missing | Fill all form fields as blank, and check if the form is valid | Form should be invalid | Pass |
Functionality | Should display error message when 'email' field is incorrect or empty | Fill the email input with an invalid and blank values, and check if it displays a helper message | Display a helper error message for email | Pass |
Functionality | Should display error message when 'phone' field is incorrect or empty | Fill the phone input with an invalid and blank values, and check if it displays a helper message | Display a helper error message for phone | Pass |
Functionality | Should display error message when 'name' field is empty | Make the phone input an empty value, and check if it displays a helper message | Display a helper error message for name | Pass |
Functionality | Should display error message when 'message' field is empty | Make the message input an empty value, and check if it displays a helper message | Display a helper error message for message | Pass |
Functionality | Form should be valid when ALL required fields are filled | Fill all the form correctly, and check if it returns valid | Form should be valid | Pass |
Functionality | Should submit if all fields are correct and display a success message | Fill all the form correctly, and submit. Check if it displays a success message. | Send the form and display a successfully sent message | Pass |
Functionality | Should display an error dialog if there is an error from the server response | Receive an error response from the server, and check if it displays an error dialog message | Display an error dialog message | Pass |
<style> table th, table td { border: 1px solid } </style>
Verification of login form fields | ||||
---|---|---|---|---|
Test Case Type | Description | Test Step | Expected Result | Status |
Funtionality | There should be a form to log in. | Check if there are two different fields with name email and password | There have a form with fields email and password | Pass |
Funtionality | Email field should be required | Email field with empty input | Email field is invalid | Pass |
Funtionality | Password field should be required | Password field with empty input | Password field is invalid | Pass |
Funtionality | Email field should check the email format | '[email protected]' is entered in the email field | Email field is valid | Pass |
Funtionality | Email field should verify that the format is not an email | 'NO@Email.' is entered in the email field | Email field is invalid | Pass |
Funtionality | Form should verify that it has been valid | Email and Password field with valid input | Form valid | Pass |
Verification of store | ||||
---|---|---|---|---|
Test Case Type | Description | Test Step | Expected Result | Status |
Funtionality | Should make a call to the store | A valid form is sent and interaction with the store is expected | Dispatch been called | Pass |
Verification of error message | ||||
---|---|---|---|---|
Test Case Type | Description | Test Step | Expected Result | Status |
Funtionality | Should have email error message | Interacts with the input leaving invalid values | A error message debuged | Pass |
Funtionality | NOT should have email error message | No interaction | Without error message | Pass |
Funtionality | Should have password error message | Interacts with the input leaving invalid values | A error message debuged | Pass |
Funtionality | NOT should have password error message | No interaction | Without error message | Pass |
Verification of buttons | ||||
---|---|---|---|---|
Test Case Type | Description | Test Step | Expected Result | Status |
Funtionality | Should call onLogin when the form is valid | Submit a valid form | The onLogin function must be called | Pass |
Funtionality | Should not call onLogin when the form is valid | Try submit a invalid form | The onLogin function must not be called | Pass |
Funtionality | Should call loginGoogle when the form is valid | Choose start with google | The loginGoogle function must be called | Pass |
<style> table th, table td { border: 1px solid } </style>
Verification of login form fields | ||||
---|---|---|---|---|
Test Case Type | Description | Test Step | Expected Result | Status |
Funtionality | There should be an activity form created | Create a form | There is a form to create an activity | Pass |
Funtionality | There should be three fields in the form | Create a form | Fields image, description and name are there | Pass |
Funtionality | Image field should be required | Image field with empty input | Image field is invalid | Pass |
Funtionality | Name field should be required | Name field with empty input | Name field is invalid | Pass |
· Component: Member component.
· Author: Flavio Gastón Salasevicius
<style> table th, table td { border: 1px solid } </style>Testing the Member form component functionality | ||||
---|---|---|---|---|
Test Case Type | Description | Test Step | Expected Result | Status |
Functionality | Should create | Create component | The members form component exists | Pass |
Functionality | Should not send the member form if it’s invalid | Make the form invalid and try to send it | The form should not have been sent | Pass |
Functionality | Should call submit method when click 'submit' button | Press the submit button and check if the submit method is called | The method should have been called | Pass |
Functionality | Form should be invalid when a field is missing | Fill all form fields as blank, and check if the form is valid | Form should be invalid | Pass |
Functionality | It should show an error message when any field is wrong or empty | Fill in the data entry with invalid and blank values and check if it shows a warning message | Display a helper error message for fields | Pass |
Functionality | Should display error message when 'name' field is empty | Make the name input an empty value, and check if it displays a helper message | Display a helper error message for name | Pass |
Functionality | Should display error message when 'content' field is empty | Make the content input an empty value, and check if it displays a helper message | Display a helper error message for content | Pass |
Functionality | Should display error message when 'Facebook Url' field is empty | Make the Facebook Url input an empty value, and check if it displays a helper message | Display a helper error message for message | Pass |
Functionality | Should display error message when 'Linkedin Url' field is empty | Make the Linkedin Url input an empty value, and check if it displays a helper message | Display a helper error message for message | Pass |