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

B 21977 INT Part 2 - Fix Office User Select Counseling Office Validation #14603

Open
wants to merge 123 commits into
base: integrationTesting
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
3a7181d
Merge branch 'main' into B-21626-main
JonSpight Dec 2, 2024
8b1c41b
Merge branch 'main' into B-21626-main
JonSpight Dec 27, 2024
e2e9a7c
update pdfcpu 0.6.0 to latest 0.9.1
cameroncaci Dec 31, 2024
09c168b
Merge branch 'main' into prod-fix-pdfcpu
cameroncaci Dec 31, 2024
a085aab
adjust pdfcpu tests
cameroncaci Dec 31, 2024
aa564e5
Merge branch 'prod-fix-pdfcpu' of github.com:transcom/mymove into pro…
cameroncaci Dec 31, 2024
2e53987
add missing err checks
cameroncaci Dec 31, 2024
ed49d6e
configure generator to configure font dir manually
cameroncaci Jan 8, 2025
0050c47
set roboto regular in memory instead of file system
cameroncaci Jan 8, 2025
0ea90cd
revert custom config setup to pdfcpu default
cameroncaci Jan 8, 2025
56d7691
deploy to exp
cameroncaci Jan 8, 2025
be195e9
watermark enhancement, cleanup, and deprecation
cameroncaci Jan 8, 2025
3246d8b
Revert "deploy to exp"
cameroncaci Jan 8, 2025
7ed9771
deploy to exp again
cameroncaci Jan 9, 2025
4d3272b
remove proxy wild cards causing 404 on logout
ajlusk Dec 19, 2024
a85a996
Merge remote-tracking branch 'origin/main' into prod-fix-pdfcpu
cameroncaci Jan 9, 2025
94bd7fa
attempt setting pdfcpu config in repo
cameroncaci Jan 9, 2025
fcaa27e
set config path for pdfcpu
cameroncaci Jan 10, 2025
6281f20
self hosted err check
cameroncaci Jan 10, 2025
335347f
persist pdfcpu config to ecs container
cameroncaci Jan 10, 2025
a446315
switched pdfcpu config to be embedded
cameroncaci Jan 10, 2025
27d1c48
disable config
cameroncaci Jan 13, 2025
64dbbff
remove fonts
cameroncaci Jan 13, 2025
86b16f4
Revert "deploy to exp again"
cameroncaci Jan 13, 2025
ea9cf9a
Merge remote-tracking branch 'origin/main' into prod-fix-pdfcpu
cameroncaci Jan 13, 2025
06dd9a2
typo fix
cameroncaci Jan 13, 2025
835b429
Revert "disable config"
cameroncaci Jan 13, 2025
be3f14a
point config to temp dir for aws fargate
cameroncaci Jan 13, 2025
1577290
remove config again
cameroncaci Jan 13, 2025
765b9c4
Reapply "deploy to exp again"
cameroncaci Jan 13, 2025
c6f5817
add ephemeral volume to app-client-tls
cameroncaci Jan 14, 2025
7c51635
tmp dir and ephemeral dir switch case in pdfcpu generator
cameroncaci Jan 14, 2025
4d276d9
add log to mutable check
cameroncaci Jan 14, 2025
ac28349
overload volume over tmp
cameroncaci Jan 14, 2025
b261388
grant full access to tmp ephemeral dir
cameroncaci Jan 14, 2025
7ecc211
mount ephemeral storage to app as well
cameroncaci Jan 14, 2025
e21ce2e
Revert "overload volume over tmp"
cameroncaci Jan 14, 2025
4fb4588
point to new path
cameroncaci Jan 14, 2025
34497e7
switch from ephemeral storage to tmpfs memory use
cameroncaci Jan 15, 2025
fad47fd
Merge branch 'main' into B-21997-UI-Order
antgmann Jan 15, 2025
4832c36
fix typo
cameroncaci Jan 15, 2025
40ec0c1
configure ephemeral perms in build step of docker
cameroncaci Jan 15, 2025
a8c19e1
Revert "fix typo"
cameroncaci Jan 15, 2025
cd03521
Revert "switch from ephemeral storage to tmpfs memory use"
cameroncaci Jan 15, 2025
ef4b867
remove this
cameroncaci Jan 15, 2025
8942fa2
copy from build env
cameroncaci Jan 15, 2025
84071b5
test workdir
josiahzimmerman-caci Jan 15, 2025
f12af20
test --chown=1042 from copy
josiahzimmerman-caci Jan 15, 2025
8029c72
test --chown=nonroot user from copy
josiahzimmerman-caci Jan 15, 2025
7a1c3e9
test volume
josiahzimmerman-caci Jan 15, 2025
ccbbff7
Merge branch 'main' into B-21997-UI-Order
antgmann Jan 15, 2025
1e6a995
switch from user perms to full perms
cameroncaci Jan 15, 2025
a141d1d
change to demo
josiahzimmerman-caci Jan 15, 2025
c626770
Merge branch 'prod-fix-pdfcpu' of github.com:transcom/mymove into pro…
cameroncaci Jan 15, 2025
970809b
change directory to dir
josiahzimmerman-caci Jan 15, 2025
79c7ab5
test nonroot at copy
josiahzimmerman-caci Jan 15, 2025
b048828
last attempt for the night unless it yields different results
josiahzimmerman-caci Jan 15, 2025
3f5936a
last attempt for the night unless it yields different results - just …
josiahzimmerman-caci Jan 16, 2025
e9be06a
last attempt for the night unless it yields different results - just …
josiahzimmerman-caci Jan 16, 2025
fb80adf
some progress
josiahzimmerman-caci Jan 16, 2025
007ddae
some progress
josiahzimmerman-caci Jan 16, 2025
16b1539
ephemeral cleanup
cameroncaci Jan 16, 2025
da789ad
Knew I shouldnt have deleted Josiahs code
cameroncaci Jan 16, 2025
49db121
merging in latest main and fixing conflicts
KonstanceH Jan 16, 2025
94a3333
Revert "change to demo"
cameroncaci Jan 16, 2025
e69f7eb
Revert "Reapply "deploy to exp again""
cameroncaci Jan 16, 2025
4619e1c
comment cleanup
cameroncaci Jan 16, 2025
e0ef628
Reapply "change to demo"
cameroncaci Jan 16, 2025
95504dc
for cleanup seeing if i can remove these
cameroncaci Jan 16, 2025
ea04351
now deploy to demo for real
cameroncaci Jan 16, 2025
df50478
adding missing changes to updater
KonstanceH Jan 16, 2025
c44931c
adding missing change from test
KonstanceH Jan 16, 2025
35b0ff8
pull in latest main and fix conflicts
KonstanceH Jan 16, 2025
d2d8918
Merge branch 'main' into B-21626-main
JonSpight Jan 16, 2025
f551280
adding missing from test
KonstanceH Jan 16, 2025
6c00760
Revert "now deploy to demo for real"
cameroncaci Jan 16, 2025
6760ad3
Revert "Reapply "change to demo""
cameroncaci Jan 16, 2025
a14c54f
adjust comment
cameroncaci Jan 16, 2025
9c81f25
Merge branch 'main' into prod-fix-pdfcpu
cameroncaci Jan 16, 2025
527d58f
update gitlab.yaml withh latest optmizations
josiahzimmerman-caci Jan 16, 2025
f807ee2
remove demo and int test on default
josiahzimmerman-caci Jan 16, 2025
c29a9e7
Merge branch 'main' into B-21997-UI-Order
r-mettler Jan 16, 2025
b064853
Merge pull request #14495 from transcom/prod-fix-pdfcpu
deandreJones Jan 16, 2025
7c07606
Merge branch 'main' into B-21997-UI-Order
r-mettler Jan 16, 2025
c69023e
Merge remote-tracking branch 'origin/main' into B-21977
ajlusk Jan 16, 2025
1ead486
policy removal
josiahzimmerman-caci Jan 16, 2025
9254ad2
fix office user selecting counseling office validation
ajlusk Jan 16, 2025
2c7d25f
Merge pull request #14532 from transcom/B-21997-UI-Order
r-mettler Jan 16, 2025
85563e1
Merge branch 'main' into B-21626-main
pambecker Jan 16, 2025
90935d6
Merge branch 'main' into B-22110-cicd-optimizations
josiahzimmerman-caci Jan 16, 2025
fd50864
Merge branch 'B-21977' into B-21977-INT3
ajlusk Jan 16, 2025
ead22f0
Merge branch 'integrationTesting' into B-21977-INT3
ajlusk Jan 16, 2025
224a40b
fix AddOrdersForm test
ajlusk Jan 16, 2025
e4e2f75
Merge branch 'B-21977' into B-21977-INT3
ajlusk Jan 16, 2025
83994c4
Merge pull request #14300 from transcom/B-21626-main
pambecker Jan 16, 2025
7c94d40
Merge branch 'main' into B-22110-cicd-optimizations
josiahzimmerman-caci Jan 16, 2025
adc98a3
Merge pull request #14600 from transcom/B-22110-cicd-optimizations
josiahzimmerman-caci Jan 16, 2025
7fb141d
Merge branch 'main' into B-21904-NTS-OCONUS-MAIN
KonstanceH Jan 17, 2025
e8042fb
Merge branch 'integrationTesting' into B-21977-INT3
ajlusk Jan 17, 2025
16736fa
Merge pull request #14450 from transcom/B-21904-NTS-OCONUS-MAIN
WeatherfordAaron Jan 17, 2025
bd416ad
Merge branch 'main' into b21576-main-add_order_types_for_sc_too
JamesHawks224 Jan 17, 2025
25f6942
Merge branch 'integrationTesting' into B-21977-INT3
ajlusk Jan 17, 2025
04469ef
Merge branch 'main' into MAIN-B-22196-PPM-SIT-Cost-Defect
brooklyn-welsh Jan 17, 2025
eb05df9
Merge remote-tracking branch 'origin/main' into B-21977
ajlusk Jan 17, 2025
cb4cfaa
consistent required hints on AddOrdersForm.jsx
ajlusk Jan 17, 2025
c25596c
Merge branch 'integrationTesting' into B-21977-INT3
ajlusk Jan 17, 2025
0c90fde
Merge branch 'B-21977' into B-21977-INT3
ajlusk Jan 17, 2025
826cf1a
added intergration scripts
JacintaCallahan Jan 17, 2025
342b061
Merge pull request #14610 from transcom/MAIN-B-22196-PPM-SIT-Cost-Defect
WeatherfordAaron Jan 17, 2025
03cc3c5
Merge branch 'main' into b21576-main-add_order_types_for_sc_too
WeatherfordAaron Jan 17, 2025
82273ba
update docker runner tag; merge health check changes
josiahzimmerman-caci Jan 17, 2025
23f569d
add mtls artifact
josiahzimmerman-caci Jan 17, 2025
cf53cfa
test fixes for 21977
ajlusk Jan 17, 2025
f704154
Merge remote-tracking branch 'origin/main' into B-21977
ajlusk Jan 17, 2025
51227e6
Merge branch 'B-21977' into B-21977-INT3
ajlusk Jan 17, 2025
e6fc65a
Merge branch 'main' into B-22110-cicd-optimizations-jc
josiahzimmerman-caci Jan 17, 2025
c7bbb5c
Merge pull request #14306 from transcom/b21576-main-add_order_types_f…
WeatherfordAaron Jan 17, 2025
bc74194
Merge branch 'main' into B-22110-cicd-optimizations-jc
josiahzimmerman-caci Jan 17, 2025
3c3d645
Merge pull request #14616 from transcom/B-22110-cicd-optimizations-jc
josiahzimmerman-caci Jan 17, 2025
9ad79b6
Merge remote-tracking branch 'origin/main' into B-21977
ajlusk Jan 17, 2025
5b30fcd
test updates for 21977
ajlusk Jan 17, 2025
adf50a8
Merge branch 'B-21977' into B-21977-INT3
ajlusk Jan 17, 2025
dd96fa9
Merge branch 'integrationTesting' into B-21977-INT3
ajlusk Jan 17, 2025
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
3 changes: 3 additions & 0 deletions src/components/Office/AddOrdersForm/AddOrdersForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ const AddOrdersForm = ({
.required('Required'),
hasDependents: Yup.mixed().oneOf(['yes', 'no']).required('Required'),
originDutyLocation: Yup.object().nullable().required('Required'),
counselingOfficeId: currentDutyLocation.provides_services_counseling
? Yup.string().required('Required')
: Yup.string().notRequired(),
newDutyLocation: Yup.object().nullable().required('Required'),
grade: Yup.mixed().oneOf(Object.keys(ORDERS_PAY_GRADE_OPTIONS)).required('Required'),
accompaniedTour: showAccompaniedTourField
Expand Down
32 changes: 32 additions & 0 deletions src/components/Office/AddOrdersForm/AddOrdersForm.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,38 @@ describe('AddOrdersForm - With Counseling Office', () => {
const nextBtn = screen.getByRole('button', { name: 'Next' });
expect(nextBtn.getAttribute('disabled')).toBeFalsy();
});

it('disabled submit if counseling office is required and blank', async () => {
isBooleanFlagEnabled.mockImplementation(() => Promise.resolve(true));
render(
<Provider store={mockStore.store}>
<AddOrdersForm {...testProps} />
</Provider>,
);

await userEvent.selectOptions(await screen.findByLabelText(/Orders type/), 'PERMANENT_CHANGE_OF_STATION');
await userEvent.type(screen.getByLabelText(/Orders date/), '08 Nov 2024');
await userEvent.type(screen.getByLabelText(/Report by date/), '26 Nov 2024');

// Test Current Duty Location Search Box interaction
await userEvent.type(screen.getByLabelText(/Current duty location/), 'AFB', { delay: 100 });
const selectedOptionCurrent = await screen.findByText(/Scott/);
await userEvent.click(selectedOptionCurrent);

// Test New Duty Location Search Box interaction
await userEvent.type(screen.getByLabelText(/New duty location/), 'AFB', { delay: 100 });
const selectedOptionNew = await screen.findByText(/Luke/);
await userEvent.click(selectedOptionNew);

const counselingOfficeLabel = await screen.queryByText(/Counseling office/);
expect(counselingOfficeLabel).toBeTruthy(); // If the field is visible then it it required

await userEvent.selectOptions(screen.getByLabelText(/Pay grade/), ['E_5']);
await userEvent.click(screen.getByLabelText('No'));

const nextBtn = await screen.getByRole('button', { name: 'Next' }, { delay: 100 });
expect(nextBtn).toBeDisabled();
});
});
describe('AddOrdersForm - Edge Cases and Additional Scenarios', () => {
it('disables orders type when safety move is selected', async () => {
Expand Down
Loading