1
1
import * as ERACommonsUtils from 'src/components/era_commons/ERACommonsUtils'
2
- import EnvironmentUtils from 'src/utils/EnvironmentUtils'
3
2
import { DuosUser } from 'src/types/model'
4
3
5
4
describe ( 'ERACommonsUtils Tests' , ( ) => {
6
- describe ( 'Test environment-enabled cases' , ( ) => {
7
- beforeEach ( ( ) => {
8
- cy . stub ( EnvironmentUtils , 'checkEnv' ) . returns ( true )
9
- } )
5
+ describe ( 'Verify RAS is enabled' , ( ) => {
10
6
it ( 'rasEnabled' , ( ) => {
11
7
const result = ERACommonsUtils . rasEnabled ( )
12
8
expect ( result ) . to . eq ( true )
@@ -21,24 +17,6 @@ describe('ERACommonsUtils Tests', () => {
21
17
} )
22
18
} )
23
19
24
- describe ( 'Test environment-disabled cases' , ( ) => {
25
- beforeEach ( ( ) => {
26
- cy . stub ( EnvironmentUtils , 'checkEnv' ) . returns ( false )
27
- } )
28
- it ( 'rasEnabled' , ( ) => {
29
- const result = ERACommonsUtils . rasEnabled ( )
30
- expect ( result ) . to . eq ( false )
31
- } )
32
- it ( 'nihAccountLabel' , ( ) => {
33
- const result = ERACommonsUtils . nihAccountLabel ( )
34
- expect ( result ) . to . eq ( 'eRA Commons' )
35
- } )
36
- it ( 'nihAccountInstructions' , ( ) => {
37
- const result = ERACommonsUtils . nihAccountInstructions ( )
38
- expect ( result ) . to . eq ( 'https://www.era.nih.gov/register-accounts/understanding-era-commons-accounts.htm' )
39
- } )
40
- } )
41
-
42
20
describe ( 'extractEraAuthenticationState' , ( ) => {
43
21
const futureDate = new Date ( )
44
22
futureDate . setDate ( futureDate . getDate ( ) + 30 )
0 commit comments