Skip to content

Commit 6eb190a

Browse files
authored
[DT-1871] Enable Progress Reports on production (#3000)
1 parent 114e21a commit 6eb190a

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

cypress/component/DarCollectionTable/actions.spec.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,12 @@ describe('Researcher Actions - Review Closeout Button', () => {
226226
cy.get(`#researcher-review-closeout-${collectionId}`).should('exist')
227227
})
228228

229-
it('does not render in production environment even with Review_Progress_Report action', () => {
229+
it('does render in production environment even with Review_Progress_Report action', () => {
230230
cy.stub(Storage, 'getEnv').returns('prod')
231231
propCopy.consoleType = 'researcher'
232232
propCopy.actions = ['Review_Progress_Report']
233233
mount(<Actions {...propCopy} />)
234-
cy.get(`#researcher-review-closeout-${collectionId}`).should('not.exist')
234+
cy.get(`#researcher-review-closeout-${collectionId}`).should('exist')
235235
})
236236

237237
it('does not render if Review_Progress_Report action is not present', () => {

src/components/dar_collection_table/Actions.jsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import SimpleButton from 'src/components/SimpleButton'
66
import { useHistory } from 'react-router-dom'
77
import { Notifications } from 'src/libs/utils'
88
import { includes, toLower } from 'lodash/fp'
9-
import { checkEnv, envGroups } from 'src/utils/EnvironmentUtils'
109

1110
const duosBlue = '#0948B7'
1211
const cancelGray = '#333F52'
@@ -238,10 +237,8 @@ export default function Actions(props) {
238237
{actions.includes('Review') && <SimpleButton {...reviewButtonAttributes} />}
239238
{actions.includes('Delete') && <TableIconButton {...deleteButtonAttributes} />}
240239
{actions.includes('Cancel') && <TableIconButton {...cancelButtonAttributes} />}
241-
{checkEnv(envGroups.NON_PROD) && actions.includes('Create_Progress_Report')
242-
&& <SimpleButton {...createProgressReportButtonAttributes} />}
243-
{checkEnv(envGroups.NON_PROD) && actions.includes('Review_Progress_Report')
244-
&& <SimpleButton {...reviewCloseoutButtonAttributes} />}
240+
{actions.includes('Create_Progress_Report') && <SimpleButton {...createProgressReportButtonAttributes} />}
241+
{actions.includes('Review_Progress_Report') && <SimpleButton {...reviewCloseoutButtonAttributes} />}
245242
</div>
246243
)
247244
}

0 commit comments

Comments
 (0)