Changeset 39069 for gs3-extensions/testing/trunk/src/src/gstests
- Timestamp:
- 2024-05-31T20:50:18+12:00 (4 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/testing/trunk/src/src/gstests/tutorials/RunGLITest.java
r39054 r39069 51 51 import org.assertj.swing.junit.testcase.AssertJSwingJUnitTestCase; 52 52 import org.assertj.swing.fixture.*; 53 import org.assertj.swing.core.*; // Robot 53 import org.assertj.swing.core.*; // Robot, Settings 54 54 import org.assertj.swing.data.Index; 55 55 import org.assertj.swing.timing.Timeout; … … 146 146 //window = findFrame("GUIManager").using(robot()); 147 147 window = GSGUITestingUtil.getGLIApplicationWindow(robot()); 148 149 Settings robotSettings = robot().settings(); 150 System.err.println("@@@ visibility timeout: " + robotSettings.timeoutToBeVisible()); 151 robotSettings.dragDelay(250); 152 robotSettings.dropDelay(250); 153 //robotSettings.idleTimeOut(250); 148 154 } 149 155 … … 211 217 @Test 212 218 public void tutorial_tests() { 213 /*219 214 220 // Preliminaries 215 221 // waiting a few seconds for window, so we can see GLI running 216 222 PAUSE(2); 217 218 System.err.println("@@@ First test: GLI Running"); 219 220 // steal any collection lock that may or may not presents itself within param seconds 223 224 // steal any collection lock that may or may not present itself within param seconds 221 225 stealAnyCollectionLock(1); 226 //PAUSE(3); 227 222 228 switchToPane(GATHER_PANE); 223 */ 229 //PAUSE(3); // Need some time before we start making selections in the workspace tree 230 changeUserMode("librarian"); 231 switchToPane(GATHER_PANE); 232 224 233 // dummy tests 225 234 //testGLIRunning(); 226 235 227 // First t utorial228 //simpleHTML();236 // First two tutorials 237 simpleHTML(); 229 238 230 239 backdrop(); 231 240 241 exitGLI(); // needed, to save user choices regarding warning popups 232 242 } 233 243 … … 247 257 // to ensure sequential ordering of tests 248 258 public void simpleHTML() { 249 System.err.println("@@@ Tutorial 1: simple HTML"); 259 System.err.println("@@@ Tutorial 1: simple HTML"); 260 /* 250 261 stealAnyCollectionLock(1); 251 262 switchToPane(GATHER_PANE); … … 253 264 //openWorkspacePath(WKS_TOP_FOLDER_LOCAL, props.get("samplefiles.treepath").toString()); 254 265 255 /*266 256 267 loadCollection("lucene-jdbm-demo"); 257 268 // wait a couple of seconds for loading to be done … … 261 272 openWorkspacePath(WKS_TOP_FOLDER_LOCAL, props.get("samplefiles.treepath").toString()); 262 273 */ 263 264 274 265 275 … … 270 280 271 281 //loadCollection("smallhtm"); // TODO 272 PAUSE( 3);282 PAUSE(2); 273 283 274 284 … … 279 289 280 290 openCollectionPath("html_files", DOUBLE_CLICK); 281 PAUSE(2);291 //PAUSE(2); 282 292 283 293 //changeUserMode("librarian"); … … 285 295 286 296 switchToPane(CREATE_PANE); 287 PAUSE(2);297 //PAUSE(2); 288 298 //buildCollection(); 289 299 //previewCollectionWhenReady(MAX_BUILD_TIMEOUT); … … 293 303 closePopup(Dictionary.get("CollectionBuilt.Title"), Dictionary.get("General.OK"), TICK_CHECKBOX); 294 304 previewCollection(); 295 296 //window = getGLIApplicationWindow(robot()); 305 PAUSE(1.5); 306 makeGLIWindowActive(); 307 PAUSE(1); 297 308 298 309 switchToPane(ENRICH_PANE); … … 302 313 String path = openWorkspacePath(WKS_TOP_FOLDER_LOCAL, props.get("samplefiles.treepath").toString(), RIGHT_CLICK); 303 314 //workspaceRightClickOption(dragNodePath, ); 304 PAUSE( 2);315 PAUSE(1); 305 316 selectContextMenu(Dictionary.get("MappingPrompt.Map")); // Create Shortcut 306 317 closePopup(Dictionary.get("MappingPrompt.Title"), Dictionary.get("General.OK")); // accept shortcut name 307 318 308 319 collapseWorkspacePath(WKS_TOP_FOLDER_LOCAL); 309 PAUSE( 4);320 PAUSE(3); 310 321 311 322 } … … 313 324 314 325 public void backdrop() { 315 System.err.println("@@@ Tutorial 1: simple HTML"); 316 stealAnyCollectionLock(1); 317 PAUSE(3); 318 319 switchToPane(GATHER_PANE); 320 PAUSE(3); // Need some time before we start making selections in the workspace tree 321 changeUserMode("librarian"); 326 System.err.println("@@@ Tutorial 2: backdrop"); 322 327 323 328 String image_e_coll = props.get("samplefiles.path")+File.separator+"images"+File.separator+"image-e"; … … 334 339 335 340 //loadCollection("backdrop"); 336 PAUSE(3);341 //PAUSE(3); 337 342 338 343 // Multiple selection drag and drop works iff Shift-Selecting a contiguous set of files. … … 364 369 switchToPane(CREATE_PANE); 365 370 366 PAUSE(3);371 //PAUSE(3); 367 372 //buildCollectionTillReady(MAX_BUILD_TIMEOUT); 368 373 //previewCollection(); 369 374 buildAndPreviewCollection(MAX_BUILD_TIMEOUT); 370 PAUSE( 5);375 PAUSE(2); 371 376 // try to make the GLI main window the active one again, instead of the browser 372 377 // https://stackoverflow.com/questions/4005491/how-to-activate-window-in-java 373 378 374 379 makeGLIWindowActive(); 375 PAUSE( 3);380 PAUSE(1); 376 381 377 382 switchToPane(ENRICH_PANE); 378 PAUSE(2);383 //PAUSE(2); 379 384 //openCollectionPath("Bear.jpg", CLICK); 380 385 changeToMetadataSet("Dublin Core Metadata Element Set"); … … 389 394 PAUSE(1); 390 395 switchToPane(CREATE_PANE); 391 PAUSE(1);396 //PAUSE(1); 392 397 //buildCollectionTillReady(MAX_BUILD_TIMEOUT); 393 398 //previewCollection(); 394 399 buildAndPreviewCollection(MAX_BUILD_TIMEOUT); 395 PAUSE( 2);400 PAUSE(1.5); 396 401 makeGLIWindowActive(); 397 PAUSE( 3);402 PAUSE(1); 398 403 399 404 switchToPane(FORMAT_PANE); … … 427 432 PAUSE(1); 428 433 previewCollectionViaFormat(); 429 PAUSE( 2);434 PAUSE(1.5); 430 435 makeGLIWindowActive(); 431 PAUSE( 3);436 PAUSE(1); 432 437 433 438 434 439 switchToPane(DESIGN_PANE); 435 PAUSE(3);440 //PAUSE(3); 436 441 selectPlugin("ImagePlugin", CLICK); 437 442 PAUSE(1); … … 439 444 configOptions.add(new SimpleEntry("thumbnailsize", "50")); 440 445 configureSelectedPluginOrClassifier(configOptions); 441 PAUSE( 3);446 PAUSE(1); 442 447 443 448 switchToPane(CREATE_PANE); 444 PAUSE(2);449 //PAUSE(2); 445 450 buildAndPreviewCollection(MAX_BUILD_TIMEOUT); 446 PAUSE( 3);451 PAUSE(1.5); 447 452 makeGLIWindowActive(); 448 453 449 454 450 455 switchToPane(DESIGN_PANE); 451 PAUSE(3);456 //PAUSE(3); 452 457 selectPlugin("ImagePlugin", DOUBLE_CLICK); 453 458 PAUSE(1); … … 467 472 468 473 switchToPane(CREATE_PANE); 469 PAUSE(2);474 //PAUSE(2); 470 475 buildAndPreviewCollection(MAX_BUILD_TIMEOUT); 471 476 PAUSE(3); 472 makeGLIWindowActive(); 473 477 makeGLIWindowActive(); 474 478 475 479 switchToPane(DESIGN_PANE); 476 PAUSE(3);480 //PAUSE(3); 477 481 addSearchIndex("dc.Description"); 478 482 … … 486 490 487 491 switchToPane(CREATE_PANE); 488 PAUSE(2);492 //PAUSE(2); 489 493 buildAndPreviewCollection(MAX_BUILD_TIMEOUT); 490 494 PAUSE(3); … … 492 496 493 497 switchToPane(FORMAT_PANE); 494 PAUSE(3);498 //PAUSE(3); 495 499 Collection searchDisplayItems = new ArrayList(1); 496 500 searchDisplayItems.add(new SimpleEntry("Index: dc.Description", "image descriptions")); … … 499 503 PAUSE(1); 500 504 previewCollectionViaFormat(); 501 PAUSE( 3);505 PAUSE(1.5); 502 506 makeGLIWindowActive(); 503 504 exitGLI(); // needed, to save warning popup changes 505 507 PAUSE(1); 506 508 } 507 509
Note:
See TracChangeset
for help on using the changeset viewer.