|
287 | 287 | }, |
288 | 288 | "t053b7c9c": { |
289 | 289 | "script": [ |
| 290 | + { |
| 291 | + "expect": "visible", |
| 292 | + "name": "Cppcheck", |
| 293 | + "role": "frame", |
| 294 | + "label": "Given the application is started with no project loaded" |
| 295 | + }, |
290 | 296 | { |
291 | 297 | "do": "click", |
292 | 298 | "name": "File", |
293 | 299 | "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" |
295 | 301 | }, |
296 | 302 | { |
297 | 303 | "do": "click", |
298 | | - "name": "Open XML", |
| 304 | + "name": "Open XML...", |
299 | 305 | "role": "menu item", |
300 | | - "label": "Choose File > Open XML" |
| 306 | + "label": "Given the XML results are opened with File > Open XML: choose Open XML" |
301 | 307 | }, |
302 | 308 | { |
303 | | - "do": "wait", |
| 309 | + "expect": "visible", |
304 | 310 | "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" |
307 | 313 | }, |
308 | 314 | { |
309 | 315 | "do": "settext", |
310 | 316 | "name": "File name:", |
311 | 317 | "role": "text", |
312 | 318 | "value": "{project:xml-results}/results.xml", |
313 | | - "label": "Enter the path of results.xml" |
| 319 | + "label": "Enter the XML results file name" |
314 | 320 | }, |
315 | 321 | { |
316 | 322 | "do": "key", |
317 | 323 | "keys": [ |
318 | 324 | "Return" |
319 | 325 | ], |
320 | | - "label": "Confirm the XML file" |
| 326 | + "label": "Open the XML results" |
321 | 327 | }, |
322 | 328 | { |
323 | 329 | "do": "wait", |
324 | 330 | "name": "Open the report file", |
325 | 331 | "gone": true, |
326 | 332 | "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" |
328 | 382 | }, |
329 | 383 | { |
330 | 384 | "do": "click", |
331 | 385 | "name": "File", |
332 | 386 | "role": "menu item", |
333 | | - "label": "Open the File menu again" |
| 387 | + "label": "When I open the project file: open the File menu" |
334 | 388 | }, |
335 | 389 | { |
336 | 390 | "do": "click", |
337 | | - "name": "Open Project File", |
| 391 | + "name": "Open Project File...", |
338 | 392 | "role": "menu item", |
339 | | - "label": "Choose File > Open Project File" |
| 393 | + "label": "When I open the project file: choose Open Project File" |
340 | 394 | }, |
341 | 395 | { |
342 | | - "do": "wait", |
| 396 | + "expect": "visible", |
343 | 397 | "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" |
346 | 400 | }, |
347 | 401 | { |
348 | 402 | "do": "settext", |
349 | 403 | "name": "File name:", |
350 | 404 | "role": "text", |
351 | 405 | "value": "{project:basic-project}/basic.cppcheck", |
352 | | - "label": "Enter the path of basic.cppcheck" |
| 406 | + "label": "Enter the project file name" |
353 | 407 | }, |
354 | 408 | { |
355 | 409 | "do": "key", |
|
363 | 417 | "name": "Select Project File", |
364 | 418 | "gone": true, |
365 | 419 | "timeout": 10, |
366 | | - "label": "Wait for the dialog to close" |
| 420 | + "label": "Wait until the file dialog is closed" |
367 | 421 | }, |
368 | 422 | { |
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" |
372 | 428 | }, |
373 | 429 | { |
374 | | - "expect": "visible", |
375 | | - "name": "Reanalyze all files", |
| 430 | + "expect": "state", |
| 431 | + "name": "Stop analysis", |
376 | 432 | "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" |
379 | 436 | }, |
380 | 437 | { |
381 | 438 | "expect": "state", |
382 | 439 | "name": "Reanalyze all files", |
383 | 440 | "role": "button", |
384 | 441 | "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" |
387 | 444 | }, |
388 | 445 | { |
389 | 446 | "do": "click", |
390 | 447 | "name": "Reanalyze all files", |
391 | 448 | "role": "button", |
392 | | - "label": "Click Reanalyze all files" |
| 449 | + "label": "And can be clicked" |
393 | 450 | }, |
394 | 451 | { |
395 | 452 | "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" |
397 | 462 | } |
398 | 463 | ], |
399 | | - "script_for": "36a581ae5136" |
| 464 | + "script_for": "299ae476b3db" |
400 | 465 | } |
401 | 466 | } |
0 commit comments