@@ -68,34 +68,34 @@ describe('App test', () => {
6868 render ( < App /> ) ;
6969 expect ( screen . getByText ( / P l e a s e w a i t , f i l e s a r e l o a d i n g .../ ) ) . toBeInTheDocument ( ) ;
7070 await waitFor ( ( ) => {
71- expect ( screen . getByTestId ( 'header-creation-date' ) ) . toContainHTML ( new Date ( reportData . creation_time ) . toUTCString ( ) ) ;
72- expect ( screen . getByTestId ( 'header-tool-name-version' ) ) . toContainHTML ( `${ reportData . tool_name } ` ) ;
73- expect ( screen . getByTestId ( 'header-tool-name-version' ) ) . toContainHTML ( `${ reportData . tool_version } ` ) ;
74- expect ( screen . getByTestId ( 'header-schema-version' ) ) . toContainHTML ( reportData . schema_version ) ;
71+ expect ( screen . getByTestId ( 'header-creation-date' ) ) . toContainHTML ( new Date ( reportData . creationTime ) . toUTCString ( ) ) ;
72+ expect ( screen . getByTestId ( 'header-tool-name-version' ) ) . toContainHTML ( `${ reportData . toolName } ` ) ;
73+ expect ( screen . getByTestId ( 'header-tool-name-version' ) ) . toContainHTML ( `${ reportData . toolVersion } ` ) ;
74+ expect ( screen . getByTestId ( 'header-schema-version' ) ) . toContainHTML ( reportData . schemaVersion ) ;
7575 } ) ;
7676 } ) ;
7777
7878 it ( 'check rest report' , async ( ) => {
7979 render ( < App /> ) ;
8080 expect ( screen . getByText ( / P l e a s e w a i t , f i l e s a r e l o a d i n g .../ ) ) . toBeInTheDocument ( ) ;
81- const total = reportData . problem_details . rest . endpoint_ids . length ;
82- const total_http_calls = reportData . problem_details . rest . total_http_calls ;
81+ const total = reportData . problemDetails . rest . endpointIds . length ;
82+ const totalHttpCalls = reportData . problemDetails . rest . totalHttpCalls ;
8383
8484 await waitFor ( ( ) => {
8585 expect ( screen . getByTestId ( 'rest-report-endpoint' ) ) . toContainHTML ( `${ total } ` ) ;
86- expect ( screen . getByTestId ( 'rest-report-http-calls' ) ) . toContainHTML ( `${ total_http_calls } ` ) ;
86+ expect ( screen . getByTestId ( 'rest-report-http-calls' ) ) . toContainHTML ( `${ totalHttpCalls } ` ) ;
8787 } ) ;
8888
8989 } ) ;
9090
9191 it ( 'check generated tests' , async ( ) => {
9292 render ( < App /> ) ;
9393 expect ( screen . getByText ( / P l e a s e w a i t , f i l e s a r e l o a d i n g .../ ) ) . toBeInTheDocument ( ) ;
94- const total_tests = reportData . total_tests ;
95- const total_test_files = reportData . test_file_paths . length ;
94+ const totalTests = reportData . totalTests ;
95+ const totalTestFiles = reportData . testFilePaths . length ;
9696 await waitFor ( ( ) => {
97- expect ( screen . getByTestId ( 'generated-tests-total-tests' ) ) . toContainHTML ( `${ total_tests } ` ) ;
98- expect ( screen . getByTestId ( 'generated-tests-total-test-files' ) ) . toContainHTML ( `${ total_test_files } ` ) ;
97+ expect ( screen . getByTestId ( 'generated-tests-total-tests' ) ) . toContainHTML ( `${ totalTests } ` ) ;
98+ expect ( screen . getByTestId ( 'generated-tests-total-test-files' ) ) . toContainHTML ( `${ totalTestFiles } ` ) ;
9999 } ) ;
100100 } ) ;
101101
@@ -125,7 +125,7 @@ describe('App test', () => {
125125
126126 await waitFor ( ( ) => {
127127 // check if the endpoints are displayed
128- reportData . problem_details . rest . endpoint_ids . forEach ( ( endpoint : string ) => {
128+ reportData . problemDetails . rest . endpointIds . forEach ( ( endpoint : string ) => {
129129 // const testId = convertEndpointToTestId(endpoint);
130130 expect ( screen . getByTestId ( endpoint ) ) . toBeInTheDocument ( ) ;
131131 } ) ;
@@ -135,11 +135,11 @@ describe('App test', () => {
135135 it ( 'check faults component' , async ( ) => {
136136 render ( < App /> ) ;
137137 expect ( screen . getByText ( / P l e a s e w a i t , f i l e s a r e l o a d i n g .../ ) ) . toBeInTheDocument ( ) ;
138- const total_faults = reportData . faults . total_number ;
139- const faultCounts = getFaultCounts ( reportData . faults . found_faults ) ;
138+ const totalFaults = reportData . faults . totalNumber ;
139+ const faultCounts = getFaultCounts ( reportData . faults . foundFaults ) ;
140140
141141 await waitFor ( ( ) => {
142- expect ( screen . getByTestId ( 'faults-component-total-faults' ) ) . toContainHTML ( `${ total_faults } ` ) ;
142+ expect ( screen . getByTestId ( 'faults-component-total-faults' ) ) . toContainHTML ( `${ totalFaults } ` ) ;
143143 expect ( screen . getByTestId ( 'faults-component-fault-counts' ) ) . toContainHTML ( faultCounts . length . toString ( ) ) ;
144144 } ) ;
145145 } ) ;
0 commit comments