Skip to content

Commit 262756c

Browse files
committed
2
1 parent 7ddf22f commit 262756c

3 files changed

Lines changed: 98 additions & 30 deletions

File tree

‎gui/manualtest/tests/preferences.feature‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Feature: Preferences
2626
Then the application does not crash
2727
And the analysis is done and the results are shown
2828

29-
@id:t28ce8afe @project:embedded @edition:opensource
29+
@id:t28ce8afe @project:embedded @edition:opensource @disabled
3030
Scenario Outline: Misra rule text file
3131
Given Edit > Preferences is open on the Addons tab
3232
When I select the rule text file {project:embedded}/<rulefile>

‎gui/manualtest/tests/xml_results.feature‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ Feature: XML results
3737
@id:t053b7c9c @project:xml-results @project:basic-project
3838
Scenario: Reanalyze enabled after XML results
3939
Given the XML results {project:xml-results}/results.xml are opened with File > Open XML
40+
Then the button Reanalyze all files is disabled
41+
And if I rightclick on a.c in the results I get a popup
42+
And there is a option "Recheck 1 file(s)" in the popup that is disabled
4043
When I open the project file {project:basic-project}/basic.cppcheck
4144
And I wait until the analysis is done
4245
Then the button Reanalyze all files is enabled and can be clicked

‎gui/manualtest/tests/xml_results.scripts.json‎

Lines changed: 94 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -287,69 +287,123 @@
287287
},
288288
"t053b7c9c": {
289289
"script": [
290+
{
291+
"expect": "visible",
292+
"name": "Cppcheck",
293+
"role": "frame",
294+
"label": "Given the application is started with no project loaded"
295+
},
290296
{
291297
"do": "click",
292298
"name": "File",
293299
"role": "menu item",
294-
"label": "Open the File menu"
300+
"label": "Given the XML results are opened with File > Open XML: open the File menu"
295301
},
296302
{
297303
"do": "click",
298-
"name": "Open XML",
304+
"name": "Open XML...",
299305
"role": "menu item",
300-
"label": "Choose File > Open XML"
306+
"label": "Given the XML results are opened with File > Open XML: choose Open XML"
301307
},
302308
{
303-
"do": "wait",
309+
"expect": "visible",
304310
"name": "Open the report file",
305-
"timeout": 10,
306-
"label": "Wait for the Open XML dialog"
311+
"role": "dialog",
312+
"label": "The Open XML file dialog is shown"
307313
},
308314
{
309315
"do": "settext",
310316
"name": "File name:",
311317
"role": "text",
312318
"value": "{project:xml-results}/results.xml",
313-
"label": "Enter the path of results.xml"
319+
"label": "Enter the XML results file name"
314320
},
315321
{
316322
"do": "key",
317323
"keys": [
318324
"Return"
319325
],
320-
"label": "Confirm the XML file"
326+
"label": "Open the XML results"
321327
},
322328
{
323329
"do": "wait",
324330
"name": "Open the report file",
325331
"gone": true,
326332
"timeout": 10,
327-
"label": "Wait for the dialog to close"
333+
"label": "Wait until the file dialog is closed"
334+
},
335+
{
336+
"expect": "visible",
337+
"name": "results.xml",
338+
"role": "frame",
339+
"timeout": 10,
340+
"label": "The XML results are loaded"
341+
},
342+
{
343+
"expect": "visible",
344+
"name": "a.c",
345+
"role": "table cell",
346+
"timeout": 10,
347+
"label": "a.c is shown in the results"
348+
},
349+
{
350+
"expect": "state",
351+
"name": "Reanalyze all files",
352+
"role": "button",
353+
"not_state": "enabled",
354+
"label": "Then the button Reanalyze all files is disabled"
355+
},
356+
{
357+
"do": "rightclick",
358+
"name": "a.c",
359+
"role": "table cell",
360+
"label": "And if I rightclick on a.c in the results"
361+
},
362+
{
363+
"do": "sleep",
364+
"seconds": 1
365+
},
366+
{
367+
"expect": "ocr",
368+
"contains": "Copy",
369+
"label": "I get a popup"
370+
},
371+
{
372+
"expect": "ocr",
373+
"not_contains": "Recheck",
374+
"label": "There is an option Recheck 1 file(s) in the popup that is disabled (greyed out, not read by OCR)"
375+
},
376+
{
377+
"do": "key",
378+
"keys": [
379+
"Escape"
380+
],
381+
"label": "Close the popup"
328382
},
329383
{
330384
"do": "click",
331385
"name": "File",
332386
"role": "menu item",
333-
"label": "Open the File menu again"
387+
"label": "When I open the project file: open the File menu"
334388
},
335389
{
336390
"do": "click",
337-
"name": "Open Project File",
391+
"name": "Open Project File...",
338392
"role": "menu item",
339-
"label": "Choose File > Open Project File"
393+
"label": "When I open the project file: choose Open Project File"
340394
},
341395
{
342-
"do": "wait",
396+
"expect": "visible",
343397
"name": "Select Project File",
344-
"timeout": 10,
345-
"label": "Wait for the project file dialog"
398+
"role": "dialog",
399+
"label": "The project file dialog is shown"
346400
},
347401
{
348402
"do": "settext",
349403
"name": "File name:",
350404
"role": "text",
351405
"value": "{project:basic-project}/basic.cppcheck",
352-
"label": "Enter the path of basic.cppcheck"
406+
"label": "Enter the project file name"
353407
},
354408
{
355409
"do": "key",
@@ -363,39 +417,50 @@
363417
"name": "Select Project File",
364418
"gone": true,
365419
"timeout": 10,
366-
"label": "Wait for the dialog to close"
420+
"label": "Wait until the file dialog is closed"
367421
},
368422
{
369-
"do": "sleep",
370-
"seconds": 5,
371-
"label": "Wait until the analysis is done"
423+
"expect": "visible",
424+
"name": "Project: basic.cppcheck",
425+
"role": "frame",
426+
"timeout": 10,
427+
"label": "The project is loaded"
372428
},
373429
{
374-
"expect": "visible",
375-
"name": "Reanalyze all files",
430+
"expect": "state",
431+
"name": "Stop analysis",
376432
"role": "button",
377-
"timeout": 10,
378-
"label": "Reanalyze all files button is shown"
433+
"not_state": "enabled",
434+
"timeout": 30,
435+
"label": "And I wait until the analysis is done"
379436
},
380437
{
381438
"expect": "state",
382439
"name": "Reanalyze all files",
383440
"role": "button",
384441
"state": "enabled",
385-
"timeout": 10,
386-
"label": "Reanalyze all files button is enabled"
442+
"timeout": 30,
443+
"label": "Then the button Reanalyze all files is enabled"
387444
},
388445
{
389446
"do": "click",
390447
"name": "Reanalyze all files",
391448
"role": "button",
392-
"label": "Click Reanalyze all files"
449+
"label": "And can be clicked"
393450
},
394451
{
395452
"expect": "alive",
396-
"label": "Application still running after the click"
453+
"label": "The application still runs after clicking Reanalyze all files"
454+
},
455+
{
456+
"expect": "state",
457+
"name": "Reanalyze all files",
458+
"role": "button",
459+
"state": "enabled",
460+
"timeout": 30,
461+
"label": "Reanalyze all files is enabled again after the reanalysis"
397462
}
398463
],
399-
"script_for": "36a581ae5136"
464+
"script_for": "299ae476b3db"
400465
}
401466
}

0 commit comments

Comments
 (0)