|
4 | 4 | getDatabase, |
5 | 5 | createApplicationForm, |
6 | 6 | createApplicationFormField, |
7 | | - createOpportunity, |
8 | 7 | createOrUpdateBaseField, |
9 | 8 | createProposalVersion, |
10 | 9 | loadPermissionGrantBundle, |
@@ -1121,8 +1120,7 @@ describe('/proposalVersions', () => { |
1121 | 1120 | shortCode: 'orgName', |
1122 | 1121 | }); |
1123 | 1122 |
|
1124 | | - const opportunity = await createOpportunity(db, testUserAuthContext, { |
1125 | | - title: 'Conditional Test Opportunity', |
| 1123 | + const opportunity = await createTestOpportunity(db, testUserAuthContext, { |
1126 | 1124 | funderShortCode: systemFunder.shortCode, |
1127 | 1125 | }); |
1128 | 1126 | const proposal = await createTestProposal(db, testUserAuthContext, { |
@@ -1234,8 +1232,7 @@ describe('/proposalVersions', () => { |
1234 | 1232 | shortCode: 'orgName', |
1235 | 1233 | }); |
1236 | 1234 |
|
1237 | | - const opportunity = await createOpportunity(db, testUserAuthContext, { |
1238 | | - title: 'No Conditions Test Opportunity', |
| 1235 | + const opportunity = await createTestOpportunity(db, testUserAuthContext, { |
1239 | 1236 | funderShortCode: systemFunder.shortCode, |
1240 | 1237 | }); |
1241 | 1238 | const proposal = await createTestProposal(db, testUserAuthContext, { |
@@ -1331,8 +1328,7 @@ describe('/proposalVersions', () => { |
1331 | 1328 | shortCode: 'orgName', |
1332 | 1329 | }); |
1333 | 1330 |
|
1334 | | - const opportunity = await createOpportunity(db, testUserAuthContext, { |
1335 | | - title: 'Exclusion Test Opportunity', |
| 1331 | + const opportunity = await createTestOpportunity(db, testUserAuthContext, { |
1336 | 1332 | funderShortCode: systemFunder.shortCode, |
1337 | 1333 | }); |
1338 | 1334 | const proposal = await createTestProposal(db, testUserAuthContext, { |
@@ -1421,8 +1417,7 @@ describe('/proposalVersions', () => { |
1421 | 1417 | shortCode: 'orgName', |
1422 | 1418 | }); |
1423 | 1419 |
|
1424 | | - const opportunity = await createOpportunity(db, testUserAuthContext, { |
1425 | | - title: 'Equals Test Opportunity', |
| 1420 | + const opportunity = await createTestOpportunity(db, testUserAuthContext, { |
1426 | 1421 | funderShortCode: systemFunder.shortCode, |
1427 | 1422 | }); |
1428 | 1423 | const proposal = await createTestProposal(db, testUserAuthContext, { |
@@ -1532,11 +1527,10 @@ describe('/proposalVersions', () => { |
1532 | 1527 | }); |
1533 | 1528 |
|
1534 | 1529 | // Set up opportunity + proposal + field values for the OTHER funder |
1535 | | - const otherOpportunity = await createOpportunity( |
| 1530 | + const otherOpportunity = await createTestOpportunity( |
1536 | 1531 | db, |
1537 | 1532 | testUserAuthContext, |
1538 | 1533 | { |
1539 | | - title: 'Other Funder Opportunity', |
1540 | 1534 | funderShortCode: otherFunder.shortCode, |
1541 | 1535 | }, |
1542 | 1536 | ); |
@@ -1620,11 +1614,10 @@ describe('/proposalVersions', () => { |
1620 | 1614 | }); |
1621 | 1615 |
|
1622 | 1616 | // Set up data for the GRANTED funder |
1623 | | - const grantedOpportunity = await createOpportunity( |
| 1617 | + const grantedOpportunity = await createTestOpportunity( |
1624 | 1618 | db, |
1625 | 1619 | testUserAuthContext, |
1626 | 1620 | { |
1627 | | - title: 'Granted Funder Opportunity', |
1628 | 1621 | funderShortCode: grantedFunder.shortCode, |
1629 | 1622 | }, |
1630 | 1623 | ); |
@@ -1682,11 +1675,10 @@ describe('/proposalVersions', () => { |
1682 | 1675 | }); |
1683 | 1676 |
|
1684 | 1677 | // Set up data for the OTHER funder |
1685 | | - const otherOpportunity = await createOpportunity( |
| 1678 | + const otherOpportunity = await createTestOpportunity( |
1686 | 1679 | db, |
1687 | 1680 | testUserAuthContext, |
1688 | 1681 | { |
1689 | | - title: 'Other Funder Opportunity', |
1690 | 1682 | funderShortCode: otherFunder.shortCode, |
1691 | 1683 | }, |
1692 | 1684 | ); |
|
0 commit comments