Skip to content

Commit

Permalink
Merge branch 'staging' of https://github.com/ustaxcourt/ef-cms into 9…
Browse files Browse the repository at this point in the history
…998-integration-tests-exp
  • Loading branch information
Absolutestunna committed Jul 1, 2023
2 parents c37cd12 + bb0a817 commit c2f4168
Show file tree
Hide file tree
Showing 25 changed files with 148 additions and 858 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const searchForCaseByDocketNumber = docketNumber => {
};

export const enterPetitionerName = name => {
cy.waitUntilSettled();
cy.get('input#petitioner-name').type(name);
};

Expand All @@ -38,6 +39,7 @@ export const getKeywordInput = () => {
};

export const enterDocumentDocketNumber = docketNumber => {
cy.waitUntilSettled();
cy.get('input#docket-number').type(docketNumber);
};

Expand Down
17 changes: 17 additions & 0 deletions scripts/dynamo/delete-order-and-opinion-search-feature-flags.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# Deletes the external and internal advanced search (order and opinion) flags in the dynamo deploy table

# Usage
# ENV=exp1 ./delete-order-and-opinion-search-feature-flags.sh

./check-env-variables.sh \
"ENV" \
"AWS_SECRET_ACCESS_KEY" \
"AWS_ACCESS_KEY_ID"

aws dynamodb delete-item --region us-east-1 --table-name "efcms-deploy-${ENV}" --key '{"pk":{"S":"external-opinion-search-enabled"},"sk":{"S":"external-opinion-search-enabled"}}'
aws dynamodb delete-item --region us-east-1 --table-name "efcms-deploy-${ENV}" --key '{"pk":{"S":"external-order-search-enabled"},"sk":{"S":"external-order-search-enabled"}}'
aws dynamodb delete-item --region us-east-1 --table-name "efcms-deploy-${ENV}" --key '{"pk":{"S":"internal-opinion-search-enabled"},"sk":{"S":"internal-opinion-search-enabled"}}'
aws dynamodb delete-item --region us-east-1 --table-name "efcms-deploy-${ENV}" --key '{"pk":{"S":"internal-order-search-enabled"},"sk":{"S":"internal-order-search-enabled"}}'

2 changes: 1 addition & 1 deletion scripts/dynamo/setup-add-docket-numbers-to-orders-flag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Sets the external opinion search enabled flag to "true" in the dynamo deploy table

# Usage
# ENV=dev ./setup-external-opinion-search-flag.sh
# ENV=dev ./setup-add-docket-numbers-to-orders-flag.sh

./check-env-variables.sh \
"ENV" \
Expand Down
32 changes: 0 additions & 32 deletions scripts/dynamo/setup-external-opinion-search-flag.sh

This file was deleted.

14 changes: 0 additions & 14 deletions scripts/dynamo/setup-external-order-search-flag.sh

This file was deleted.

32 changes: 0 additions & 32 deletions scripts/dynamo/setup-internal-opinion-search-flag.sh

This file was deleted.

13 changes: 0 additions & 13 deletions scripts/dynamo/setup-internal-order-search-flag.sh

This file was deleted.

4 changes: 0 additions & 4 deletions scripts/setup-all-env-configuration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
"AWS_SECRET_ACCESS_KEY" \
"AWS_ACCESS_KEY_ID"

