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

Sprint 3 selenium #45

Merged
merged 59 commits into from
Apr 3, 2024
Merged

Sprint 3 selenium #45

merged 59 commits into from
Apr 3, 2024

Conversation

seif-eid
Copy link
Contributor

@seif-eid seif-eid commented Apr 3, 2024

creating a PR from sprint 3 selenium into main

sanyadrian and others added 30 commits February 26, 2024 14:31
  - Installed jest npm package for running the tests as a test suite
  - Installed kill-port npm package to make sure port is available during initial setup and freed during test teardown
  - Installed selenium-webdriver webdriver-manager to enable selenium automated testing
  - Created webdriverSetup.js to set up the driver for e2e testing inside chrome
  - Created jestGlobalSetup.js, which contains functions to start the frontend and backend
  - Created jestGlobalTeardown.js, which contains functions to stop the backend and frontend
  - Modified package.json to include jest setup, teardown configs and testing environment

Signed-off-by: Harmeet Matharoo <hmjatt@gmail.com>
  - Modified budget.test.js to include tests for creating a budget with invalid data ->
      Negative budget amount
      Budget description being non-alphanumeric
      Duplicate budget name for the same user
  - Modified package.json to include a script that allows for app to run in the background and not start in a browser when the tests run

Signed-off-by: Harmeet Matharoo <hmjatt@gmail.com>
  - Modified budget.test.js to include tests for creating a budget with valid data

Signed-off-by: Harmeet Matharoo <hmjatt@gmail.com>
  - Modified budget.test.js to include tests for editing a budget with invalid data
  - Modified BudgetContext.js, BudgetItem.js, AddBudgetForm.js to allow for populating the update form fields when edit button is clicked on a budget item and clear them when form is submitted(add or update).
  - Modified AddBudgetForm.js to not show warning modal when inputting negative budget amount
  - Modified tests inside AddBudgetForm.test.js and BudgetItem.test.js but they are still WIP

Signed-off-by: Harmeet Matharoo <hmjatt@gmail.com>
  - Modified budget.test.js to include tests for editing a budget with valid data successfully

Signed-off-by: Harmeet Matharoo <hmjatt@gmail.com>
- used harmeet dockerfile ( front-end) and .dockerignore (front-end) to
 create a docker-compose.yaml to run the whole application at once.
- used harmeet dockerfile ( front-end) and .dockerignore (front-end) to
 create a docker-compose.yaml to run the whole application at once.
  - Modified budget.test.js to include tests for deleting a budget that has expense
  - Modified budget.test.js to include tests for deleting a budget successfully
  - Added classnames and id's inside BudgetItem.js to make testing easier
  - Added default value for date(today's date) inside AddExpenseForm.js to make testing easier

Signed-off-by: Harmeet Matharoo <hmjatt@gmail.com>
…n, with valid inputs and invalid inputs.

tested the delete.
Signed-off-by: Harmeet Matharoo <hmjatt@gmail.com>
create PR for sprint-3-dockers to sprint 3
seif-eid and others added 28 commits March 8, 2024 10:56
Create a PR to merge Sprint 3 dockers be into sprint 3
Creating PR to merge Sprint 3 selenium into Sprint 3
Merge pull request #38 from hmjatt/Sprint-3-Selenium
…e formateDate function in Helper to control the language of the Date in expense
Signed-off-by: Harmeet Matharoo <hmjatt@gmail.com>
fixed the  8 tests after internationalization
  - Changed frontend and backend docker files
  - Added a nginx.conf to act as a reverse proxy configuration
  - Modified docker-compose.yml to make sure MySQL is running before running the backend and perform health checkups
  - Modified CorsConfig.java to allow requests from localhost and localhost:3000
  - modified application.properties to make use to a user instead of root user(can cause conflicts with default root of db)
  - Added a test profile annotation inside TrackerApplicationTests.java to run maven tests using test profile when building backend during container initialization

Signed-off-by: Harmeet Matharoo <hmjatt@gmail.com>
Signed-off-by: Harmeet Matharoo <hmjatt@gmail.com>
  - Removed host binding in docker-compose.yml to allow nginx to handle traffic
  - Changed frontend to use environment variables for API base URL depending on running selenium tests or docker environment
  - Changed the frontend such that expenses are under budget items
  - Budget Calculation Tests
  - Budget Deletion Test
  - added background to components
  - moved create budget form on the left of the page and budget list on the right
  - fixed minor UI bugs
  - added translations where needed
  - reset the expense form error after submit
  - added styles to signup and login pages

Signed-off-by: Harmeet Matharoo <hmjatt@gmail.com>
Signed-off-by: Harmeet Matharoo <hmjatt@gmail.com>
…dded 2 tests for when expense amount exceed budgets.
  - Added parameters to selenium standalone container such that it can have upto 5 sessions running instead of 1
  - Fixed selenium tests for user to make them work locally and in Docker
  - Modified Dockerfile for selenium tests to use light version of node

Signed-off-by: Harmeet Matharoo <hmjatt@gmail.com>
@seif-eid seif-eid merged commit 53c0506 into main Apr 3, 2024
3 checks passed
@hmjatt hmjatt deleted the Sprint-3-Selenium branch April 30, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants