Skip to content

Commit

Permalink
[EASI-4468] related systems column (#2777)
Browse files Browse the repository at this point in the history
* little bit of cleanup

* building out sql and storage. removed empty go file in place of a readme for `sqlqueries`

* (no verify) think i have BE done, flipping to UI to update table for new types

* working through merged types

* (no verify) fix missing embed (whoops), working on merged table types

* reincorporate `type`

* remove unused, cleanup data builder

* separate out type

* fix dates

* dd systems col, fix links + types

* hide systems col on itgov specific page, fix tests

* cypress test

* run gql

* widen col

* fix snap
  • Loading branch information
samoddball committed Aug 29, 2024
1 parent 7c54269 commit c7dd74b
Show file tree
Hide file tree
Showing 37 changed files with 888 additions and 1,723 deletions.
2 changes: 1 addition & 1 deletion cmd/devdata/trb_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ func (s *seederConfig) seedTRBWithForm(ctx context.Context, trbName *string, isS
if err != nil {
return nil, err
}
return resolvers.GetTRBRequestByID(ctx, trb.ID, s.store)
return resolvers.GetTRBRequestByID(ctx, s.store, trb.ID)
}

func (s *seederConfig) seedTRBWithAttendees(ctx context.Context, trbRequestID uuid.UUID) error {
Expand Down
32 changes: 28 additions & 4 deletions cypress/e2e/systemIntake.cy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import cmsGovernanceTeams from '../../src/constants/enums/cmsGovernanceTeams';
import { BASIC_USER_PROD } from '../../src/constants/jobCodes';
import testSystemIntakeName from '../support/systemIntake';

describe('The System Intake Form', () => {
beforeEach(() => {
Expand Down Expand Up @@ -53,7 +54,8 @@ describe('The System Intake Form', () => {
});

it('fills out minimum required fields (smoke test)', () => {
// Contact Details
// Cont
// act Details
cy.systemIntake.contactDetails.fillNonBranchingFields();

// Test "Business owner same as requester" checkbox
Expand Down Expand Up @@ -369,7 +371,7 @@ describe('The System Intake Form', () => {

cy.contains('.easi-review-row dt', 'Project Name')
.siblings('dd')
.contains('Test Request Name');
.contains(testSystemIntakeName);

cy.contains('dt', 'What is your business need?')
.siblings('dd')
Expand Down Expand Up @@ -421,10 +423,32 @@ describe('The System Intake Form', () => {
cy.contains('h1', 'Request details');

cy.get('#requestName')
.type('Test Request Name')
.should('have.value', 'Test Request Name');
.type(testSystemIntakeName)
.should('have.value', testSystemIntakeName);

cy.contains('button', 'Back').click();
cy.wait('@updateRequestDetails');
});

it('archives a system intake', () => {
cy.visit('/system/making-a-request');

cy.contains('a', 'Start a new request').click();

cy.contains('label', 'Add a new system or service').click();

cy.contains('button', 'Continue').click();

cy.contains('a', 'Get started').click();

cy.visit('/');

cy.contains('a', 'Draft').click();

cy.contains('button', 'Remove your request').click();

cy.contains('button', 'Remove request').click();

cy.url().should('eq', 'http://localhost:3000/');
});
});
8 changes: 6 additions & 2 deletions cypress/support/systemIntake.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// and 3000 causes issue with autosave. This is definitely a bit hacky...
// TODO: fix this in the future if it causes more headache

const testSystemIntakeName = 'Test Request Name';

cy.systemIntake = {
contactDetails: {
fillNonBranchingFields: () => {
Expand Down Expand Up @@ -44,8 +46,8 @@ cy.systemIntake = {
requestDetails: {
fillNonBranchingFields: () => {
cy.get('#requestName')
.type('Test Request Name')
.should('have.value', 'Test Request Name');
.type(testSystemIntakeName)
.should('have.value', testSystemIntakeName);

cy.get('#businessNeed')
.type('This is my business need.')
Expand Down Expand Up @@ -86,3 +88,5 @@ cy.systemIntake = {
}
}
};

export default testSystemIntakeName;
4 changes: 3 additions & 1 deletion cypress/support/trbRequest.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import testSystemIntakeName from './systemIntake';

cy.trbRequest = {
basicDetails: {
fillRequiredFields: () => {
cy.get('[name=name]').clear().type('Test Request Name');
cy.get('[name=name]').clear().type(testSystemIntakeName);
cy.get('[name=component]').select(
'Center for Medicaid and CHIP Services'
);
Expand Down
Loading

0 comments on commit c7dd74b

Please sign in to comment.