./scripts/dynamo/setup-internal-order-search-flag.sh
./scripts/dynamo/setup-external-order-search-flag.sh
./scripts/dynamo/setup-internal-opinion-search-flag.sh
./scripts/dynamo/setup-external-opinion-search-flag.sh
./scripts/dynamo/setup-document-search-limiter-limits.sh
./scripts/dynamo/setup-terminal-ip-allowlist.sh
./scripts/dynamo/setup-maintenance-mode-flag.sh
Expand Down
20 changes: 0 additions & 20 deletions shared/src/business/entities/EntityConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,26 +83,6 @@ export const ALLOWLIST_FEATURE_FLAGS = {
E_CONSENT_FIELDS_ENABLED_FEATURE_FLAG: {
key: 'e-consent-fields-enabled-feature-flag',
},
EXTERNAL_OPINION_SEARCH: {
disabledMessage:
'Opinion search has been temporarily disabled. Please try again later.',
key: 'external-opinion-search-enabled',
},
EXTERNAL_ORDER_SEARCH: {
disabledMessage:
'Order search has been temporarily disabled. Please try again later.',
key: 'external-order-search-enabled',
},
INTERNAL_OPINION_SEARCH: {
disabledMessage:
'Opinion search has been temporarily disabled. Please try again later.',
key: 'internal-opinion-search-enabled',
},
INTERNAL_ORDER_SEARCH: {
disabledMessage:
'Order search has been temporarily disabled. Please try again later.',
key: 'internal-order-search-enabled',
},
MULTI_DOCKETABLE_PAPER_FILINGS: {
disabledMessage:
'Paper filed docket entries are not being duplicated across consolidated cases temporarily.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('getFeatureFlagValueInteractor', () => {
.getFeatureFlagValue.mockResolvedValue(mockFeatureFlagValue);

const result = await getFeatureFlagValueInteractor(applicationContext, {
featureFlag: ALLOWLIST_FEATURE_FLAGS.EXTERNAL_ORDER_SEARCH.key,
featureFlag: ALLOWLIST_FEATURE_FLAGS.USE_EXTERNAL_PDF_GENERATION.key,
});

expect(
Expand All @@ -28,7 +28,7 @@ describe('getFeatureFlagValueInteractor', () => {
.getFeatureFlagValue.mockResolvedValue(mockFeatureFlagValue);

const result = await getFeatureFlagValueInteractor(applicationContext, {
featureFlag: ALLOWLIST_FEATURE_FLAGS.EXTERNAL_ORDER_SEARCH.key,
featureFlag: ALLOWLIST_FEATURE_FLAGS.USE_EXTERNAL_PDF_GENERATION.key,
});

expect(
Expand Down
20 changes: 0 additions & 20 deletions web-api/storage/fixtures/seed/efcms-local.json
Original file line number Diff line number Diff line change
Expand Up @@ -24601,16 +24601,6 @@
"template": "{\"emailContent\":\"<div style=\\\"text-align:center\\\"><h1 style=\\\"font-size:20px;margin-bottom:0\\\">United States Tax Court</h1><div style=\\\"font-size:16px\\\"><div>Washington, DC 20217</div><div style=\\\"margin-top:15px\\\">September 30, 2020</div></div></div><br/><br/><p>Dear <!-- -->IRS<!-- -->,</p><p>A document has been served on your Tax Court case:</p><div id=\\\"case-information\\\"><div>Docket Number: <!-- -->124-20</div><div>Case Title: <!-- -->Stacy Russold, Natalya Chaouche, Tax Matters Partner</div></div><br/><div id=\\\"document-information\\\"><div>Document Type: <!-- -->This is a legacy judge&#x27;s order</div><div>Docket Entry No.: <!-- -->3</div><div>Filed by: <!-- -->N/A</div><div>Served: <!-- -->09/30/20 4:25 pm ET</div></div><br/><p>To view this document,<!-- --> <a href=\\\"https://app.undefined\\\">please log in to the U.S. Tax Court.</a></p><p>Certain documents may require your action.</p><div id=\\\"computer-readable\\\"><div>---- COMPUTER-READABLE DATA ----</div><div>docketNumber: <!-- -->124-20</div><div>docketEntryNo: <!-- -->3</div><div>docketEntryId: <!-- -->c611ee2e-a270-4dcd-a7bd-b8b9062db630</div><div>eventCode: <!-- -->O</div></div><p><em>Please do not reply to this message. This e-mail is an automated notification from an account which is unable to receive replies.</em></p>\"}",
"pk": "email-undefined"
},
{
"sk": "external-opinion-search-enabled",
"current": true,
"pk": "external-opinion-search-enabled"
},
{
"sk": "external-order-search-enabled",
"current": true,
"pk": "external-order-search-enabled"
},
{
"sk": "user|c0daa0a7-a66b-4eae-949b-9ae0f8a32e46",
"pk": "inactivePractitioner|IP1111"
Expand All @@ -24623,16 +24613,6 @@
"sk": "user|c0daa0a7-a66b-4eae-949b-9ae0f8a32e46",
"pk": "inactivePractitioner|TEST INACTIVE PRACTITIONER"
},
{
"sk": "internal-opinion-search-enabled",
"current": true,
"pk": "internal-opinion-search-enabled"
},
{
"sk": "internal-order-search-enabled",
"current": true,
"pk": "internal-order-search-enabled"
},
{
"sk": "ip-limiter-document-search-ip-limiter|localhost",
"id": 1,
Expand Down
38 changes: 38 additions & 0 deletions web-client/integration-tests/opinionSearch.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { ADVANCED_SEARCH_TABS } from '../../shared/src/business/entities/EntityConstants';
import { loginAs, setOpinionSearchEnabled, setupTest } from './helpers';

describe('Opinion search', () => {
const cerebralTest = setupTest();

afterAll(async () => {
cerebralTest.closeSocket();
await setOpinionSearchEnabled(true, 'internal');
await setOpinionSearchEnabled(true, 'external');
});

describe('internal', () => {
loginAs(cerebralTest, '[email protected]');

it('should preserve the warning message when the user routes back to search from their dashboard', async () => {
await cerebralTest.runSequence('gotoDashboardSequence');
await cerebralTest.runSequence('gotoAdvancedSearchSequence');

const stateOfAdvancedSearch = cerebralTest.getState('advancedSearchTab');

expect(stateOfAdvancedSearch).toEqual(ADVANCED_SEARCH_TABS.CASE);
});
});

describe('external', () => {
loginAs(cerebralTest, '[email protected]');

it('should preserve the warning message when the user routes back to search from their dashboard', async () => {
await cerebralTest.runSequence('gotoDashboardSequence');
await cerebralTest.runSequence('gotoAdvancedSearchSequence');

const stateOfAdvancedSearch = cerebralTest.getState('advancedSearchTab');

expect(stateOfAdvancedSearch).toEqual(ADVANCED_SEARCH_TABS.CASE);
});
});
});
98 changes: 0 additions & 98 deletions web-client/integration-tests/opinionSearchFeatureFlag.test.ts

This file was deleted.

Loading

0 comments on commit c2f4168

Please sign in to comment.