Exemplo n.º 1
0
def runTest(params):
	runDataFile = "gilliganTemplates.json"
	templateData = bs_common.getDataFile(runDataFile)	
	
	bs_common.writeConfigurationDataToLogFile()
	bs_common.writeResultsHeaderDataToLogFile()
	
	bs_icloud.loadiCloudURL("xxxxxxxx")
	bs_icloud.iCloudSignIn("xxxxxxxx")
	
	myIterationCount = templateData["iterationCount"]
	
	for x in range(myIterationCount):
		templateData = bs_common.getDataFile(runDataFile)
		currentIteration = templateData["iteration"] + 1
		
		if currentIteration > myIterationCount:
			msg = "all iterations have been completed"
			bs_common.writeToConsole(msg)
			bs_common.writeToLogFile(msg)
			break
			
		else:
			msg = "this is iteration "+ str(currentIteration) +" of "+ str(myIterationCount)
			bs_common.writeToConsole(msg)
			bs_common.writeToLogFile(msg)
			
		for item in templateData['order']:
			if templateData["appTemplates"][item]["completed"] == 0:
				bs_gilligan.createNewFromTemplate(12345678, item, runDataFile)
				
			else:
				msg = "'"+ item +"' - set as completed. skipping"
				bs_common.writeToConsole(msg)
				bs_common.writeToLogFile(msg)
				continue
						
			bs_common.setCurrentIteration(runDataFile, currentIteration)
			bs_common.resetItemStatus(runDataFile)
	
	bs_gilligan.deleteGilliganFiles("xxxxxxxx", "Keynote")	
	bs_gilligan.deleteGilliganFiles("xxxxxxxx", "Numbers")	
	bs_gilligan.deleteGilliganFiles("xxxxxxxx", "Pages")	
	bs_icloud.iCloudSignOut("xxxxxxxx")	
	bs_common.quitSafari()
	bs_common.cleanupConfiguration()
	bs_common.setCurrentIteration(runDataFile, 0)
Exemplo n.º 2
0
def runTest(params):
	bs_common.writeConfigurationDataToLogFile()
	bs_common.writeResultsHeaderDataToLogFile()
# 	bs_common.writeOSXSystemProfile()
	
	bs_icloud.loadiCloudURL("xxxxxxxx")
	bs_icloud.iCloudSignIn("xxxxxxxx")
	bs_gilligan.loadGilliganApp("10000001", "Pages")
	
	bs_gilligan.validateGearMenu("10000001", "Pages")

	bs_gilligan.createNewFile("10000002", "Pages", "Blank")
	bs_gilligan.fileClose("10000002", "Blank")
	bs_gilligan.checkFileSyncing("Pages")	

	bs_gilligan.fileRename("10000003", "Pages", "Blank", "Test_00.pages")
	bs_gilligan.checkFileSyncing("Pages")

	bs_gilligan.fileOpen("10000004", "Pages", "Test_00.pages")
	bs_gilligan.formatMenuShowHide("10000004", "Pages", "Test_00.pages")
	bs_gilligan.fileClose("10000004", "Test_00.pages")
	bs_gilligan.checkFileSyncing("Pages")
	
	bs_gilligan.createNewFile("10000005", "Pages", "Personal Photo Letter")
	bs_gilligan.fileClose("10000005", "Personal Photo Letter")
	bs_gilligan.checkFileSyncing("Pages")
	
	bs_gilligan.fileRename("10000006", "Pages", "Personal Photo Letter", "Test_02")
	bs_gilligan.checkFileSyncing("Pages")

	bs_gilligan.fileDuplicate("10000007", "Pages", "Test_02")
	bs_gilligan.checkFileSyncing("Pages")
	
	bs_gilligan.fileExport("10000008", "Pages", "Test_00.pages copy", "Pages")
	bs_common.fileDeleteFromExported("Test_00.pages", "pages")
	
	bs_gilligan.createNewFile("10000009", "Pages", "Project Proposal")
	bs_gilligan.fileClose("10000009", "Project Proposal")
	bs_gilligan.checkFileSyncing("Pages")
	
	bs_gilligan.fileExport("10000011", "Pages", "Project Proposal", "Word")
	bs_common.fileDeleteFromExported("Project Proposal", "doc")
	
	bs_gilligan.createNewFile("10000012", "Pages", "Poster")
	bs_gilligan.fileClose("10000012", "Poster")
	bs_gilligan.checkFileSyncing("Pages")
	
	bs_gilligan.fileDeleteGilligan("10000013", "Pages", "Project Proposal")

	bs_gilligan.gearMenu_fileUpload("10000014", "Pages", "Test_01.pages")
	bs_gilligan.fileDuplicate("10000014", "Pages", "Test_01")
	bs_gilligan.fileRename("10000014", "Pages", "Test_01", "Test Uploaded")
	
	bs_gilligan.fileOpen("10000014", "Pages", "Test Uploaded")
	bs_gilligan.fileClose("10000014", "Test Uploaded")	
	bs_gilligan.checkFileSyncing("Pages")
	
	bs_gilligan.contextMenu_fileDuplicate("10000015", "Pages", "Test Uploaded")	
	bs_gilligan.checkFileSyncing("Pages")
	
	bs_gilligan.contextMenu_fileExport("10000016", "Pages", "Test Uploaded copy", "Pages")
	
	bs_gilligan.fileRename("10000017", "Pages", "Test_01 copy", "Test_03")
	bs_gilligan.checkFileSyncing("Pages")
	
	bs_gilligan.fileOpen("10000018", "Pages", "Test_03")
	bs_gilligan.fileFindReplace("10000018", "Pages", "Test_03", "null", "Float")
	
	
	
	
	
# 	bs_gilligan.exitGilligan("xxxxxxxx", "Pages")
# 	bs_gilligan.deleteGilliganFiles("xxxxxxxx", "Pages")
# 	bs_gilligan.exitGilligan("xxxxxxxx", "Pages")
# 	bs_icloud.iCloudSignOut("xxxxxxxx")
	bs_common.cleanupConfiguration()