@@ -19,43 +19,43 @@ beforeAll(async () => {
19
19
describe ( 'upload dictionaries' , ( ) => {
20
20
it ( 'should upload a command dictionary and all of the fields should be populated correctly' , async ( ) => {
21
21
// During the test we use a uuid for the mission so there's no conflicting command dictionaries.
22
- const { id , dictionary_path , mission , parsed_json } = await insertDictionary ( graphqlClient , DictionaryType . COMMAND ) ;
22
+ const { command } = await insertDictionary ( graphqlClient , DictionaryType . COMMAND ) ;
23
23
24
- expect ( dictionary_path ) . toBe ( `/usr/src/app/sequencing_file_store/${ mission } /command_lib.${ mission } .ts` ) ;
24
+ expect ( command . dictionary_path ) . toBe ( `/usr/src/app/sequencing_file_store/${ command . mission } /command_lib.${ command . mission } .ts` ) ;
25
25
26
- expect ( parsed_json ) . toStrictEqual (
27
- ampcs . parse ( commandDictionaryString . replace ( / ( B a n a n a N a t i o n | 1 .0 .0 .0 ) / g, mission ) ) ,
26
+ expect ( command . parsed_json ) . toStrictEqual (
27
+ ampcs . parse ( commandDictionaryString . replace ( / ( B a n a n a N a t i o n | 1 .0 .0 .0 ) / g, command . mission ) ) ,
28
28
) ;
29
29
30
- await removeDictionary ( graphqlClient , id , DictionaryType . COMMAND ) ;
30
+ await removeDictionary ( graphqlClient , command . id , DictionaryType . COMMAND ) ;
31
31
} , 30000 ) ;
32
32
33
33
it ( 'should upload a channel dictionary and all of the fields should be populated correctly' , async ( ) => {
34
34
// During the test we use a uuid for the mission so there's no conflicting command dictionaries.
35
- const { id , dictionary_path , mission , parsed_json } = await insertDictionary ( graphqlClient , DictionaryType . CHANNEL ) ;
35
+ const { channel } = await insertDictionary ( graphqlClient , DictionaryType . CHANNEL ) ;
36
36
37
- expect ( dictionary_path ) . toBe ( `/usr/src/app/sequencing_file_store/${ mission } /channel_lib.${ mission } .ts` ) ;
37
+ expect ( channel . dictionary_path ) . toBe ( `/usr/src/app/sequencing_file_store/${ channel . mission } /channel_lib.${ channel . mission } .ts` ) ;
38
38
39
- expect ( parsed_json ) . toEqual (
40
- ampcs . parseChannelDictionary ( channelDictionaryString . replace ( / ( B a n a n a N a t i o n | 1 .0 .0 .0 ) / g, mission ) ) ,
39
+ expect ( channel . parsed_json ) . toEqual (
40
+ ampcs . parseChannelDictionary ( channelDictionaryString . replace ( / ( B a n a n a N a t i o n | 1 .0 .0 .0 ) / g, channel . mission ) ) ,
41
41
) ;
42
42
43
- await removeDictionary ( graphqlClient , id , DictionaryType . CHANNEL ) ;
43
+ await removeDictionary ( graphqlClient , channel . id , DictionaryType . CHANNEL ) ;
44
44
} , 30000 ) ;
45
45
46
46
it ( 'should upload a parameter dictionary and all of the fields should be populated correctly' , async ( ) => {
47
47
// During the test we use a uuid for the mission so there's no conflicting command dictionaries.
48
- const { id , dictionary_path , mission , parsed_json } = await insertDictionary (
48
+ const { parameter } = await insertDictionary (
49
49
graphqlClient ,
50
50
DictionaryType . PARAMETER ,
51
51
) ;
52
52
53
- expect ( dictionary_path ) . toBe ( `/usr/src/app/sequencing_file_store/${ mission } /parameter_lib.${ mission } .ts` ) ;
53
+ expect ( parameter . dictionary_path ) . toBe ( `/usr/src/app/sequencing_file_store/${ parameter . mission } /parameter_lib.${ parameter . mission } .ts` ) ;
54
54
55
- expect ( parsed_json ) . toEqual (
56
- ampcs . parseParameterDictionary ( parameterDictionaryString . replace ( / ( B a n a n a N a t i o n | 1 .0 .0 .1 ) / g, mission ) ) ,
55
+ expect ( parameter . parsed_json ) . toEqual (
56
+ ampcs . parseParameterDictionary ( parameterDictionaryString . replace ( / ( B a n a n a N a t i o n | 1 .0 .0 .1 ) / g, parameter . mission ) ) ,
57
57
) ;
58
58
59
- await removeDictionary ( graphqlClient , id , DictionaryType . PARAMETER ) ;
59
+ await removeDictionary ( graphqlClient , parameter . id , DictionaryType . PARAMETER ) ;
60
60
} , 30000 ) ;
61
61
} ) ;
0 commit comments