Skip to content

Commit

Permalink
Merge branch 'master' into dorner/APPEALS-25338
Browse files Browse the repository at this point in the history
  • Loading branch information
craigrva authored Jul 13, 2023
2 parents 2e5abad + 9a6b420 commit c6fd98d
Show file tree
Hide file tree
Showing 21 changed files with 196 additions and 188 deletions.
91 changes: 44 additions & 47 deletions MAC_INTEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[<< Back](README.md)

**Pre-requisites for setup:**
**Some steps require completing VA On-boarding**

1. Create GitHub user account [VA github access process](https://department-of-veterans-affairs.github.io/github-handbook/guides/onboarding/getting-access)

Expand All @@ -20,46 +21,37 @@
2. Install Homebrew
* a. Using BAH Self Service if BAH employee Run ```brew install git-lfs .``` This is required to clone caseflow-facols repo

3. Create a caseflow-setup folder by typing: `mkdir caseflow-setup` (step can be skipped if you have the file transfer files)
3. Create an appeals folder by typing: `mkdir ~/appeals`

4. Change directory to caseflow-setup by typing: `cd caseflow-setup`
4. Change directory to appeals by typing: `cd appeals`

5. Navigate to [instant client](https://www.oracle.com/database/tecdchnologies/instant-client/linux-x86-64-downloads.html)

6. Download the following zip files to caseflow-setup directory (Copy from downloads to the caseflow-setup directory if they download to downloads) (Step can be skipped if you received the file transfer files)
6. Download the following zip files (Step can be skipped if you received the file transfer files)
* instantclient-basic-linux.x64-12.2.0.1.0.zip
* instantclient-sqlplus-linux.x64-12.2.0.1.0.zip
* instantclient-sdk-linux.x64-12.2.0.1.0.zip

7. Clone caseflow repositories required for setup into caseflow-setup directory (caseflow-facols requires github account and the account has to be in the VA org in github and can be found in the file transfer files) pwd
* HTTP protocol
* `git clone https://github.com/department-of-veterans-affairs/caseflow.git`
* `git clone https://github.com/department-of-veterans-affairs/caseflow-facols.git`
* Upon completion, navigate to caseflow-facols (`cd ~/caseflow-setup/caseflow-facols`)
* Run: `git lfs install` (needed to initialize large file storage in repo)
* Run: `git lfs pull` (this will pull the large zipfile)
* If you do not have VA access yet to clone caseflow-vacols can contact (Your Tech lead or the bid_appeals_mac_support channel) to receive a zip of the repository
7. Clone the following caseflow repositories required into appeals directory
* https://github.com/department-of-veterans-affairs/caseflow
* https://github.com/department-of-veterans-affairs/caseflow-facols

**SSH protocol**
8. Upon completion, navigate to caseflow-facols (`cd ~/appeals/caseflow-facols`)
1. Run: `git lfs install` (needed to initialize large file storage in repo)
2. Run: `git lfs pull` (this will pull the large zipfile)
3. Copy the `~/appeals/caseflow-facols/build_facols` directory into `~/appeals/caseflow/local/vacols/` directory.

1. `git clone git@github.com:department-of-veterans-affairs/caseflow.git`
9. Navigate to the caseflow directory in your terminal (type: `cd ~/appeals/caseflow`) and checkout the grant/setup-no-aws branch `git checkout grant/setup-no-aws`

2. `git clone git@github.com:department-of-veterans-affairs/caseflow-facols.git`
* Upon completion, navigate to caseflow-facols (`cd ~/caseflow-setup/caseflow-facols`)
* Run: `git lfs install` (needed to initialize large file storage in repo)
* Run: `git lfs pull` (this will pull the large zipfile)
10. Navigate to caseflow/docker-bin directory (type: `cd docker-bin`)

3. Navigate to the caseflow directory in your terminal (type: `cd ~/caseflow-setup/caseflow`) and checkout the grant/setup-no-aws branch `git checkout grant/setup-no-aws`
11. Create oracle_libs subdirectory (type: `mkdir oracle_libs`)

4. Navigate to caseflow/docker-bin directory (type: `cd docker-bin`)
12. Copy the 3 instant-client zip files from step 6 into the oracle_libs directory

5. Create oracle_libs subdirectory (type: `mkdir oracle_libs`)
13. Navigate to the caseflow root directory (type: `cd ~/appeals/caseflow`)

6. Copy the 3 instant-client zip files from the caseflow-setup directory into the oracle_libs directory

7. Navigate to the caseflow root directory (type: `cd ..`)

8. Run scripts/dev_env_setup_step1.sh script from bash terminal (How to run script in Mac Terminal) (Will be prompted for a password will be the SUDO password which is the password used to log into mac after restart)
14. Run `scripts/dev_env_setup_step1.sh` script from bash terminal [[How to run script in Mac Terminal](https://apple.stackexchange.com/questions/235128/how-do-i-run-a-sh-or-command-file-in-terminal)] (Will be prompted for a password will be the SUDO password which is the password used to log into mac after restart)
* If/When mac says Chromedriver cannot be opened do this:
* Click cancel on the warning modal
* Push Command + Space
Expand All @@ -68,50 +60,55 @@
* Click General tab
* Click the lock icon and put in your BAH pin Click allow anyway on chromedriver warning Click the lock icon to re lock

9. Setup Docker to use 4 CPUs and 8G memory and sign-in to your personal DockerHub account
15. Setup Docker to use 4 CPUs and 8G memory and sign-in to your personal DockerHub account
* To get to these settings:
* Command + Space
* Type docker
* Click docker desktop
* Click the gear icon
* Click Resources

10. The script updated your bash profile and you need to resource it into the terminal by typing: `source ~/.bash_profile`
16. The script updated your bash profile and you need to resource it into the terminal by typing: `source ~/.bash_profile`
* If using zsh, will need to update and `source ~/.zshrc` instead

11. `brew install shared-mime-info`
17. `brew install shared-mime-info`

12. `brew install v8@3.15`
18. `brew install v8@3.15`

13. Run scripts/dev_env_setup_step2.sh script (may take a while to run)
19. Run `scripts/dev_env_setup_step2.sh` script (may take a while to run)

14. Run `gem install bundler`
* Copy the caseflow-facols/build_facols directory to the caseflow/local/vacols subdirectory. (Ensure you have a caseflow/local/vacols/build_facols directory with all the files before continuing to the next step)
20. Run `gem install bundler`

15. Navigate to caseflow/local/vacols in terminal `cd ~/caseflow- setup/caseflow/local/vacols`
21. Navigate to `~/appeals/caseflow/local/vacols` in terminal (type: `cd ~/appeals/caseflow/local/vacols`)

16. Run `./build_push.sh local`
* Requires the oracle database image to have been pulled after running scripts/dev_env_setup_step1.sh script
22. To install the latest and enterprise Oracle Database version follow (https://seanstacey.org/deploying-an-oracle-database-19c-as-a-docker-container/2020/09/) guide.
1. Go to http://container-registry.oracle.com/ (Here log in and opt for Database)
2. On command line `docker login container-registry.oracle.com`
3. On command line `docker pull container-registry.oracle.com/database/enterprise:latest`

17. Navigate to caseflow root directory `cd ~/caseflow-setup/caseflow`
23. Run `./build_push.sh local`

18. Run `docker-compose up –d`
24. Navigate to caseflow root directory `cd ~/appeals/caseflow`

19. Run `bundle exec rake db:create`
* If you get connection issues stating no file to be found, run the following:
* `rm /opt/homebrew/var/postgres/postmaster.pid` or possibly `rm /usr/local/var/postgres/postmaster.pid`
* `brew services restart postgresql`
25. Run `ln -s Makefile.example Makefile`

20. Run `bundle exec rake local:vacols:seed`
26. Run `make up`

21. Run `bundle exec rake db:schema:load db:seed`
27. Run `make reset`
* If issues occur:
1. Run `bundle exec rake db:create`
* If you get connection issues stating no file to be found, run the following:
* `rm /opt/homebrew/var/postgres/postmaster.pid` or possibly `rm /usr/local/var/postgres/postmaster.pid`
* `brew services restart postgresql`
2. Run `bundle exec rake local:vacols:seed`
3. Run `bundle exec rake db:schema:load db:seed`

22. Open a new tab in terminal
27. Open a new tab in terminal

23. In new tab run make: ```run-backend```
28. In new tab run make: ```run-backend```

24. In the old tab run: ```make run-frontend```
29. In the old tab run: ```make run-frontend```

25. Navigate to localhost:3000 in browser to see the application
30. Navigate to localhost:3000 in browser to see the application

[<< Back](README.md)
5 changes: 3 additions & 2 deletions client/test/app/queue/ColocatedTaskListView.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ const WrapperComponent = ({ children }) => (
</MemoryRouter>
);

// Date constructor uses zero-based offset for months — this is 2021-03-17
const fakeDate = new Date(2021, 2, 17, 12);
// Date constructor uses zero-based offset for months — this is 2021-03-17. The time (11:30pm) is to ensure
// that the crossover between days doesn't affect the front end calculations for when tasks were assigned
const fakeDate = new Date(2021, 2, 17, 23, 30, 0, 0);

beforeAll(() => {
// Ensure consistent handling of dates across tests
Expand Down
2 changes: 1 addition & 1 deletion client/test/data/queue/taskLists/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const getAmaTaskTemplate = ({ id = 1 } = {}) => ({
placed_on_hold_at: null,
on_hold_duration: null,
status: null,
assigned_at: formatISO(sub(new Date(), { hours: 47 })),
assigned_at: formatISO(sub(new Date(), { days: 2 })),
closest_regional_office: null,
assigned_to: {
css_id: null,
Expand Down
11 changes: 4 additions & 7 deletions scripts/dev_env_setup_step1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,10 @@ echo "1. Run Docker and go into advanced preferences to limit Docker's resources
Recommended settings are 4 CPUs, 8 GiB of internal memory, and 512 MiB of swap.
"

echo "2. In a new terminal, run:
docker login -u dsvaappeals
The password is in the DSVA 1Password account.
Note you can use your personal account as well, you'll just have to accept
the license agreement for the Oracle Database docker image.
https://store.docker.com/images/oracle-database-enterprise-edition
To accept the agreement, checkout with the Oracle image on the docker store.
echo "2. To install the latest and enterprise Oracle Database version follow (https://seanstacey.org/deploying-an-oracle-database-19c-as-a-docker-container/2020/09/) guide.
1. Go to http://container-registry.oracle.com/ (Here log in and opt for Database)
2. On command line docker login container-registry.oracle.com
3. On command line docker pull container-registry.oracle.com/database/enterprise:latest
"

echo "==> Close this terminal, open a new terminal, and run ./dev_env_setup_step2.sh
Expand Down
6 changes: 1 addition & 5 deletions scripts/dev_env_setup_step2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ ln -s Makefile.example Makefile

echo "
===================================
You must do the following manually:
AWS access is needed starting at this point.
If you need to get AWS access, follow these instructions:
https://github.com/department-of-veterans-affairs/appeals-deployment/wiki/New-Hires
Congratulations
"

echo 'Finish the manual set up from "Database environment setup":
Expand Down
7 changes: 2 additions & 5 deletions spec/controllers/appeals_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,8 @@
end

context "when request header contains nonexistent Veteran file number" do
it "returns 404 error", skip: "flake" do
appeal = create(:appeal, claimants: [build(:claimant, participant_id: "CLAIMANT_WITH_PVA_AS_VSO")])
create(:supplemental_claim, veteran_file_number: appeal.veteran_file_number)

request.headers["HTTP_CASE_SEARCH"] = "123"
it "returns 404 error" do
request.headers["HTTP_CASE_SEARCH"] = "123456789"

expect_any_instance_of(Fakes::BGSService).to_not receive(:fetch_poas_by_participant_id)

Expand Down
6 changes: 3 additions & 3 deletions spec/controllers/hearings_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,12 @@
expect(response.status).to eq 200
end

it "should return a 200 and update aod if provided", :aggregate_failures, skip: "flake AOD present" do
it "should return a 200 and update aod if provided", :aggregate_failures do
params = {
id: ama_hearing.external_id,
advance_on_docket_motion: {
user_id: user.id,
person_id: ama_hearing.appeal.appellant.id,
person_id: ama_hearing.appeal.appellant.person.id,
reason: Constants.AOD_REASONS.age,
granted: true
},
Expand All @@ -467,7 +467,7 @@
patch :update, as: :json, params: params
expect(response.status).to eq 200
ama_hearing.reload
expect(ama_hearing.advance_on_docket_motion.person.id).to eq ama_hearing.appeal.appellant.id
expect(ama_hearing.advance_on_docket_motion.person.id).to eq ama_hearing.appeal.appellant.person.id
expect(ama_hearing.advance_on_docket_motion.reason).to eq Constants.AOD_REASONS.age
expect(ama_hearing.advance_on_docket_motion.granted).to eq true
end
Expand Down
6 changes: 4 additions & 2 deletions spec/controllers/organizations/users_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
let!(:params) { { organization_url: org.url, id: user.id } }

let(:org) { create(:judge_team, :has_judge_team_lead_as_admin) }
let!(:user) do
let(:user) do
create(:user).tap do |user|
org.add_user(user)
end
Expand All @@ -300,7 +300,9 @@
end
end

context "when user is the judge in the organization", skip: "Flake" do
context "when user is the judge in the organization" do
let(:user) { org.admin }

it "returns an error" do
subject

Expand Down
13 changes: 13 additions & 0 deletions spec/factories/vacols/case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,19 @@
end
end

factory :case_with_multi_decision do
bfddec { 1.day.ago }

transient do
decision_document do
[
create(:document, type: "BVA Decision", received_at: 1.day.ago),
create(:document, type: "BVA Decision", received_at: 1.day.ago)
]
end
end
end

factory :case_with_old_decision do
bfddec { 1.day.ago }

Expand Down
29 changes: 14 additions & 15 deletions spec/feature/dispatch/establish_claim_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
let(:folder) { build(:folder, tioctime: 23.days.ago.midnight) }

let(:case_remand) do
create(:case_with_decision, :status_remand, folder: folder)
create(:case_with_multi_decision, :status_remand, folder: folder)
end

let(:appeal_remand) do
Expand Down Expand Up @@ -491,9 +491,8 @@
Generators::Document.build(type: "BVA Decision", received_at: 6.days.ago)
]
end
# :nocov:
scenario "Review page lets users choose which document to use",
skip: "This test is failing because of a stale element reference" do

scenario "Review page lets users choose which document to use" do
visit "/dispatch/establish-claim"
click_on "Establish next claim"

Expand All @@ -508,8 +507,7 @@
expect(page).to have_content("Benefit Type")
end

scenario "the EP creation page has a link back to decision review",
skip: "This test is failing because of a stale element reference" do
scenario "the EP creation page has a link back to decision review" do
visit "/dispatch/establish-claim"
click_on "Establish next claim"

Expand All @@ -518,7 +516,6 @@
click_on "< Back to Review Decision"
expect(page).to have_content("Multiple Decision Documents")
end
# :nocov:
end

context "For a full grant" do
Expand Down Expand Up @@ -629,10 +626,11 @@
scenario "Assigning it to complete the claims establishment", skip: "flakey hang" do

Check warning on line 626 in spec/feature/dispatch/establish_claim_spec.rb

View workflow job for this annotation

GitHub Actions / caseflow_rspec_job (12, 3)

Establish Claim - ARC Dispatch As a caseworker For a full grant When there is an existing 070 EP Assigning it to complete the claims establishment Skipped: flakey hang
visit "/dispatch/establish-claim"
click_on "Establish next claim"
expect(page).to have_current_path("/dispatch/establish-claim/#{task.id}")

click_on "Route claim"
expect(page).to have_current_path("/dispatch/establish-claim/#{task.id}")
expect(page).to have_content("Route Claim")
expect(page).to have_selector(:link_or_button, "Assign to Claim")
click_on "Assign to Claim" # unknown reason sometimes hangs here

expect(page).to have_content("Success!")
Expand All @@ -652,8 +650,7 @@
aasm_state: "unassigned")
end

scenario "Establish a new claim routed to ARC",
skip: "This test is failing because of a stale element reference" do
scenario "Establish a new claim routed to ARC", :aggregate_failure do
# Mock the claim_id returned by VBMS's create end product
Fakes::VBMSService.end_product_claim_id = "CLAIM_ID_123"

Expand Down Expand Up @@ -700,9 +697,11 @@
suppress_acknowledgement_letter: true,
claimant_participant_id: nil,
limited_poa_code: nil,
limited_poa_access: nil
limited_poa_access: nil,
status_type_code: nil
},
veteran_hash: task.appeal.veteran.to_vbms_hash
veteran_hash: task.appeal.veteran.to_vbms_hash,
user: RequestStore[:current_user]
)

expect(AppealRepository).to have_received(:update_vacols_after_dispatch!)
Expand All @@ -713,11 +712,11 @@

expect(task.appeal.reload.dispatched_to_station).to eq("397")

click_on "Caseflow Dispatch"
expect(page).to have_current_path("/dispatch/establish-claim")
expect(page).to have_current_path("/dispatch/establish-claim/#{task.id}")

# No tasks left
expect(page).to have_content("Way to go! You have completed all the claims assigned to you.")
expect(page).to have_content("Way to go!")
expect(page).to have_content("You have completed all of the total cases assigned to you today")
expect(page).to have_css(".usa-button-disabled")
end

Expand Down
6 changes: 3 additions & 3 deletions spec/feature/hearings/daily_docket/build_hearsched_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@
let!(:hearing) { create(:hearing, :with_tasks) }
let!(:postponed_hearing_day) { create(:hearing_day, scheduled_for: Date.new(2019, 3, 3)) }

scenario "User can update fields", skip: "flake" do
scenario "User can update fields" do
visit "hearings/schedule/docket/" + hearing.hearing_day.id.to_s
find("textarea", id: "#{hearing.external_id}-notes").click.send_keys("This is a note about the hearing!")
find("label", text: "9:00 am").click
find("label", text: "9:00 AM Eastern Time (US & Canada)").click
find("label", text: "Transcript Requested").click
click_button("Save")
expect(page).to have_content("You have successfully updated")
Expand All @@ -87,7 +87,7 @@
expect(page).to have_content("No Show")
expect(page).to have_content("This is a note about the hearing!", wait: 10) # flake
expect(find_field("Transcript Requested", visible: false)).to be_checked
expect(find_field("9:00 am", visible: false)).to be_checked
expect(find_field("9:00 AM", visible: false)).to be_checked
end
end

Expand Down
Loading

0 comments on commit c6fd98d

Please sign in to comment.