Compare commits

...

566 Commits

Author SHA1 Message Date
Sébastien Gandon
0b9fa8b705 Merge release/5.1.2/tis_shared and release/5.1.2/tos for release/5.1.2. 2014-06-22 14:16:00 +02:00
ilazebny
d9b2fbf15f Update version in poms to 5.1.2
git-svn-id: http://talendforge.org/svn/tis_shared/branches/branch-5_1@90039 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-03 11:46:14 +00:00
ilazebny
b6cd48c736 Update version in poms to 5.1.2-SNAPSHOT
git-svn-id: http://talendforge.org/svn/tis_shared/branches/branch-5_1@90031 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-03 11:14:21 +00:00
fgzhang
e8628f5fa4 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84297 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-30 09:38:18 +00:00
hjbai2
0be7dafa6f selenium:update the test case about the agency create and the productor create test case
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84281 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-30 07:47:48 +00:00
fzhong
3506f31750 SWTBot modification:
1. pop up error dialog 'find errors in jobs'
2. modified wizard title for rename job
3. create xml fail
4. remove TalendMDM item type for TOSDI
5. did not delete job in after class for export job test
6. did not delete context in after class for ExportAsContextForXmlTest
7. did not delete salesforce in after class for UseSalesforceTest
8. improve assert method for test ChangeAllItemsToAFixedVersionTest

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84258 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-29 10:43:04 +00:00
zcui
570b6ee1e3 Selenium:update for run test on ie users
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84245 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-29 08:47:34 +00:00
zcui
0761d0b042 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84231 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-05-29 04:02:57 +00:00
zcui
316890b0b1 selenium:update user for add user on IE and select user roles
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84230 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-29 04:02:15 +00:00
fzhong
f294a02896 SWTBot modification:
1. could not find shell 'Error Executing SQL' when execute sql fail.
2. too short  wait time for closing DB creation wizard.
3. could not close shell 'Modification' when retrieving schema for salesforce.
4. could not new an instance of TalendSchemaItem without itemType.
5. improve function for after class
6. improve assertion for data view on DB SCD
7. need wait for new version of item when it changed
8. could not get schema for SpecialColumnNameTest

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84226 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-29 02:39:24 +00:00
fgzhang
0131200b1b QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84205 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-28 09:51:35 +00:00
hjbai2
1dadde6bc4 selenium:update the record.java
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84193 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-28 07:05:27 +00:00
nrousseau
7390a8d8b1 Modification: update some test cases
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84174 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-26 10:00:08 +00:00
hjbai2
a04b6bdf22 selenium:update the store test case
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84153 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-25 08:43:44 +00:00
hjbai2
b6e6d5c76c selenium:update the test case delete record to the recycle
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84139 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-25 06:44:31 +00:00
fgzhang
06bcff4914 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84107 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-24 10:08:49 +00:00
fgzhang
e9a8d40a45 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84100 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-24 08:08:16 +00:00
fgzhang
80f486e056 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84097 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-24 07:51:01 +00:00
fgzhang
980122145c QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84072 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-24 01:20:21 +00:00
fgzhang
09ad3fa7a6 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@84054 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-05-23 10:38:47 +00:00
fgzhang
afa3ccbf27 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83991 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-22 06:57:19 +00:00
fgzhang
bd0a7ec477 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83989 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-22 06:21:33 +00:00
fgzhang
830e60a9d5 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83987 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-22 04:32:18 +00:00
fgzhang
564104ccf6 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83918 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-21 06:12:38 +00:00
fgzhang
1a9b2690e1 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83916 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-21 05:35:42 +00:00
fgzhang
8ae7e5d946 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83914 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-21 04:34:29 +00:00
fgzhang
e1c6479b82 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83913 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-21 04:19:57 +00:00
zcui
8bfd8ddd7f selenium:update product openWorkflowTask
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83807 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-18 03:33:29 +00:00
zpbai
71b0129aad Selenium TAC: set firefox path
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83795 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-17 14:03:14 +00:00
zcui
316e2ae5b6 selenium:update product testDuplicateRecordImpl
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83765 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-17 08:25:22 +00:00
zcui
1232768f58 selenium:update store testDuplicateRecordImpl
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83762 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-17 08:23:01 +00:00
zcui
f138815bb1 selenium:update agent createRecordImpl
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83758 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-17 08:11:36 +00:00
dfcao
bbb5b5b85b SWTBot:modify test UseReferenceCheckRulesTest for cann't drag db schema to job
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83755 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-17 08:05:04 +00:00
dfcao
e7b607d299 SWTBot:modified test DataViewerOnMysqlWithContext and FilterDBDataByConditionTest and FilterDBDataByConditionTest for cann't drag schema to job
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83646 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-16 07:44:11 +00:00
zpbai
4ed4024d0a Selenium MDM: fixed the problem without firefox path
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83625 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-16 06:06:10 +00:00
fgzhang
cdd33b66df QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83620 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-16 04:55:17 +00:00
fgzhang
c8d4ebdd22 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83615 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-16 03:27:51 +00:00
dfcao
2a64fcb588 SWTBot:Add test DocumentationForJobTest
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83610 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-16 01:52:59 +00:00
fgzhang
f696768e8e QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83607 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-16 01:23:34 +00:00
fzhong
112dc99390 SWTBot QAI-9991 modification: modified tests about project management for could not get status of item and modified tests for clean up repository after import more items.
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83600 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-15 15:25:42 +00:00
zpbai
0fe4e9f275 Selenium MDM: fix the issue for IE
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83574 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-15 09:49:56 +00:00
zcui
e19f26aa58 selenium:reopen tests suits
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83564 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-15 09:06:42 +00:00
fgzhang
5c522b4c45 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83563 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-15 09:05:51 +00:00
zpbai
f3a9fd4bae Selenium MDM: add the feature to support IE
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83562 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-15 09:01:44 +00:00
fzhong
060f14dae2 SWTBot QAI-9991 modification: solve pb for could not drag&drop some metadatas to job
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83556 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-15 08:40:06 +00:00
dfcao
bc6ff59b2d SWTBot:modified test UpdataTheStatusOfEachItemTest for the didn't remove sap_connection
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83552 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-15 08:13:19 +00:00
zcui
005eb96efd selenium:remove some tests for mainly test dsc
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83551 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-15 08:05:48 +00:00
zcui
01927a93e7 selenium:update method createRecordImpl
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83546 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-15 07:46:57 +00:00
zcui
fd2285dda3 selenium:update updateRecordImpl
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83528 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-15 05:14:41 +00:00
zcui
d68bc49536 selenium:update method clickOKOnTaskSchemaCreatPanel
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83527 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-15 04:59:36 +00:00
zcui
9e76b341e7 selenium:update method duplicate record
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83526 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-15 04:56:44 +00:00
fgzhang
dfb357e610 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83521 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-15 04:15:24 +00:00
dfcao
b4ccaa797f SWTBot:Modified test CopyMutiVersion and OpenOldVersion for cann't find the new version
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83500 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-15 02:41:44 +00:00
fgzhang
abc4eecf5b QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83455 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-14 09:04:42 +00:00
zpbai
3beb2362fc Selenium TAC: Update for using default firefox path
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83429 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-14 07:34:40 +00:00
zpbai
d29ba2fa33 Selenium MDM: using default firefox path
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83428 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-14 07:19:20 +00:00
fgzhang
f5f650cd8c QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83427 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-14 07:14:50 +00:00
fgzhang
187cba3900 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83426 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-14 07:12:07 +00:00
zpbai
effb90727f Selenium MDM: update for using default firefox path
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83422 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-14 07:03:24 +00:00
nrousseau
1a001edd26 Modification: Add an empty swtbot test case to run junits
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83415 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-14 05:51:36 +00:00
zpbai
a558b32643 Selenium TAC: set firefox path configurable
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83409 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-14 04:34:25 +00:00
fgzhang
4532e58015 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83395 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-14 03:12:46 +00:00
zpbai
adcd14c5d3 Selenium MDM: make firefox path configurable
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83385 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-12 05:52:02 +00:00
yhbai
b689271b17 swtbot_tdq:modified the order of some cases and added some new cases
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83284 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-11 03:05:38 +00:00
fgzhang
5a3c8fa499 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83282 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-11 02:35:28 +00:00
fgzhang
8500868013 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83281 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-11 02:31:37 +00:00
zpbai
b0a1fbcc33 Selenium TAC: disable warning for scripts
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83260 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-10 12:18:41 +00:00
fzhong
89e5bd0354 SWTBot QAI-758 modification: solve pb for could not get schema after retrieve schema of DB and solve pb for schema name with quotes in job
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83252 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-10 10:34:28 +00:00
zcui
5339ca15a9 selenium:expend test suits dsc
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83230 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-10 08:38:47 +00:00
zcui
e8e6fdcb36 selenium:update method of typeStringUseRobot
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83228 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-10 08:28:58 +00:00
zcui
536a34d271 selenium:add delay time
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83226 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-10 08:05:38 +00:00
fyan2
2a8f96f34a refactored test case
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83211 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-10 06:36:31 +00:00
fyan2
e0e0a33f96 QAI-9648
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83209 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-10 06:34:06 +00:00
fyan2
ea415822bb refactor test case
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83207 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-10 06:31:57 +00:00
zcui
f099bfeb41 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83197 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-05-10 05:21:42 +00:00
zcui
5fbe07c083 selenium:remove some test suits for mainly test agentrecord
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83196 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-10 04:34:48 +00:00
zcui
b834eef85d git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83195 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-05-10 04:33:28 +00:00
zcui
e1ad8acd64 selenium:update for method chooseRecord
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83178 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-10 01:47:49 +00:00
zcui
ada9c561c5 selenium:update for choose a record
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83177 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-10 01:38:00 +00:00
fgzhang
8931614770 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83176 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-10 01:37:34 +00:00
zpbai
f1377f9b54 SWTBot DI: update the method for cleaning the created items
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83162 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-09 11:24:09 +00:00
fzhong
4af2fca18e bug QAI-758 fixed: SWTBot make tests successful for TOSBD, TOSDI build
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83158 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-09 10:28:53 +00:00
fyan2
bfe7619c29 QAI-9651
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83153 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-09 10:18:39 +00:00
zcui
a5cbfac627 selenium:expend tests suits
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83136 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-09 08:39:09 +00:00
zcui
3154909a30 selenium:add delay time
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83131 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-09 08:17:16 +00:00
zcui
1da66bc6b1 selenium:expend tests suits
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83111 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-09 05:59:55 +00:00
zcui
8af00c24d0 selenium:add some time delay before click create button
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83110 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-09 05:39:38 +00:00
zcui
b4ba1525cc selenium:remove some tests suits
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83109 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-09 05:21:12 +00:00
zcui
661b8afd41 selenium:add delay after click create record button
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83108 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-09 05:20:35 +00:00
zcui
bc2e98f9bb selenium:update create record method
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83107 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-09 04:53:41 +00:00
zcui
7afaf3b6c8 selenium:remove some test suits
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83094 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-09 02:40:58 +00:00
fgzhang
fea336cd84 QAI-9156
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83087 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-09 01:41:55 +00:00
fyan2
e43a7ca7c3 QAI-9218 QAI-9385
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83086 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-09 01:41:01 +00:00
zcui
ded5a8a62e slenium:update method duplicate agency
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83085 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-09 01:39:16 +00:00
zpbai
685c0a8179 Selenium ESB: remove some useless code
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83084 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-09 01:34:09 +00:00
yhbai
63db8efd51 swtbot tdq-modified the case RSurvivorShipComponent
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83076 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-08 10:34:12 +00:00
fyan2
efacf269bf QAI-9385 QAI-9218
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83074 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-08 10:29:02 +00:00
zcui
4bb7da5b72 selenium:update method duplicate agency
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83068 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-08 10:01:32 +00:00
zcui
87f24c0b07 selenium:update method enterJournal
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83062 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-08 09:34:38 +00:00
zcui
498e97e728 selenium:update method createRecordImpl
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83061 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-08 09:19:56 +00:00
zpbai
b7bab50039 Selenium MDM: Using the method of window.maxisize in the latest API
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83058 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-08 08:50:30 +00:00
zpbai
387fe02ee4 Selenium MDM: fixed the problem for drag and drop item out of the window
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83049 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-08 06:15:58 +00:00
zcui
264488cbd8 selenium:open tests
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83045 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-08 05:31:19 +00:00
zcui
daaedc606d selenium:add delay for some tests
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83044 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-08 05:29:49 +00:00
zcui
bf029085b0 selenium:QAI-5134
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83043 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-08 05:28:30 +00:00
zcui
ab03bc73d8 selenium:QAI-5532
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83042 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-08 05:26:31 +00:00
fgzhang
b3163e0506 QAI-9166
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83041 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-08 05:23:35 +00:00
hjbai2
d8de4eceeb selenium:add test case delete to the recycle and restore from the recycle
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83010 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-08 02:14:08 +00:00
zpbai
52027982b3 Selenium MDM: Add the method to get size of firefox's window
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83003 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-08 01:40:41 +00:00
zcui
6baf223d4b selenium:add delay time for changeprice workflow
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83002 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-08 01:37:56 +00:00
zcui
1c84f33cf9 selenium:update changecommissioncode for delay time
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@83001 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-08 01:34:14 +00:00
ilazebny
2604c8879d Update jobserver version to 5.1.1 in poms
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82985 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-07 11:39:32 +00:00
fzhong
68aa2ec472 SWTBot: modified tests for TOSBD did not include version management
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82974 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-07 10:26:03 +00:00
fyan2
1efa44b4c7 refactor methods about get url
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82971 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-07 10:13:34 +00:00
yhbai
083801aeed modified these cases about some gui's change
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82970 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-07 10:11:24 +00:00
fyan2
e70e1da078 modified some cases
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82968 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-07 10:08:16 +00:00
zpbai
8506dd936e SWTBot: add more time for empty recycle bin
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82953 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-07 09:16:08 +00:00
fgzhang
83d901889f QAI-9097
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82946 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-07 08:58:00 +00:00
zcui
c222ffc878 selenium:update method maxDataBrowserBoard
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82924 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-07 08:02:14 +00:00
zpbai
a8d7bfb602 SWTBot: A template way to fix the problem of empty recycle bin
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82903 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-07 06:56:13 +00:00
zcui
1d99e9aa8e selenium:update method maxArecordpanel
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82890 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-07 06:14:47 +00:00
zcui
c3fafd585b Selenium MDM: remove useless import
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82860 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-07 04:09:43 +00:00
zcui
ef86bfbda6 Selenium MDM: fixed the issue that couldn't drag and drop clumn
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82847 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-07 03:46:58 +00:00
zpbai
ca81f51682 Selenium MDM: Using the default setting for native events
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82788 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-06 01:33:14 +00:00
zcui
c4ce1182e4 selenium:QAI-7858
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82782 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-04 09:31:12 +00:00
fzhong
b619a17738 SWTBot: solve pb for Import/Export items fail on TOSDI and TOSBD build
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82771 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-04 06:44:09 +00:00
dfcao
accfe0ace7 SWTBot:modify test TalendDBItem for AddCDC when tables had exists
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82759 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-03 07:41:09 +00:00
fzhong
84882aedb0 SWTBot: modified pb for could not find active shell 'Problem Executing Operation' when creating item
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82750 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-03 05:22:04 +00:00
zpbai
c43efe2e8b SWTBot: Add the renamed folder to deleting list
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82749 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-03 04:41:59 +00:00
zpbai
06c2dad6fa SWTBot: Fixed the problem that when cleaning up created items will pop up a windows which says item couldn't be found
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82748 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-03 04:40:11 +00:00
zpbai
d0f646ea95 Selenium MDM: Enable Native Events of firefox profile
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82741 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-03 01:47:11 +00:00
fzhong
9d24e770ae SWTBot:
modified test about change database for difirent confirm modifiy dialog for TOS build and TIS build
modified method for change perspective

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82734 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-05-02 10:22:04 +00:00
zpbai
f82a47658b Selenium MDM: Fix the problem of 'Warning Unresponsive script'
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82711 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-28 09:34:54 +00:00
zcui
1667e9f9fd selenium:update for workflow tests
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82710 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-28 08:35:14 +00:00
dfcao
e7872ad833 SWTBot:modify test UseCopybook for cann't find the row name
transform test UseLdapTest from tisstudio/metadata to tosstudio/metadata
       

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82706 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-28 07:12:35 +00:00
zcui
03e7c33868 selenium:update method changeCommissionCode
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82699 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-28 05:09:14 +00:00
fzhong
022f19351c SWTBot: modified pb for creating xml file metadata fail and modified tests about sql template fit for TOS BD
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82698 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-28 04:37:54 +00:00
zcui
5f0a329f2f selenium:update User.deleteUser
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82695 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-28 03:18:37 +00:00
zcui
47cdb653e8 selenium:update confiugre file
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82692 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-28 01:00:52 +00:00
zpbai
31242ad06b Selelnium MDM: Disable for script warning
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82688 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-27 11:04:49 +00:00
hjbai2
6c72cd7e77 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82680 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-04-27 09:15:49 +00:00
zcui
dc4f29dd35 selenium:
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82670 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-27 07:33:36 +00:00
zcui
b7015bffe6 selenium:update method to max record panel max
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82669 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-27 07:32:46 +00:00
dfcao
a7420d44a5 SWTBot:modify tests Utilities for shell is not close automatic
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82667 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-27 07:08:26 +00:00
dfcao
be66c6961e SWTBot:modify test GenerateAllDocTest for cann't find the node of Joblets and Job under the tree of Documentation
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82664 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-27 06:49:17 +00:00
hjbai2
2f65dab03f selenium:change the drop method
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82662 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-27 06:39:14 +00:00
zcui
9f3defe82d SELENIUM:update mdm license
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82657 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-27 04:37:51 +00:00
zcui
ea01349cb6 selenium:QAI-9230
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82656 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-27 04:31:02 +00:00
zcui
ad07b823c7 selenium:add case for d* demo change commission code workflow QAI-9230
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82652 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-27 01:55:16 +00:00
fgzhang
10b68996de QAI-9097
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82596 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-26 06:23:08 +00:00
yhbai
bf840eb313 swtbot:modified some case about org.talend.swtbot.test.commons add some cases about etljob and analysis
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82577 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-26 01:59:56 +00:00
zpbai
4c0978c2f4 Selenium MDM: set the timeout for Warning of Unresponsive script
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82568 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-25 13:03:54 +00:00
zpbai
a6c312acd2 Selenium MDM: open all MDM auto tests
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82559 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-25 12:09:13 +00:00
dfcao
20ae49845d SWTBot:modify test DataViewerOnOutputPositionalTest for cann't find the file path
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82542 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-25 10:36:39 +00:00
fyan2
ccacddbe99 QAI-9236
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82536 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-25 10:21:28 +00:00
fyan2
7652c35654 QAI-9175 QAI-9228 QAI-9236
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82535 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-25 10:20:46 +00:00
fgzhang
0c6212a7f7 QAI-9097
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82528 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-25 09:59:47 +00:00
hjbai2
768276e2e7 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82523 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-04-25 09:30:56 +00:00
hjbai2
725b135f9f git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82522 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-04-25 09:29:55 +00:00
zcui
d873fb9da8 selenium:update WorkFlowTask.sortTasksBydate
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82516 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-25 09:02:48 +00:00
fgzhang
fe65638909 QAI-9097
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82515 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-25 08:46:06 +00:00
fgzhang
1e178f1591 QAI-9097
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82511 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-25 08:09:40 +00:00
zcui
01c5a90eef selenium:add case for D* demo change commission code and approved QAI-9229
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82508 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-25 07:38:38 +00:00
hjbai2
2c68d2e2fa selenium:add some test case QAI-9225
QAI-9226 


git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82493 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-25 06:39:27 +00:00
zpbai
b8dfd66a47 Selenium MDM: change port to 8180
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82490 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-25 06:30:58 +00:00
zcui
29869ed457 selenium:QAI-9229
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82479 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-25 04:35:19 +00:00
fgzhang
895782ace7 QAI-9097
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82471 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-25 03:56:29 +00:00
zcui
64dc068278 selenium:QAI-9214
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82451 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-25 01:17:39 +00:00
nrousseau
bae12c4e14 move big data related plugins
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82449 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-24 17:36:39 +00:00
fzhong
68577c581c SWTBot: QAI-9197: improve tests about project management and add import method to Utilities
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82413 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-24 10:18:39 +00:00
fzhong
6dde673391 SWTBot: QAI-9199: solve pb for could not find finish button when creating xml file metadata and ldif file metadata
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82412 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-24 10:15:14 +00:00
fyan2
0481693f7c QAI-9176
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82408 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-24 10:10:19 +00:00
fgzhang
4aad0fea7a QAI-9097
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82406 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-24 10:05:35 +00:00
hjbai2
774961c154 selenium:add some test cases for QAI-9223 QAI-9227
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82405 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-24 09:59:42 +00:00
zcui
edeb799fd8 selenium:QAI-9214
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82394 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-24 09:20:39 +00:00
zcui
b5dab630db selenium:modify clickElementByXpath
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82391 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-24 08:49:16 +00:00
zcui
69cca097ee selenium:QAI-9214
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82378 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-24 07:56:13 +00:00
dfcao
755ee60d48 SWTBot:modify tests DataViewerOnAS400 for cann't retrieve shema --QAI-9163
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82360 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-24 04:59:46 +00:00
zcui
38d4f6e80f selenium:update method clickElementByXpath()
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82355 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-24 03:35:22 +00:00
hjbai2
b1cf79956c selenium:QAI-9222
QAI-9221

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82351 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-24 03:28:40 +00:00
zcui
026732ad77 selenium:QAI-9214
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82349 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-24 03:20:31 +00:00
zcui
5d17aa48af selenium:remove some case in order to test product_demo
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82340 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-24 01:35:53 +00:00
fyan2
9929a852cc QAI-9174
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82313 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 09:47:18 +00:00
fyan2
f9af9dd9d0 QAI-9173
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82309 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 09:45:46 +00:00
fgzhang
fbbfc2d8f3 QAI-9097
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82302 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 09:28:34 +00:00
zcui
805979ef35 selenium:update Login ,set timeout
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82297 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 09:24:45 +00:00
fgzhang
cdf6dc248a QAI-9097
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82284 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 08:44:36 +00:00
fgzhang
634e572d62 QAI-9097
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82269 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 07:53:27 +00:00
zcui
91a13c3234 selenium:add tests for dsc
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82267 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 07:48:23 +00:00
zcui
8aee0c68cd selenium:update method storeShowOnMapProcessImpl
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82266 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 07:45:26 +00:00
hjbai2
da2354abe1 selenium:add create/update test case in agency
QAI-9219 
QAI-9220 
 

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82260 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 07:31:55 +00:00
dfcao
530cc5ebf4 SWTBot:modify tests which are under "filter" folder for cann't find "activate filter" QAI-9178
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82253 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 07:01:02 +00:00
fgzhang
e994b4d24c QAI-9097
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82248 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 06:22:50 +00:00
fzhong
a33fd83e35 SWTBot: QAI-9199, modified pb for creating file metadata fail.
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82238 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 05:58:11 +00:00
zcui
98f261db1b selenium:QAI-9212
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82236 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 05:56:18 +00:00
zcui
076fd9f0a3 selenium:update xpath
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82235 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 05:46:32 +00:00
nrousseau
473b9988ec Modification: avoid an error in the log for tos big data
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82233 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 05:17:31 +00:00
zcui
3740418181 selenium:add case to test two ways to open work flow tasks QAI-9212
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82226 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 03:48:49 +00:00
zcui
aebcd3f1f9 selenium:QAI-9211
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82215 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-23 01:40:20 +00:00
zpbai
96fbf87fa0 SWTBot TDQ: Remove useless import.
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82187 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-20 11:53:53 +00:00
fyan2
d53894ebee QAI-9173
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82171 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-20 10:14:19 +00:00
fyan2
0b70f8965d QAI-9172
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82168 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-20 10:13:11 +00:00
fgzhang
7810e83b53 QAI-9097
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82165 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-20 10:10:41 +00:00
zpbai
44285b606f Selenium MDM: Comment Video recorder
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82155 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-20 09:34:09 +00:00
hcyi
79b1dd29da bug TDI-20726 fixed : Send different product names to registration webservice .
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82145 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-20 09:04:53 +00:00
zcui
3d449e99e9 selenium:update QAI-9211
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82135 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-20 07:50:45 +00:00
hjbai2
d7b06b65d6 selenium:update the record.java
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82126 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-20 06:47:30 +00:00
hjbai2
ae61c67a50 selenium:update the old test case about the product
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82119 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-20 06:14:44 +00:00
zcui
7f9e0c0b5b selenium:add case to test show foreign key info QAI-9211
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82111 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-20 05:26:20 +00:00
hjbai2
59ed4fab92 selenium:update the recordIMPLstore
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82103 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-20 03:17:42 +00:00
fgzhang
8e31bc7242 QAI-9097
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82100 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-20 02:29:05 +00:00
zpbai
b3814fdd13 Selenium MDM: Try to fix the problem that couldn't stop ScreenRecorder on Linux when met met
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82098 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-19 15:32:52 +00:00
zpbai
300ac25976 Selenium MDM: fixed the problem
When couldn't start video record that lots of tests will be skipped.

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82087 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-19 10:43:42 +00:00
fyan2
d97e9a031c QAI-9110
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82078 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-19 10:20:53 +00:00
fyan2
c7c99db53d QAI-9117
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82077 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-19 10:19:57 +00:00
hjbai2
c435e81f3f selenium:update the test case store
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82050 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-19 08:26:42 +00:00
fgzhang
04328fab5d QAI-9097
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82040 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-19 07:47:23 +00:00
hjbai2
24e0656cc5 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82029 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-04-19 07:11:16 +00:00
hjbai2
1018e263aa selenium:add some verify
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@82018 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-19 06:21:04 +00:00
fgzhang
58fc4c0ebc QAI-9097
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81990 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-19 02:59:27 +00:00
zpbai
3a90604fb0 Selenium: comment the feature of recording video
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81970 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-18 17:07:35 +00:00
zpbai
395317615e Selenium: need parameter of testlink.id
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81968 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-18 15:49:18 +00:00
zpbai
7fe7282f00 Selenium: MDM
- Add the feature of generating the test results for importing the results into testlink
- Add the feature of recording video for each test case

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81959 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-18 12:51:09 +00:00
hjbai2
0ad3552ca6 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81932 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-04-18 09:54:06 +00:00
hjbai2
da4c0bcdce selenium:update the case
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81920 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-18 09:10:02 +00:00
hjbai2
849dd9aa93 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81915 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-04-18 08:54:57 +00:00
fzhong
c1a2c97983 SWTBot: QAI-758 modification: modified test TAggregateRowTest for changed widget and UpdateTableNameTest for get schema fail
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81890 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-18 06:12:49 +00:00
hjbai2
3218857d42 selenium:update the record.java
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81886 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-18 06:04:24 +00:00
fzhong
cb32d16980 SWTBot: QAI-758 modification: improve function for waiting refresh preview when creating file metadata
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81885 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-18 05:50:27 +00:00
hwang
7f68edd187 TDI-20656: Guess Schema doesn't work...
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81877 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-18 03:59:13 +00:00
hjbai2
28d1eed5d2 selenium:update test case
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81875 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-18 03:35:49 +00:00
hjbai2
e781f1524d selenium:update the test case
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81867 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-18 03:11:55 +00:00
fyan2
e663e0102d QAI-7785
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81839 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-17 10:23:10 +00:00
zcui
bd540a9899 selenium:update launch_test.xml for server's port
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81804 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-17 07:27:27 +00:00
zcui
8d48021a75 selenium:add case for QAI-7465
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81757 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-17 03:03:54 +00:00
zcui
232530be68 selenium:add method clickCreateRecord()
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81751 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-17 02:34:46 +00:00
zcui
e4fbe3bac8 SELENIUM:UPDATE config file user.xml
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81746 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-17 02:19:40 +00:00
zcui
73838caa2e SELENIUM:add case for QAI-7910
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81745 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-17 02:18:08 +00:00
nrousseau
2df253f73d fix TDI-20653 TDI-20652 : update names and set module view by default
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81744 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-17 02:17:19 +00:00
zcui
7db593793c selenium:update xpath of for add user over license
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81741 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-17 02:11:22 +00:00
hjbai2
595a98821c selenium:add the test case QAI-7906,and update QAI-7908 and QAI-7907
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81729 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-17 01:39:47 +00:00
fgzhang
f2eebe8d6d selenium:change parameters of svn'value
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81691 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-16 02:30:15 +00:00
rdubois
d7c64d6512 Replace images for 5.1
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81647 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-12 14:27:46 +00:00
fyan2
cacf7a2525 Modified QAI-7454
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81601 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-12 09:51:22 +00:00
hjbai2
d8a7c0dd94 selenium:update configure
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81590 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-12 09:05:43 +00:00
zcui
58b2f34151 selenium:QAI-7909
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81578 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-12 08:21:49 +00:00
fgzhang
b6f859d6be QAI-7993
update and add xpath of configration
refactor cases of configuration

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81574 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-12 08:06:39 +00:00
hjbai2
5fbe91de84 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81572 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-04-12 07:56:46 +00:00
hjbai2
fff8215819 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81571 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-04-12 07:55:56 +00:00
fyan2
9ac132a022 modified QAI-7461
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81569 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-12 07:34:48 +00:00
dfcao
e7e2e349c2 SWTBot:modify test DataViewerOnOutputPositionalTest that cann't find CCombox
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81551 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-12 06:30:17 +00:00
dfcao
a4bc905ca9 SWTBot:modify Utilities the method of createTable
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81549 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-12 06:27:34 +00:00
zcui
8859cc73f8 selenium:QAI-7909
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81543 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-12 05:58:51 +00:00
zcui
9a9d9d1efd selenium:add case test price change with valid ,not approved :QAI-7909
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81540 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-12 05:38:31 +00:00
nrousseau
d62a0ececb feature TDI-19914: update big data features to include oozie view
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81534 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-12 05:10:45 +00:00
zcui
f4a3a39fab selenium:update configure
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81532 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-12 05:08:17 +00:00
zcui
79607a9588 selenium:QAI-7909
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81530 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-12 04:56:24 +00:00
hjbai2
d5c25c4ca4 selenium:add the sleep time for some step .QAI-7908
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81528 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-12 04:46:54 +00:00
hjbai2
2ad98e3af1 selenium:add some search test cases about the all the view in the product container and product model. QAI-7908 Operations on Product records
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81524 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-12 03:23:23 +00:00
nrousseau
10c21323ac feature TDI-19909 modified: remove glassfish plugin, which is not really used
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81520 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-12 00:40:08 +00:00
fyan2
41cd21a6de QAI-7785
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81478 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-11 10:47:02 +00:00
fyan2
b025c0d4c8 Implement QAI-7705 and QAI-7462
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81477 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-11 10:45:45 +00:00
dfcao
23cb9181fc SWTBot:add test DataViewerOnOracleSDCComponentsTest ---QAI-7413
add test FilterDBDataByConditionTest --QAI-8026
       add test FileterFileDataByConditionTest --QAI-8025

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81472 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-11 10:33:23 +00:00
dfcao
24d9ce7e89 SWTBot:modify that drop table when after test
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81471 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-11 10:30:34 +00:00
fzhong
3224dcbbbc SWTBot: add new tests about CDC, TDIQA-7419, TDIQA-7420, TDIQA-7421, TDIQA-7422, and modified some tests
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81466 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-11 10:18:20 +00:00
hjbai2
3570aa08fd selenium:add some test case about the product- create/update/duplicate/delete QAI-7908 Operations on Product records
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81464 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-11 10:13:48 +00:00
sgandon
32322ec9ef Fix Bug TDI-20578 : TOS_BD shows metadata and business model
http://jira.talendforge.org/browse/TDI-20578

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81460 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-11 10:06:58 +00:00
fgzhang
cd84a8dabb QAI-7993
selenium:
**Condifuration**
TestMenuDisplayBeforeAuthorizeAllRolesToAdmin---testMenuConfiguration()
  --change xpath of 'CommandLine/primary' and 'CommandLine/secondary'

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81446 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-11 08:19:19 +00:00
fgzhang
c67ee6240f QAI-7993
selenium:**Plan**
TestPlanPauseAndResume---testPlanPauseAndResume()
  --add refresh for check element trigger'pause status
TestChangeRootTaskNameOfPlan---testChangePlanRootTaskName()
  --click refresh button for mouse blur before mousedown plan 
TestAddTriggerAddFileTrigger---testAddTriggerAddFileTriggerModifyFalse()
  --change plan'status([OK]) of 'Planed task tree view'
TestAddTwoPlansCheckInformations---testCheckInformationsBetweenPlans()
  --change xpath of 'Information'

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81445 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-11 08:12:36 +00:00
dfcao
ee14aa5949 SWTBot:the file for test DataViewerOnOutputPositionalTest
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81440 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-11 07:47:34 +00:00
zcui
d41a8a4bde selenium: add cases for task QAI-7909
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81392 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-11 03:24:33 +00:00
hjbai2
b24c572e5f selenium:change the test user from admin to the demo user (jennifer).the task is QAI-7908 Operations on Product records
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81385 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-11 02:24:12 +00:00
hjbai2
174b8cca73 selenium:change the test user from admin to the Demo user (jennifer).the task id is QAI-7907 Operations on ProductFamily records.
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81383 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-11 02:15:52 +00:00
fyan2
8ff003cab5 modified old and added new cases for esb conductor
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81357 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-10 10:52:26 +00:00
dfcao
59b8735ea8 SWTBot:Add metadata folder and move the case which are in component to it
Add test DataViewerOnOutputPositionalTest,DataViwerOnExcelTest,DataViewerOnLDIFTest,DataViewerOnWSDLTest,DataViewerOnFileMetadataWithContextTest,
       DataViewerOnMysqlWithContextTest,DataViewerOnLDIFTest
       modified  test Utilities that refactor the method of dataViewerOnDBComponents 
       
       

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81351 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-10 10:23:29 +00:00
hjbai2
e859aec0b3 selenium:add the test case about the product
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81347 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-10 10:01:56 +00:00
fgzhang
9e39e1ff75 selenium:TaskUtils---changeCommandLineConfig()
--change xpaths of 'CommandLine/primary' and host'value
TestGenerateDeployRunStopPauseTaskResumeTask---testRunTaskOfItsProjectWithContainsSpaceChar()
  --add method of change commanline before execution case
  
**Plan**
AddPlan---testAddPlanAndCheckPlanInformation()
TestAddTwoPlansCheckInformations---testCheckInformationsBetweenPlans()
  --change xpath of 'Information'


git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81346 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-10 09:59:31 +00:00
fgzhang
14d460c6c5 selenium:update cases:
change xpath of 'user.error.lastActiveAdmin' in messages_en_US.properties file	
change xpath of 'commandLine' in 'other_en_US.properties' file

TestAddProjectWithWrongSvnPassword---testAddProjectWithWrongPassword()
  --change prompt info of add project with wrong password
  

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81290 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-10 03:51:50 +00:00
hjbai2
62d0b5a11c selenium :add the product record test case
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81272 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-10 02:31:28 +00:00
hjbai2
3f9fe2b94c selenium:update the launch_tests
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81269 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-10 02:22:25 +00:00
hjbai2
268bff404b selenium:update the userImpl
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81264 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-10 01:31:53 +00:00
hjbai2
3c3d7a4b5b selenium:done QAI-7907
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81235 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-09 09:42:13 +00:00
fzhong
170a329225 SWTBot: add new tests about CDC and modified test about using salesforce in job.
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81218 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-09 08:35:14 +00:00
zcui
88a06934c8 selenium:update cases about user
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81136 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-06 10:16:36 +00:00
hjbai2
bfb89b0de9 selenium:update the test case according the new product container
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81132 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-06 10:10:51 +00:00
nrousseau
3396aa7a36 feature TDI-20366: fix p2 dependency problems with datatools
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81098 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-06 07:40:41 +00:00
zpbai
0385943a62 Selenium: Add feature for downloading excel, zip file, and fixed the problem of downloading path for firefox profile
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81092 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-06 06:49:22 +00:00
zpbai
6633982a00 Selenium: fixed the problem of downloading excel file and setting the fixfox profile's default download path
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81088 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-06 06:33:51 +00:00
nrousseau
288850262d feature TDI-20366: fix features to remove the old datatools dependencies
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81086 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-06 06:31:06 +00:00
fgzhang
323ff8799e selenium:update case:
Reference---multipleSameTimeReference()
         ---reference()
         ---failedReference()
 --change xpath of source project, the xpath is changed

update configuration file:
change parameter'values of project branch in 'project_reference.xml'

add methods:
User---addUser()
 --add method for add user
User---gotoUserPage()
 --add method for into user page
UserImpl---addUserImpl()
 --add method for add user
 
update methods:
Authorization---deleteAuthorization()
 --add method for del a autor
Authorization---setAuthorizationReadOnly()
 --add method for set auto to "read only"
Authorization---setAuthorizationReadAndWrite()
 --add method for set auto to "read write"
 
AuthorizationImpl---deleteAuthorizationImpl()
 --Delete an authorization(auto)
AuthorizationImpl---setAuthorizationReadOnlyImpl()
 --Turn an authorization to read-only(auto)
AuthorizationImpl---setAuthorizationReadAndWriteImpl()
 --Turn an authorization to read-write

add cases:
TestProjectAuthorization---testDeleteAuthorization()
 --Delete an authorization(auto)
TestProjectAuthorization---testSetAuthorizationReadOnly()
 --Turn an authorization to read-only(auto)
TestProjectAuthorization---testSetAuthorizationReadAndWrite()
 --Turn an authorization to read-write

add nodes of parameter and class in 'project_authorization.xml' file

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@81007 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-05 10:03:40 +00:00
zcui
4322438fe3 selenium:update cases about users
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80987 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-05 09:03:17 +00:00
dfcao
c671453663 SWTBot: modified MetadataHelper that expand the validation tree
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80985 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-05 08:54:26 +00:00
hwang
75f11dd275 TDI-19910:Remove all versioning from the studio
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80962 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-05 05:55:38 +00:00
zcui
fabf2317d0 selenium:remove test testAddUserAdminOverAllowed for bug exist
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80957 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-05 03:53:12 +00:00
nrousseau
564ffa1a70 TDI-20459 : remove GMF dependencies to main plugins
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80890 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-03 02:56:09 +00:00
fyan2
208475bc73 Refactor to selenium2
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80863 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-01 10:22:26 +00:00
fgzhang
851311e143 selenium:add methods:
ReferenceImpl---referenceMDMProToDIProReferenceImpl()
  --darg and drop a MDM'pro to DI'pro
ReferenceImpl---referenceMDMProToDQProReferenceImpl()
  --darg and drop a MDM'pro to DQ'pro
ReferenceImpl---referenceMDMProToMDMProReferenceImpl()
  --darg and drop a MDM'pro to MDM'pro
ReferenceImpl---referenceDQProToDQProReferenceImpl()
  --darg and drop a DQ'pro to DQ'pro
ReferenceImpl---referenceDIProToDIProReferenceImpl()
  --darg and drop a DI'pro to DI'pro
  
add cases:
TestProjectReference---testReferenceMDMProToDIPro()
  --darg and drop a MDM'pro to DI'pro
TestProjectReference---testReferenceMDMProToDQPro()
  --darg and drop a MDM'pro to DQ'pro
TestProjectReference---testReferenceMDMProToMDMPro()
  --darg and drop a MDM'pro to MDM'pro
TestProjectReference---testReferenceDQProToDQPro()
  --darg and drop a DQ'pro to DQ'pro
TestProjectReference---testReferenceDIProToDIPro()
  --darg and drop a DI'pro to DI'pro
  
add parameter nodes and class nodes to 'project_reference.xml' file

update method:
Project---deleteProject()

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80862 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-01 09:59:10 +00:00
hjbai2
4ec5d92ba2 selenium:update the test case about the journal record
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80848 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-01 08:18:57 +00:00
zpbai
8753769d18 Selenium: restore org.talend.selenium.mdm.test
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80827 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-01 06:39:28 +00:00
zpbai
1279b593b0 Selenium: remove useless files
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80826 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-01 06:06:35 +00:00
zpbai
bc66089870 Selenium: remove useless committed files
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80825 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-01 06:00:11 +00:00
zpbai
45d0ed0082 Selenium: remove useless committed files
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80824 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-01 05:59:10 +00:00
zpbai
5e8adbc0f6 Selenium: Fixed the problem that double count for the failure tests
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80822 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-01 05:27:08 +00:00
fzhong
09f285565b SWTBot: modified tests about deleting folder and refactor tests about folder
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80818 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-01 04:05:48 +00:00
fgzhang
917ebbbd1f selenium:change parameter in method(testReferenceDIProToDQPro)
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80800 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-01 02:46:31 +00:00
fgzhang
e2e0d89d33 selenium:update method:
Reference---failedReference()
  --change xpath of targetProject
add parameter nodes and class nodes to 'project_reference.xml'

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80798 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-01 01:50:02 +00:00
fgzhang
c8342f3199 selenium:add methods:
ReferenceImpl---referenceDIProToDQPro()
  --darg and drop a DI'pro to DQ'pro
             ---referenceDQProToDIPro()
  --darg and drop a DQ'pro to DI'pro
             ---referenceMDMProToDQPro()
  --darg and drop a MDM'pro to DQ'pro
             ---referenceMDMProToDIPro()
  --darg and drop a MDM'pro to DI'pro  
             ---levelRestrictionReferenceImpl
  --Drap n' drop is enabled only on project at level 1 (directly under type node)

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80797 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-01 01:47:42 +00:00
fgzhang
6f9ff764d9 selenium:add cases:
testLevelRestriction()
  --Drap n' drop is enabled only on project at level 1 (directly under type node)
testReferenceDIProTODQPro()
  --darg and drop a DI'pro to DQ'pro
testReferenceDQProToDIPro()
  --darg and drop a DQ'pro to DI'pro
testReferenceMDMProToDQPro()
  --darg and drop a MDM'pro to DQ'pro
testReferenceMDMProToDIPro()
  --darg and drop a MDM'pro to DI'pro  

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80796 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-01 01:47:00 +00:00
zcui
7cc67bdb25 selenium:add cases testUserLoginWithNewRole
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80795 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-04-01 01:22:05 +00:00
zpbai
eaa2010f20 SWTBot: update the feature for deleting created folders
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80794 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-31 16:10:29 +00:00
yhbai
fcada75608 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80792 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-03-31 10:18:36 +00:00
fyan2
bf09fc5020 refactor case for ESB Conductor
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80791 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-31 10:16:21 +00:00
hjbai2
f27362830d selenium:add a auto test case about the journal
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80772 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-31 08:08:13 +00:00
zcui
fcff1d6bc2 selenium:add case of user:add user with customized role
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80771 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-31 08:03:03 +00:00
achen
21fa370937 TMDM-3665:rename project name
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80703 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-30 08:40:27 +00:00
achen
dfab81fc77 TMDM-3665 rename project name
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80701 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-30 08:28:32 +00:00
fyan2
56c8b16b13 added test cases for ESB Condutor
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80694 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-30 07:44:10 +00:00
fyan2
a7f1c57053 Added test cases for ESB Conductor
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80690 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-30 07:27:21 +00:00
fyan2
9e14345e1c git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80682 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-03-30 07:08:00 +00:00
hjbai2
bb5eaaca25 seleniumt:update the locator_en_us.properties
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80655 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-30 03:07:27 +00:00
achen
5cf6059b0b TMDM-3665:SWTBot test project refresh
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80654 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-30 02:47:22 +00:00
fyan2
97f7b19e0c Modified method of addConductor
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80641 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-29 10:48:33 +00:00
fyan2
60285db66f refactor some test cases for the change of ESB conductor
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80639 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-29 10:31:59 +00:00
zcui
f36c778a84 selenium:update login.xml
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80638 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-29 10:16:51 +00:00
fyan2
e2e146113f git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80628 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-03-29 09:28:42 +00:00
hjbai2
df6962d399 selenium:update the test case about record
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80623 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-29 07:35:58 +00:00
zcui
5075443ab9 selenium:add case TestWelcomePage
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80618 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-29 06:17:49 +00:00
zcui
a5957fc4c4 selenium:add case TestWelcomePage
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80617 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-29 06:17:14 +00:00
fgzhang
3211c56c01 selenium:add two suite of 'project_authorization' and 'project_reference'
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80613 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-29 05:58:27 +00:00
fgzhang
56f7274173 selenium:change cases execution order
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80611 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-29 05:46:50 +00:00
fgzhang
a3ea962fc2 selenium:change xpath of source pro in method(reference)
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80610 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-29 05:45:36 +00:00
zpbai
899e924bbc Selenium: rename configuration file's name.
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80576 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 12:20:34 +00:00
fzhong
8d7766c137 SWTBot: add new cases for CDC and fixed some tests for database and context
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80572 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 10:26:00 +00:00
fgzhang
f77a2a2d25 selenium:TestProjectReference---testDeleteRefProDisplay()
--delete a reference project 
                    ---testRefBranchToTrunk()
  --refencece branch to other trunk                  
                    ---testRefBranchToBranch()
  --refencece branch to other branch                  
                    ---testRefTrunkToBranch()
  --refencece trunk to other branch      

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80569 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 10:13:03 +00:00
fgzhang
4ade37cc01 selenium:change method(selectDropDownList)
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80567 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 10:09:36 +00:00
fgzhang
3af236d67c selenium:add test nodes and parameter nodes
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80566 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 10:08:49 +00:00
fgzhang
fbe48525fc selenium:***---***project
Project---addBranch()
  --add method for add branch
project---deleteBranch()
  --add method for delete a branch  
***---***reference
Reference---checkRefProDisplay()
  --add method for check delete a refernce project

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80564 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 10:02:52 +00:00
fgzhang
db25e19cc9 selenium**--**projectImpl
ProjectImpl---addBranchProjectImpl()
  --add method for add branch
           ---deleteBranchProjectImpl()
  --add method for delete a branch  
ReferenceImpl---deleteRefproDispalyReferenceImpl()
  --add method for delete a branch  
             ---referenceBranchToTrunkReferenceImpl()
  --add method for refencece branch to other trunk           
             ---referenceBranchToBranchReferenceImpl()
  --add method for refencece branch to other branch  
             ---referenceTrunkToBranchReferenceImpl()
  --add method for refencece trunk to other branch  

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80563 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 10:02:23 +00:00
dfcao
1d0fdcc363 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80562 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-03-28 09:59:19 +00:00
dfcao
fff581f23c SWTBot: modified test filterItemsTest that unselect routines
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80561 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 09:58:01 +00:00
fgzhang
cc8f30854c selenium:update case:
***---****plan:
TestAddTriggerAddFileTrigger---testAddTriggerAddFileTriggerExist()
  --change file path of create file

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80559 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 09:53:19 +00:00
fgzhang
c1ce317f6b selenium:update all xpath
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80558 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 09:52:16 +00:00
fgzhang
a49ec8f345 selenium:***----****configuration:
update configuration:
change xpath of all items in configuration

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80557 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 09:51:51 +00:00
fgzhang
173de6cc4c selenium:update cases:
***---****task:
testRemoveTaskWithComplicatedItems()
 --add a waittime after save filetrigger
TestGenerateDeployRunStopPauseTaskResumeTask---testGenerateTask()
                                            ---testDeployTask()
                                            ---testGenerateTaskWithLatestJob() 
                                            ---testDeployTaskWithLatestJob()
                                            ---testAddSimpleTriggerToGeneratingTask()
                                            ---testGenerateTaskUsingRemoteWrongCommandLine()
TestCheckRegenerateTask---testCheckRegenerateTask()
 --add refresh after click generate and deploy
TaskUtils---changeCommandLineConfig()
 --change xpath of comandlinehost/input
TestAddTriggerAddFileTrigger---testAddTriggerAddFileTriggerAddExist()
 --add refresh after add filetrigger check exist


git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80556 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 09:51:23 +00:00
hwang
8a546289ce TDI-19909:Remove all "studio" LGPL jars from the build
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80553 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 09:25:50 +00:00
hjbai2
91904a82f0 selenium :add some test cases about the record, include create/delete/update/search/duplicate/restore the record from the recycle
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80539 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 08:13:58 +00:00
zcui
6ac55ab596 selenium:update license
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80473 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 02:52:21 +00:00
zcui
ce501c44df selenium:add cases of license and login for mdm
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80472 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 02:51:02 +00:00
zcui
c429028f61 selenium:add cases of license and login for mdm
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80471 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-28 02:50:00 +00:00
dfcao
6e64e1cac4 SWTBot: add DataViewerOnFileDelimitedTest,DataViewerOnRegexTest,DataViewerOnXMLTest,
refactor the dataViewer of Utilites which is used by DataViewerOnDatabasesComponentsTest ,DataViewerOnFilesComponentsTest and DataViewOnLadpTest


git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80344 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-22 10:21:58 +00:00
zpbai
1d06b4a445 Selenium: update the global configuration file
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80334 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-22 10:06:28 +00:00
fgzhang
2447abe76e selenium:add file for test project reference
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80328 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-22 09:10:14 +00:00
fgzhang
431bc036a6 selenium:add method(selectDropDownList) for drop-down list
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80326 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-22 08:57:53 +00:00
fgzhang
e98be9a320 selenium:testDownloadBiglogsAndCheckIt()
--check download logs

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80201 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-21 07:08:31 +00:00
fgzhang
fdcb79383b selenium:
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80199 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-21 06:44:45 +00:00
fgzhang
a02aa68484 selenium:TestProjectReference---testDeleteRefProDisplay()
--TDIQA-5344:projects display(auto)
TestProjectReference---testRetrievePeoject()
  --TDIQA-378:Retrieve(auto)
TestProjectReference---testRemoveReference()
  --TDIQA-382:Remove reference(auto)

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80198 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-21 06:44:00 +00:00
fgzhang
ed608c17b4 selenium:Project---addProject()
--add method for creation project
Project---gotoProject()
  --add method for into project page
Project---failedDeleteProject()
  --add method for check delete project info of delete failed
ProjectImpl---addProjectImpl()
  --add method for creation project
Reference---checkRefProDisplay()
         ---removeReference()

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80197 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-21 06:36:31 +00:00
fzhong
5258d8def9 SWTBot: modify tests about salesforce for did not clean up repository
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80186 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-21 03:20:10 +00:00
dfcao
2ad994e1ff SWTBot: add DataViewerOnDB2Test
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80149 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-20 10:12:44 +00:00
hjbai2
05e16023a2 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80148 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-03-20 10:12:28 +00:00
dfcao
48be76a8dd SWTBot: modified test UseHL7Test about cancel set the component type before drag it to job
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80147 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-20 10:11:57 +00:00
fzhong
cfd845da98 SWTBot: modify test ChangeDbConnectionForCDCTest that could not find table to delete
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80137 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-20 09:31:44 +00:00
fyan2
440d0a5c2b git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80135 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-03-20 09:05:44 +00:00
fyan2
1489d6cc32 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80121 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-03-20 08:28:04 +00:00
fyan2
02052ae703 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80119 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-03-20 08:20:46 +00:00
fzhong
bf5fd0e008 SWTBot: modify tests fail affected by method for cleanning up repository
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80097 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-20 07:04:56 +00:00
fgzhang
ac8e08aab1 selenium:***---****config files:
change xpath of configuration'items in 'other_en_US.properties' file

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80079 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-20 03:28:50 +00:00
fgzhang
274f3e0509 selenium:update cases:
***---****audit:
Audit---typeWordsInConfigurationMenu()
     ---AssertEqualsInConfigurationMenu()	
     ---AssertEqualsInConfigurationMenu()
 --removed some judge and loop, add press enter keys after changed input value
TestChangeAuditReportStoredPathInConfiguration---testChangeAuditReportStoredPathInConfiguration()
 --change xpath	 of 'reportStoredPath'

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80078 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-20 03:25:51 +00:00
zcui
6024be4024 selenium:add cases for TMDMQA-5772,TMDMQA-5489
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80069 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-20 02:21:19 +00:00
zcui
37c909a3f1 selenium:add cases for TMDMQAI-5772,TMDMQA-5489
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80066 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-20 02:14:16 +00:00
zcui
8d77700942 selenium:update TestUser and add cases for TMDMQA-5772,TMDMQA-5489
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80064 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-20 02:11:49 +00:00
sgandon
4f73df387a TDI-9010 : rename the folder to model.tac instead of tac.model
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80050 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-19 15:06:53 +00:00
nhaumont
9dbcf19ce8 Selenium : refactoring MDM test plugin for compliance with Talend standards
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80045 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-19 13:57:20 +00:00
sgandon
15ca561a97 TDI-9010 : move the org.talend.tac.model to tis_shared
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80043 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-19 13:11:15 +00:00
hjbai2
a4c255a9d8 selenium add three record test cases create delete and update
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80017 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-19 08:36:42 +00:00
hjbai2
59172ddbfa git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80016 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-03-19 08:33:56 +00:00
hjbai2
8888cf41c6 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80015 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-03-19 08:31:59 +00:00
hjbai2
6524ce4f5a add three new test about the record
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80014 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-19 08:24:52 +00:00
dfcao
52601866de SWTBot: modified test FilterItemByStatusTest the editProperties method
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@80012 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-19 08:02:08 +00:00
zpbai
577e10eeca SWTBot: Add the feature for deleting created folders
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79977 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-16 10:33:11 +00:00
fzhong
a5ad6a47ac SWTBot: add new tests about CDC and refactor tests about cleanning up repository
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79976 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-16 10:33:03 +00:00
dfcao
138820241e SWTBot: add DataViewerOnInformixTest,DataViewerOnMSSQLtTest,DataViewerOnOracleTest,DataViewerOnPostgresqlTest,DataViewerOnTeradataTest,DataViewerOnLadpTest,DataViewerOnAS400Test
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79968 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-16 09:46:02 +00:00
fyan2
d6352ee0c5 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79939 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-03-16 07:00:27 +00:00
dfcao
43ccef7fbb SWTBot: modified all tos test to add repositories list
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79936 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-16 06:33:04 +00:00
dfcao
2fd1f3df9c SWTBot: modified all tis test to add repositories list
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79928 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-16 03:41:46 +00:00
dfcao
8dac3ea2e0 SWTBot: modified the dataViwerOnDBComponent method of DataViewOnMySQLTest and modified the delete method
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79926 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-16 03:35:01 +00:00
nrousseau
404063d975 TDI-19912: branding update and SQL Templates update
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79924 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-16 03:30:23 +00:00
zcui
266212a727 selenium:add cases testAddUserWebOverAllowedInactive
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79916 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-16 02:30:43 +00:00
nhaumont
bf8290fd90 SWTBot : fix Data viewer test case
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79906 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-15 14:01:45 +00:00
zcui
fa6dda5835 cases added:
testAddUserAllowedAdmin
testAddUserAllowedWeb
testAddUserWebOverAllowed

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79875 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-15 09:21:51 +00:00
zcui
a4f08eff29 cases added:
testAddUserAllowedAdmin
testAddUserAllowedWeb
testAddUserWebOverAllowed

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79874 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-15 09:20:30 +00:00
zcui
c11ddef89b selenium:add cases testAdduserAllowedAdmin,testAddUserAllowedWeb,testAddUserWebOverAllowed
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79873 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-15 09:18:13 +00:00
zcui
4288d9a1f1 selenium:update method logout of login
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79871 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-15 09:16:34 +00:00
zcui
69e36990d6 selenium:update Base.java ,add method named getValue
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79870 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-15 09:15:03 +00:00
fyan2
652f5c9dee git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79865 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-03-15 08:53:22 +00:00
fyan2
8edef8e020 Added case of ESBConductor context
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79860 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-15 08:41:43 +00:00
dfcao
98220cd201 SWTBot: modified Utilities
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79844 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-15 07:20:27 +00:00
zpbai
eb54609b63 SWTBot: Add the feature of deleting created items. It works for all the products.
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79840 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-15 06:38:43 +00:00
fzhong
cef9e53a4f SWTBot: modify ExteralComponentsTest for update the function name 'Numeric.sequence' in setting of tRowGenerator
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79832 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-15 05:53:44 +00:00
fzhong
2cf00bcaa7 SWTBot: modify test ChangeDatabaseAndRetrieveSchemaTest for did not get righ errorlog
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79828 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-15 04:49:02 +00:00
nrousseau
9b3a0179f7 Modification: remove all the javacSource and javacTarget settings in the build.properties
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79802 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-15 02:45:14 +00:00
fzhong
e84eb591e4 SWTBot: modify method 'beginCreationWizard' to make it ok if the title is null.
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79800 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-15 02:27:44 +00:00
fyan2
64205b546b git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79778 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-03-14 09:17:25 +00:00
dfcao
cf0d9ea0e7 SWTBot: modified Utilities
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79763 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-14 07:35:39 +00:00
dfcao
f97a44e56e SWTBot: modified UseAdvanceWebServiceTest
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79762 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-14 07:33:13 +00:00
fgzhang
becf84f918 selenium:AuthorizationImpl---authorizationImpl()
---reAuthorization()
 --add a parameter of user info, add assert

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79749 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-14 03:33:09 +00:00
fgzhang
94f11f21be selenium:WebDriverBase---dragAndDrop()
--change dragDrop method(detach)

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79747 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-14 03:31:16 +00:00
fgzhang
f874b2a8bc selenium:TestProjectAuthorization---testAuthorization()
--TDIQA-251:Simply create a authorization
TestProjectAuthorization---testReAuthorization()
 --TDIQA-257:Create an authorization that already exists

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79746 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-14 03:30:29 +00:00
fgzhang
e1aaf1d8e0 selenium:add file for config authorization of project_authization.xml
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79745 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-14 03:28:40 +00:00
zpbai
ca5c448c06 Selenium: added mdm auto tests basic framework and added simple test case
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79730 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-13 12:33:02 +00:00
fzhong
4345d67e26 SWTBot: refactor tests about using using common @AfterClass to cleanup perspective
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79723 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-13 10:38:22 +00:00
fzhong
aa000c447d SWTBot: refactor test about copybook and embeddedrules
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79721 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-13 10:25:28 +00:00
fzhong
9a406adada SWTBot: refactor test about copybook and embeddedrules
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79719 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-13 10:22:15 +00:00
zpbai
ce0c166915 Selenium: Add common action for isElementPresent
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79695 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-13 06:59:23 +00:00
zpbai
649acd5114 Selenium: Add the feature to implement auto tests with webdriver, there is a simple case for authorization
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79666 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-13 01:46:15 +00:00
fzhong
0cab09a680 SWTBot: add tests about 'Change Data Capture'
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79650 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-12 09:41:43 +00:00
fyan2
69906204be git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79649 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-03-12 09:37:11 +00:00
dfcao
51c361c249 SWTBot: add DataViewerOnDatabasesComponentTest,DataViewerOnFlieComponentTest,DataViewerOnMySQLTest,TunitTest
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79646 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-12 09:14:45 +00:00
fyan2
7ef7d5bb72 added test cases of test deploy with inactive runtime and select feature
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79637 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-12 08:12:36 +00:00
fyan2
799adaec2a added test suit of esbconductor.xml
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79636 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-12 08:11:22 +00:00
fyan2
6d369d01ee added configuration for test cases of inactive runtime server and select feature
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79632 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-12 08:10:30 +00:00
zpbai
b280483e4c SWTBot: Remove TalendSwtBotForTos from common SWTBot test
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79528 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-08 11:33:43 +00:00
fgzhang
0fb433805f selenium: add case for test commandline command help
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79404 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-07 07:40:14 +00:00
zcui
e05a044ed2 selenium:update for TestBranchManageAdd
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79402 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-07 07:34:18 +00:00
zcui
a1dd496481 selenium:update for TestLicenseAccountsCount
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79401 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-07 07:33:39 +00:00
zcui
791da2aa21 selenium:add method deleteAllPlan to Plan
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79400 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-07 07:31:37 +00:00
fgzhang
8a7190c12b selenium:add file for test commandline
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79399 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-07 07:31:24 +00:00
zcui
41f62f989d selenium:update for TestTokenINDbconfigPage
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79398 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-07 07:30:53 +00:00
zpbai
d4561caf9d Selenium: Add default value for commandline server and port
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79396 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-07 07:08:43 +00:00
zpbai
024de88302 Selenium: Add the feature for Commandline
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79384 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-07 05:25:06 +00:00
fzhong
63659156a3 SWTBot: improve Utilities.java for clean up repository and modified tests for project management with clean up method
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79317 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-06 10:43:54 +00:00
fzhong
0065d8cd1a SWTBot: modify Utilities.java for clean up repository
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79313 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-06 10:15:11 +00:00
hwang
cde78d899b TDI-19731 Prepare OEM for Hortonworks
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79148 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-02 02:18:32 +00:00
hwang
7b4722a838 TDI-19731 Prepare OEM for Hortonworks
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79126 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-01 09:24:12 +00:00
fgzhang
ad108b75df selenium:add node of class in esbconductor.xml
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79111 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-01 08:04:48 +00:00
fgzhang
b4a2ca7f66 selenium:add method(clearService) for clear all servers
change method(deleteOk) in ESBConductorUtils
modified cases of use delete method'cases

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79110 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-01 08:04:10 +00:00
zcui
5ef5eee610 selenium:add cases about task sort by label
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79105 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-01 07:45:27 +00:00
hwang
97b2c44103 TDI-19731 Prepare OEM for Hortonworks
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79102 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-01 06:30:33 +00:00
hwang
80e3289056 TDI-19731 Prepare OEM for Hortonworks
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79101 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-01 06:28:49 +00:00
hwang
eecc45d199 TDI-19731 Prepare OEM for Hortonworks
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79098 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-03-01 05:09:28 +00:00
fgzhang
5e707c53ba selenium:EsbUtil---AssertEqualsInConfigurationMenu()
---AssertEqualsInConfigurationMenu()
       ---typeWordsInConfigurationMenu()
  --removed codes of some judge
       ---modifyEsbConfigurationInConfigurationPage()


git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79046 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-29 07:49:48 +00:00
fgzhang
ee71c5b6ca selenium: change xpath of esb'localtor and esb'monitor
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79043 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-29 07:46:25 +00:00
zcui
fb6e5dabf4 selenium:update licenseaccountcout
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79034 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-29 06:43:09 +00:00
fgzhang
6b413c72a0 selenium:TestCheckLogs---testLastPageFirstPage()
--change xpath of firstpage

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@79031 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-29 06:20:19 +00:00
hwang
9a252c4323 TDI-19731 Prepare OEM for Hortonworks
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78968 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-28 08:02:53 +00:00
hwang
81d4115ab5 TDI-19731 Prepare OEM for Hortonworks
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78967 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-28 07:59:57 +00:00
hwang
9f133a02c2 TDI-19731 Prepare OEM for Hortonworks
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78966 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-28 07:57:44 +00:00
hwang
a566270451 git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78965 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-02-28 07:56:30 +00:00
hwang
8d5a79cf50 TDI-19731 Prepare OEM for Hortonworks
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78963 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-28 07:12:58 +00:00
hwang
839543740d TDI-19731 Prepare OEM for Hortonworks
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78950 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-28 03:25:17 +00:00
hwang
9ee53024ff TDI-19731 Prepare OEM for Hortonworks
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78948 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-28 03:19:04 +00:00
hwang
b84f08985c TDI-19731 Prepare OEM for Hortonworks
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78946 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-28 03:13:26 +00:00
hwang
9d60a5f757 TDI-19731 Prepare OEM for Hortonworks
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78944 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-28 03:08:24 +00:00
hwang
2d911e896e TDI-19731 Prepare OEM for Hortonworks
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78942 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-28 03:04:21 +00:00
hwang
b1040d5d0d TDI-19731 Prepare OEM for Hortonworks
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78940 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-28 03:03:45 +00:00
zcui
40867c9183 selenium:update for plan.xml
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78907 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-27 09:11:42 +00:00
zcui
b74b2a446a selenium:update for class TestJobAnalyses
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78815 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-24 06:28:23 +00:00
fzhong
6c0de2f94a SWTBot: add test ImportCustomComponentToPaletteTest
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78788 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-24 02:55:19 +00:00
fgzhang
4182d9bb49 selenium:because this is had a bug on linux, so removed the config files for liunx execution auto
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78780 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-24 01:25:44 +00:00
fgzhang
209af2f0e3 selenium:ESBConductorUtils---typeWordsInConfigurationMenu()
--add wait time(2s) before full input

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78753 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-23 08:19:12 +00:00
zcui
4be4c8175d selenium:add testGroupESBConductorOfService
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78710 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 09:58:14 +00:00
fgzhang
0f9e38470f selenium:Add exist auto tests from trunk 5.0 to trunk
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78709 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 09:55:53 +00:00
dfcao
2955afeddd SWTBot: add IterateLinkTest
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78705 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 09:43:32 +00:00
fzhong
81e3277450 SWTBot: modify test UpdateDependentJobsTest for could not find shell 'Modification'
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78700 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 09:25:01 +00:00
zcui
6a3c524770 selenium:update login
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78685 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 07:43:25 +00:00
zcui
e77526588e selenium:update login
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78684 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 07:43:01 +00:00
zcui
92f3d61bd5 selenium:add cases about connection to trunk:
testJobAnalyseWithMSSQL ,testJobAnalyseWithORACLE 

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78683 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 07:41:00 +00:00
fgzhang
0d65aaef59 selenium: add parameters of esb conductor
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78682 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 07:40:59 +00:00
zcui
664ff5a6ea selenium:add cases about connection to trunk:
testJobAnalyseWithMSSQL ,testJobAnalyseWithORACLE 

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78681 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 07:40:17 +00:00
fgzhang
5ac6b454c7 selenium:Add exist auto tests from trunk 5.0 to trunk
EsbConductorUtil---AssertEqualsInConfigurationMenu()
       ---AssertEqualsInConfigurationMenu()
       ---typeWordsInConfigurationMenu()
  --add methods for test esbconductor config info in configuration page
add cases:
TestConfigurationESBConductor---testConfigurationESBConductorIsWrong()
 --add case for test set wrong config info and check prompt info in configuration page
                             ---testConfigurationESBConductorIsOk()
 --set right config info to esbConductor items, check per items status 

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78680 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 07:35:05 +00:00
fgzhang
2753fa5e53 selenium: add config file of 'forget pass word'
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78655 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 05:41:02 +00:00
fgzhang
82a75a1766 selenium:removed config file of 'forget password'
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78654 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 05:40:22 +00:00
fgzhang
61f29df4c1 selenium: change suite name of cloud license
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78651 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 05:25:23 +00:00
fgzhang
0f1b8905d8 selenium:change parameter'value of ldap info
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78649 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 05:20:50 +00:00
fgzhang
7c6763b1ae selenium:change mail'value of smtp info
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78645 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 05:08:20 +00:00
fgzhang
38e855b183 selenium:TestSamServerNotRunning---testSamServerNotRunning()
--add a judge of offOnline

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78638 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 03:31:02 +00:00
fgzhang
fcb3611bf7 selenium:service locator:
EsbUtil---AssertEqualsInConfigurationMenu()
       ---AssertEqualsInConfigurationMenu()
       ---typeWordsInConfigurationMenu()
  --removed codes of some judge
       ---modifyEsbConfigurationInConfigurationPage()
TestServiceLocator---testSetESBSamServer()
                  ---testSetESBSamServerWithWrongUrl()
  --add a judge of offOnline

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78636 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 03:30:04 +00:00
fzhong
a9d0f0ff90 SWTBot: update test OpenAnotherVersionOfJobTest for could not find save button on tool bar
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78627 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-22 02:46:30 +00:00
zcui
e1cf4da7b3 selenium:update cases of plan on trunk
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78606 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-21 10:00:59 +00:00
zcui
546a2b0f85 selenium:update cases of plan on trunk
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78605 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-21 09:59:58 +00:00
zcui
2499709adf selenium:update cases of privilege
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78603 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-21 09:34:50 +00:00
zcui
76a463d326 selenium:update cases of privilege
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78602 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-21 09:34:15 +00:00
dfcao
7bdda46fcf SWTBot: modified UseHL7Test
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78594 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-21 08:09:36 +00:00
fzhong
274518e520 SWTBot: modify test VariablesTabTest for could not find add button, and update new tests' title to 2012
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78590 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-21 07:54:25 +00:00
fgzhang
869f5ff017 selenium:task
TestAddTriggerAddCronTrigger---testAddTriggerAddCronTrigger()
TestGenerateDeployRunStopPauseTaskResumeTask---	testPauseTaskResumeTask()
  --change value of tigger'year


git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78586 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-21 06:47:39 +00:00
dfcao
3207b84c1c SWTBot: modified the ftp connection password
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78584 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-21 06:36:17 +00:00
dfcao
e5a306bf75 SWTBot: modified the beginEditWizard method of TalendJobletItem
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78583 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-21 06:34:49 +00:00
zcui
3556e92abd selenium:update launch_test_china.xml
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78577 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-21 05:04:50 +00:00
zcui
7cfbaa39dd selenium:update launch_test_china.xml
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78576 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-21 05:04:29 +00:00
fzhong
de4f039f5a SWTBot: modify test ExportAsContextForXmlTest that could not close shell
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78556 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 10:38:47 +00:00
fzhong
bf305c1b89 SWTBot: modify test for adding new dialog for change database test
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78555 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 10:37:48 +00:00
fzhong
1979918616 SWTBot: modify test TRunJobTest for could not find job for tRunJob component
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78554 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 10:36:05 +00:00
fzhong
e52fe96c54 SWTBot: update editor title of business model and modified test SaveAsForBusinessModelTest
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78553 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 10:34:44 +00:00
zcui
0fcd591574 selenium:add method selectDropDownListByClickArrow to Base
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78550 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 10:02:27 +00:00
zcui
e87a1ea486 selenium:add method selectDropDownListByClickArrow to Base
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78549 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 10:02:04 +00:00
zcui
4c7f54a3e0 selenium:update cases of grid
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78546 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 09:55:29 +00:00
zcui
63f1de6fed selenium:update cases of grid
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78545 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 09:54:57 +00:00
zcui
e810346603 selenium:update cases of audit
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78543 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 09:49:31 +00:00
zcui
aff2bd7643 selenium:update cases of audit
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78542 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 09:48:50 +00:00
zcui
d1bf9a3b93 selenium:update cases of connection
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78541 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 09:47:39 +00:00
zcui
14982d849c selenium:update cases of connection
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78540 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 09:47:03 +00:00
fgzhang
984c401608 selenium:modified cases:
TestAddTaskBaseBranchProject---testRemoveTaskWithComplicatedItems()
  --changed time interval, add a judge of task'status

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78538 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 09:11:52 +00:00
zcui
cffd1f55af selenium:update configure xml file of project
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78525 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 07:25:04 +00:00
zcui
8b2f27186e selenium:update projects
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78524 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 07:24:17 +00:00
zcui
f1368dcad3 selenium:update cases of projects on trunk 5.1.0
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78521 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 07:18:45 +00:00
fgzhang
00f6c7a561 selenium:menu
modified cases:
TestMenuDisplayBeforeAuthorizeAllRolesToAdmin---testMenuConfiguration()
  --removed codes of check xpath(//div[contains(text(),'Extended configuration (1 Parameter')])
  --change xpath of ' Dashboard (1 Parameter'
                                             ---testMenuProjectAuthorization()
  --change xpath of DI/DQ/MDM in "ProjectAuthorization" page
TestMenuDisplayAfterAuthorizeAllRolesToAdmin---testMenuDashboardExpend()
TestMenuDisplayAfterChangeLicenseToCLOUD---testMenuDisplayAfterChangeLicenseToCLOUD()
  --removed codes of check soa
TestMenuDisplayAfterAuthorizeAllRolesToAdmin---testMenuSoaDashboard()
                                            ---testMenuSoaManager()
  --removed case of soa

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78473 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 03:26:33 +00:00
fgzhang
9b4e314c54 selenium:update license to latest version for test 5.1.0 trunk
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78442 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 02:35:03 +00:00
fgzhang
2dce88cacb selenium:update license to latest version for test 5.1.0 trunk
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78441 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 02:34:39 +00:00
fzhong
76b1f45f5b SWTBot: add test TAggregateRowTest and TSortRowTest
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78426 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-20 01:57:01 +00:00
dfcao
a69a7cc611 SWTBot: add test RunJobTest
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@78406 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-17 10:01:22 +00:00
yhbai
4147964e52 SWTBot: add test about generate user define report and modify fail tests
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@77453 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-02-01 02:15:47 +00:00
dfcao
e86c794988 SWTBot: add test ValuesAsTableTabOfContextTest
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@77401 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-01-31 07:33:26 +00:00
fzhong
07d8d39d49 SWTBot: add test for context UpdateDependentJobsTest and VariablesTabTest
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@77389 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-01-31 06:02:38 +00:00
dfcao
033f70e7f5 SWTBot: add test ValuesAsTreeTabOfContextTest
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@77384 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-01-31 05:36:12 +00:00
mhirt
ff54a83f4a Update copyright to 2012
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@77221 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-01-24 01:22:22 +00:00
zpbai
09e16538f0 selenium: replace " to '
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74998 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-21 07:35:32 +00:00
fgzhang
693f772806 selenium: modified parameter'value of provider name
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74985 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-21 05:40:47 +00:00
fgzhang
fc406d370b selenium:**monitor**
TestEsbServicePayloadContentsDisplay---testPopUpPayLoadContens()
TestEsbServicePayloadContentsDisplay---testEnvelopeOpenClose()
  --modified xpath of 'Response in' envelope
  --add click 'Refresh' before click 'Request Out' envelope
  --add codes of mousedown monitor info and press 'Down' key after click 'Refresh'
TestEsbServiceActivityPageDisplay---testMonitorGoToPrePage()
  --modified xpath of previous page

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74984 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-21 05:38:01 +00:00
fgzhang
009be1b04d selenium:**Servicelocator**
TestServiceLocator---testServicePerColumnsValue()
TestServiceLocator---testCheckSortAscendingSortDescending()
TestServiceLocator---testSortTableByClickOnColumnHeader()
  --modified xpath of 'service endpoint'

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74982 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-21 05:21:57 +00:00
fgzhang
1bae5d6b77 selenium:TestAddServerWithTalendRuntime---testAddRuntimeServerOfUncheckActive()
--modified xpath of runtime'status

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74961 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-21 01:48:30 +00:00
fgzhang
023914c09f selenium:TestServerFilters---testServerFiltersInJobconductor()
--modified assert to true of check servre list in jobconductor page

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74944 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-20 10:06:14 +00:00
fgzhang
baf7ee66a3 selenium:**plan**
Plan---runPlanAndCheck()
TestPlanParameters---testCheckPlanExecutionLogs()
TestPlanParameters---testChangePlanParametersNotClickOverride()
TestAddTriggerAddFileTrigger---testAddTriggerAddFileTriggerExistFalse
  --update xpath of task'status 'Ok' in 'Planned task tree view'
TestAddTriggerAddFileTrigger---testAddTriggerAddFileTriggerExistFalse()
  --invoking method(runPlanAndCheck)

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74941 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-20 10:04:59 +00:00
fgzhang
5becad20a3 selenium:**menu**
TestMenuDisplayBeforeAuthorizeAllRolesToAdmin---testMenuConfiguration()
  --removed code of check "Conductor (7 Parameters')" 

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74912 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-20 08:00:25 +00:00
fgzhang
4e4a24e7a0 selenium:TestAuditProjectContainSpace---testAuditProjectContainsSpace()
--modified project name to "project_space" of method(this.checkReportPdf(defaultPath, "project_space", tjava))

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74798 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-19 03:28:19 +00:00
fgzhang
2d9d764e20 selenium:SoaUtils
--update class(SoaUtils) extends to Audit

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74781 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-19 02:29:27 +00:00
fgzhang
753c9cde06 selenium:
**Notification**
update notification.xml
  --change word(Suscribe) to Subscribe of jobserver notification'description

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74773 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-19 02:20:32 +00:00
fgzhang
ef7be9d63a selenim:update cases:
**Audit**
1.TestAuditProjectContainSpace---testAuditProjectContainsSpace()
  --removed code of check audit list links
2.TestAudit---testAuditBranch()
  --removed code of check job name in PDF file

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74771 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-19 01:57:23 +00:00
fgzhang
14a662ca6e selenium:**Task**
TestAddTriggerAddSimpleTrigger---testAddTriggerAddSimpleTriggerAddWrongFormFileds()
  --change text(Number of triggerings:) to (Number of repetitions:)

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74768 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-19 01:51:28 +00:00
fgzhang
fc849a9209 selenium:**Soa**
SoaUtils---addSoa()
  --Contact input'value type is changed
  --modified description input'id

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74767 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-19 01:49:41 +00:00
zpbai
041cf22047 selenium: update the method for checking info the pdf's context. Case Insensitive or not
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74766 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-19 01:49:20 +00:00
fzhong
65f6a73b40 SWTBot: solve pb for could not find widget of 'CCombo' for tests about basic validation rule
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74681 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-16 10:00:00 +00:00
zpbai
cfc29a8c89 selenium: update parameters
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74498 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-14 09:13:33 +00:00
fzhong
0e2253def4 SWTBot: solve pb for creating joblet fail
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74496 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-14 08:39:31 +00:00
zpbai
432a953cdc selenium: configuration parameters
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74409 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-13 03:21:58 +00:00
zpbai
7102c727f9 selenium: modified some parameters
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74380 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-12 11:26:08 +00:00
fgzhang
9b4c10dd06 selenium:update license to latest license
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74323 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-12 06:49:47 +00:00
fgzhang
9ec45c0e82 selenium:update license to latest license
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74322 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-12 06:49:35 +00:00
zpbai
b00a59f8b7 selenium: change some parameters in configuration files
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74316 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-12 03:34:49 +00:00
nhaumont
147431f141 Selenium : update French file
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74146 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-08 15:22:03 +00:00
sgandon
8e62a4b82e Fix task : Studio Unit Test, make it automatic from hudson
made the org.talend.dev plugin unpacked

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74040 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-07 17:40:34 +00:00
sgandon
01b1d1a751 Fix task : Studio Unit Test, make it automatic from hudson
make org.talend.development a real plugin and add it to the swtbot feature


git-svn-id: http://talendforge.org/svn/tis_shared/trunk@74038 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-07 17:39:24 +00:00
fzhong
eec4d1eee2 SWTBot: solve pb for could not find schema tree when retrieve schema
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73705 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-02 10:09:31 +00:00
fzhong
3fa92fea98 SWTBot: add test SaveAsForBusinessModelTest
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73697 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-02 08:05:55 +00:00
fzhong
b4f48487b7 SWTBot: refactor method of asserting job result and stabilize tests for finish button not found
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73684 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-02 06:36:45 +00:00
nhaumont
bebc8d3c6e Selenium : update French admin config file
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73658 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-01 18:29:37 +00:00
nhaumont
9e86f36c25 Selenium : update French config file
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73653 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-01 16:08:43 +00:00
fzhong
b652a8e11b SWTBot: modify test UseAdvanceWebServiceTest for did not have to choose component type now after drag metadata on job
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73573 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-01 07:34:42 +00:00
fgzhang
3f55b4f7e7 selenium:update license to latest 5.0.1
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73544 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-01 01:25:42 +00:00
fgzhang
6e3ac05763 selenium:update license to latest 5.0.1
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73543 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-12-01 01:25:31 +00:00
amarkevich
c01d6afad1 update version to 5.0.1
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73523 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-30 13:30:10 +00:00
fzhong
c2e68dd231 SWTBot: add test about Copy/Paste business model elements and modify test about assignment for business model
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73493 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-30 09:52:53 +00:00
fzhong
8e5b8ade1a SWTBot: add test AssignmentForBusinessModelTest
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73390 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-29 09:24:19 +00:00
fzhong
9ee28d2d7f SWTBot: modified tests about business models
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73380 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-29 07:57:08 +00:00
fgzhang
8714f9cb88 selenium:TestMenuDisplayAfterChangeLicenseToCLOUD---testMenuDisplayAfterChangeLicenseToCLOUD()
--after upload license of 'CLOUD', check menu display of license'privilege 
                                        ---uploadLicense()
  --upload license and check upload result
                                        ---resetLicenseToMDM()
  --creation the case for change license to MDM

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73367 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-29 06:07:34 +00:00
fgzhang
1a7dd37027 selenium:update menu.xml
add a class of 'TestMenuDisplayAfterChangeLicenseToCLOUD' to test node
add parameters of license'path

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73366 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-29 06:06:41 +00:00
nrousseau
3136bcc0a2 remove unused plugins
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73353 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-29 03:54:39 +00:00
fgzhang
d10cab0d86 selenium:update login.xml
add a method of 'testLoginPageOfCLOUD()' to test node

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73347 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-29 03:20:38 +00:00
fgzhang
82f0735a83 selenium:add cases:
TestLoginPage---testLoginPageOfCLOUD()
  --check login page of license CLOUD

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73345 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-29 03:18:57 +00:00
fgzhang
dd06659896 selenium:rename esb license to 'ESB_EE'
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73340 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-29 02:44:45 +00:00
fgzhang
225dd027cb selenium:login.xml
server.xml
rename esb license to 'ESB_EE' 

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73338 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-29 02:42:35 +00:00
fgzhang
0afbbde2f1 selenium:
1.change license to latest

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73337 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-29 02:41:25 +00:00
fgzhang
e1173f790c selenium:1.add a license of 'CLOUD_EE_MPX' under folder(org/talend/tac/folder/license)
2.rename esb license to 'ESB_EE' 
3.change all license to latest

git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73336 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-29 02:40:35 +00:00
fzhong
48c78638e9 SWTBot: add tests about finding assignments
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73273 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-28 10:32:59 +00:00
fgzhang
3e759fa008 selenium:move global parameters to the global configuration file
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73253 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-28 09:12:43 +00:00
fgzhang
a4b85b0a91 selenium:remove duplicated global parameters
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73249 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-28 09:04:02 +00:00
fzhong
60bb859a5c SWTBot: rename folder 'refactor'
git-svn-id: http://talendforge.org/svn/tis_shared/trunk@73182 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2011-11-25 10:44:41 +00:00
1237 changed files with 100590 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.talend.mdm.swtbot.test</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,8 @@
#Thu Mar 29 13:24:41 CST 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View File

@@ -0,0 +1,26 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: mdm Test
Bundle-SymbolicName: org.talend.mdm.swtbot.test
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.talend.swtbot.mdm.test.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.swtbot.eclipse.core,
org.eclipse.swtbot.eclipse.finder,
org.eclipse.swtbot.junit4_x,
org.hamcrest,
org.junit4,
org.apache.log4j,
org.talend.mdm.commmon,
org.talend.mdm.workbench,
org.eclipse.ui.forms,
org.talend.mdm.workbench.enterprise,
org.talend.mdm.repository
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.eclipse.core.resources,
org.eclipse.gef.commands,
org.eclipse.ui.internal.views.properties.tabbed.view,
org.eclipse.wst.xsd.ui.internal.editor

View File

@@ -0,0 +1,4 @@
source.. = src/main/java
output.. = bin/
bin.includes = META-INF/,\
.

View File

@@ -0,0 +1,3 @@
1. MDM Server view was deprecated , so it's no need to add junit test case for serverview.
2. SWTBotForMDMRepositoryView is designed to be inherited by all the subclass in serverview.
of course, you can add interfaces or super class to match your requirements.

View File

@@ -0,0 +1,50 @@
package org.talend.swtbot.mdm.test;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.talend.swtbot.mdm.test"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
}

View File

@@ -0,0 +1,128 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.repositoryview;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.talend.mdm.repository.ui.navigator.MDMRepositoryView;
/**
* SWTBot test super class for MDM Repository View
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class SWTBotForMDMRepositoryView {
protected static SWTWorkbenchBot bot = new SWTWorkbenchBot();
protected static SWTBotTreeItem repositoryItem;
private static SWTBotTree repositoryTree;
private static Tree swtTree;
private static final long ONE_MINUTE_IN_MILLISEC = 60000;
private static boolean isLoggined = false;
private static SWTBotView view;
private static void initRepositoryView() {
view = bot
.viewById(MDMRepositoryView.VIEW_ID);
view.show();
view.setFocus();
// bot.perspectiveById("org.talend.mdm.perstective").activate();
view.getWidget().getDisplay().syncExec(new Runnable() {
public void run() {
// SWTBotTree
// tree=bot.treeWithLabel("http://localhost:8080/talend/TalendPort[HEAD] admin");
Composite comp = (Composite) view.getWidget();
comp = (Composite) comp.getChildren()[0];
swtTree = (Tree) comp.getChildren()[0];
}
});
repositoryTree = new SWTBotTree(swtTree);
repositoryItem=repositoryItem.getNode(0);
}
@BeforeClass
public static void beforeClass() throws Exception {
System.out.println("beforeClass");
if (!isLoggined) {
// SWTBotView welcomeView = bot.viewByTitle("Welcome");
// if (welcomeView != null)
// welcomeView.close();
bot.perspectiveByLabel("MDM").activate();
view.show();
initRepositoryView();
//importDemo();
bot.waitUntil(Conditions.widgetIsEnabled(repositoryTree),
ONE_MINUTE_IN_MILLISEC * 10);
isLoggined = true;
}
}
private static void importDemo() {
repositoryItem.contextMenu("Import Items").click();
SWTBotShell shell=bot.shell("Import Repository items");
shell.activate();
bot.radio("Select archive file:").click();
bot.button("Import from Talend Exchange").click();
SWTBotShell importDstarShell = bot
.shell("Import from Talend Exchange options");
importDstarShell.activate();
bot.table().select(1);
bot.button("OK").click();
bot.waitUntil(Conditions.shellIsActive("Import Repository items"));
bot.waitUntil(Conditions.shellCloses(importDstarShell));
sleep(10);
bot.button("Finish").click();
bot.waitUntil(Conditions.shellCloses(shell));
sleep();
bot.shell("Confirm Overwrite").activate();
bot.button("Yes To All").click();
bot.waitUntil(
Conditions.shellCloses(bot.shell("Progress Information")),
ONE_MINUTE_IN_MILLISEC * 10);
}
@AfterClass
public static void AfterClass() {
System.out.println("AfterClass");
// logout();
bot.sleep(2000);
}
protected static void sleep() {
bot.sleep(1000);
}
protected static void sleep(int count) {
bot.sleep(1000 * count);
}
}

View File

@@ -0,0 +1,168 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.AfterClass;
import org.junit.BeforeClass;
/**
*
* SWTBot test super class for MDM Repository View
*/
public class SWTBotForMDMServiewView {
protected static SWTWorkbenchBot bot = new SWTWorkbenchBot();
protected static SWTBotTreeItem serverItem;
private static SWTBotTree serverTree;
private static Tree swtTree;
private static boolean isLoggined = false;
private static final long ONE_MINUTE_IN_MILLISEC = 60000;
public static void login() {
bot.viewByTitle("MDM Server").toolbarButton("Add MDM Server Location")
.click();
SWTBotShell shell = bot.shell("Talend MDM Studio Login");
bot.waitUntil(Conditions.shellIsActive("Talend MDM Studio Login"),
ONE_MINUTE_IN_MILLISEC * 10);
shell.activate();
sleep();
bot.comboBoxWithLabel("Description(*)").setText("administrator");
sleep();
bot.textWithLabel("Username").setText("admin");
sleep();
bot.textWithLabel("Password").setText("talend");
sleep();
if (bot.comboBoxWithLabel("Version").itemCount() > 0)
bot.comboBoxWithLabel("Version").setSelection(0);
sleep();
bot.checkBox("Save this MDM Server Location").select();
sleep();
bot.button("OK").click();
bot.waitUntil(
Conditions.shellCloses(bot.shell("Progress Information")),
ONE_MINUTE_IN_MILLISEC * 10);
}
private static void initServerView() {
final SWTBotView view = bot
.viewById("org.talend.mdm.workbench.views.ServerView");
view.show();
view.setFocus();
// bot.perspectiveById("org.talend.mdm.perstective").activate();
view.getWidget().getDisplay().syncExec(new Runnable() {
public void run() {
// SWTBotTree
// tree=bot.treeWithLabel("http://localhost:8080/talend/TalendPort[HEAD] admin");
Composite comp = (Composite) view.getWidget();
comp = (Composite) comp.getChildren()[0];
swtTree = (Tree) comp.getChildren()[0];
}
});
serverTree = new SWTBotTree(swtTree);
serverItem = serverTree
.expandNode("http://localhost:8080/talend/TalendPort [HEAD] admin");
serverItem.expand();
}
@BeforeClass
public static void beforeClass() throws Exception {
System.out.println("beforeClass");
if (!isLoggined) {
// SWTBotView welcomeView = bot.viewByTitle("Welcome");
// if (welcomeView != null)
// welcomeView.close();
bot.menu("Window").menu("Open Perspective").menu("Other...")
.click();
final SWTBotShell shellShowView = bot.shell("Open Perspective");
bot.waitUntil(Conditions.shellIsActive("Open Perspective"));
shellShowView.widget.getDisplay().syncExec(new Runnable() {
public void run() {
shellShowView.widget.setSize(new Point(300, 600));
}
});
shellShowView.activate();
bot.table().select("MDM");
bot.button("OK").click();
bot.perspectiveByLabel("MDM").activate();
bot.viewByTitle("MDM Server").show();
login();
initServerView();
importDemo();
bot.waitUntil(Conditions.widgetIsEnabled(serverTree),
ONE_MINUTE_IN_MILLISEC * 10);
isLoggined = true;
}
}
private static void importDemo() {
serverItem.contextMenu("Import").click();
bot.shell("Import Objects").activate();
bot.radio("Select archive file:").click();
bot.button("Import from Talend Exchange").click();
SWTBotShell importDstarShell = bot
.shell("Import from Talend Exchange options");
importDstarShell.activate();
bot.table().select(1);
bot.button("OK").click();
bot.waitUntil(Conditions.shellIsActive("Import Objects"));
SWTBotShell shell = bot.shell("Import Objects");
bot.waitUntil(Conditions.shellCloses(importDstarShell));
sleep(10);
bot.button("Finish").click();
bot.waitUntil(Conditions.shellCloses(shell));
sleep();
bot.shell("Confirm Overwrite").activate();
bot.button("Yes To All").click();
bot.waitUntil(
Conditions.shellCloses(bot.shell("Progress Information")),
ONE_MINUTE_IN_MILLISEC * 10);
}
@AfterClass
public static void AfterClass() {
System.out.println("AfterClass");
// logout();
bot.sleep(2000);
}
public static void logout() {
serverItem.contextMenu("Logout").click();
}
protected static void sleep() {
bot.sleep(1000);
}
protected static void sleep(int count) {
bot.sleep(1000 * count);
}
}

View File

@@ -0,0 +1,61 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.common;
import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.junit.After;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
/**
* DOC rhou class global comment. Detailled comment
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class ImportObjectsTest extends SWTBotForMDMServiewView {
private static final long ONE_MINUTE_IN_MILLISEC = 60000;
@Before
public void runBeforeEveryTest() {
}
@After
public void runAfterEveryTest() {
}
// @Test
public void importObjectsTest() {
serverItem.contextMenu("Import").click();
bot.shell("Import Objects").activate();
bot.radio("Select archive file:").click();
bot.button("Import from Talend Exchange").click();
bot.shell("Import from Talend Exchange options").activate();
bot.table().select(1);
bot.button("OK").click();
bot.waitUntil(Conditions.shellIsActive("Import Objects"));
SWTBotShell shell = bot.shell("Import Objects");
sleep(10);
bot.button("Finish").click();
bot.waitUntil(Conditions.shellCloses(shell));
sleep();
bot.shell("Confirm Overwrite").activate();
bot.button("Yes To All").click();
bot.waitUntil(
Conditions.shellCloses(bot.shell("Progress Information")),
ONE_MINUTE_IN_MILLISEC * 10);
}
}

View File

@@ -0,0 +1,61 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.common.copy;
import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.junit.After;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
/**
* DOC rhou class global comment. Detailled comment
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class ImportObjectsTest extends SWTBotForMDMServiewView {
private static final long ONE_MINUTE_IN_MILLISEC = 60000;
@Before
public void runBeforeEveryTest() {
}
@After
public void runAfterEveryTest() {
}
// @Test
public void importObjectsTest() {
serverItem.contextMenu("Import").click();
bot.shell("Import Objects").activate();
bot.radio("Select archive file:").click();
bot.button("Import from Talend Exchange").click();
bot.shell("Import from Talend Exchange options").activate();
bot.table().select(1);
bot.button("OK").click();
bot.waitUntil(Conditions.shellIsActive("Import Objects"));
SWTBotShell shell = bot.shell("Import Objects");
sleep(10);
bot.button("Finish").click();
bot.waitUntil(Conditions.shellCloses(shell));
sleep();
bot.shell("Confirm Overwrite").activate();
bot.button("Yes To All").click();
bot.waitUntil(
Conditions.shellCloses(bot.shell("Progress Information")),
ONE_MINUTE_IN_MILLISEC * 10);
}
}

View File

@@ -0,0 +1,72 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.datacontainer;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
import com.amalto.workbench.editors.DataClusterBrowserMainPage;
import com.amalto.workbench.editors.XObjectBrowser;
/**
* DataContainerContentOperationTest is SWTBot test class to test the operation
* on the records.
*
* DOC rhou class global comment. Detailled comment
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class DataContainerContentTest extends SWTBotForMDMServiewView {
private SWTBotTreeItem dataContainerItem;
@Before
public void runBeforeEveryTest() {
dataContainerItem = serverItem.getNode("Data Container");
dataContainerItem.expand();
}
@After
public void runAfterEveryTest() {
bot.activeEditor().close();
}
// @Test
public void recordEditTest() {
SWTBotTreeItem node = dataContainerItem.expandNode("System").getNode(
"PROVISIONING");
node.doubleClick();
bot.buttonWithTooltip("Search").click();
sleep(2);
XObjectBrowser ep = (XObjectBrowser) bot.activeEditor().getReference()
.getPart(true);
Assert.assertNotNull(ep);
DataClusterBrowserMainPage mainpage = (DataClusterBrowserMainPage) ep
.getPage(0);
Assert.assertNotNull(mainpage);
Table table = mainpage.getResultsViewer().getTable();
SWTBotTable conceptBotTable = new SWTBotTable(table);
Assert.assertNotNull(conceptBotTable);
conceptBotTable.select(1, 1);
bot.table().contextMenu("Commit").click();
SWTBotShell newDataContainerShell = bot.shell("XML Editor/Viewer");
newDataContainerShell.activate();
}
}

View File

@@ -0,0 +1,146 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.datamodel;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.Activator;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
import org.talend.swtbot.mdm.test.serverview.util.Util;
/**
* DataModelContentOperationTest is a SWTBot test class to test the operation
* associated with the import,export.
*
* DOC rhou class global comment. Detailled comment
*
* see bug 0017197.
*
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class DataModelContentTest extends SWTBotForMDMServiewView {
private String DSTAR_DATAMODEL = "DStar.xsd";
private SWTBotTreeItem dataModelItem;
@Before
public void runBeforeEveryTest() {
dataModelItem = serverItem.getNode("Data Model [HEAD]");
dataModelItem.expand();
dataModelItem.contextMenu("New").click();
SWTBotShell newDataModelShell = bot.shell("New Data Model");
newDataModelShell.activate();
SWTBotText text = bot
.textWithLabel("Enter a name for the New Instance");
text.setText("TestDataModel");
sleep();
bot.buttonWithTooltip("Add").click();
sleep();
bot.button("OK").click();
sleep();
}
@After
public void runAfterEveryTest() {
bot.activeEditor().save();
bot.activeEditor().close();
dataModelItem.getNode("TestDataModel").contextMenu("Delete").click();
sleep();
bot.button("OK").click();
sleep();
}
// @Test
public void importXSDTest() throws IOException, URISyntaxException {
// File sourceFile = null;
// try {
// sourceFile = new
// File(FileLocator.toFileURL(Platform.getBundle(Activator.PLUGIN_ID).getEntry("testDocuments"))
// .getPath().substring(1)
// + "testImport.xsd");
// } catch (IOException e1) {
// e1.printStackTrace();
// }
// File targetFile = new
// File(Platform.getInstanceLocation().getURL().getPath().substring(1) +
// "testImport.xsd");
//
// try {
// if (sourceFile != null)
// Util.copyFile(sourceFile, targetFile);
// } catch (Exception e1) {
// e1.printStackTrace();
// }
bot.buttonWithTooltip("Import...").click();
// // TODO: now SWTBot doesn't support native SWT dialogs,so this needs
// more investigation.
// /*
// * SWTBotShell importDataModelShell =
// bot.shell("Select the XML definition for XML Schema");
// * importDataModelShell.activate();
// bot.comboBox(1).setText("testxsd");
// * System.out.println(bot.comboBox(1).getText() + "test");
// bot.button("Open(O)").click();
// */
Util.getFileFromCurrentPluginSampleFolder(DSTAR_DATAMODEL)
.getAbsolutePath();
}
// @Test
public void importXSDSchemaFromLocalTest() {
File sourceFile = null;
try {
sourceFile = new File(FileLocator
.toFileURL(
Platform.getBundle(Activator.PLUGIN_ID).getEntry(
"testDocuments")).getPath().substring(1)
+ "testImport.xsd");
} catch (IOException e1) {
e1.printStackTrace();
}
File targetFile = new File(Platform.getInstanceLocation().getURL()
.getPath().substring(1)
+ "testImport.xsd");
try {
if (sourceFile != null)
Util.copyFile(sourceFile, targetFile);
} catch (Exception e1) {
e1.printStackTrace();
}
bot.buttonWithTooltip("import/include specific Schema Namespace ...")
.click();
SWTBotShell importXSDSchemaShell = bot
.shell("Import xsd schema modules");
importXSDSchemaShell.activate();
bot.button("Add xsd from local").click();
/*
* bot.comboBox(0).setText("testxsd");
* System.out.println(bot.comboBox(1).getText() + "test");
* bot.button("Open(O)").click();
*/
}
}

View File

@@ -0,0 +1,440 @@
package org.talend.swtbot.mdm.test.serverview.datamodel;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.waits.Conditions;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
import com.amalto.workbench.editors.DataModelMainPage;
import com.amalto.workbench.editors.xsdeditor.XSDEditor;
@RunWith(SWTBotJunit4ClassRunner.class)
public class DataModelSchemaElementOperationTest extends SWTBotForMDMServiewView {
private SWTBotTree conceptBotTree;
private DataModelMainPage mainpage;
private SWTBotTreeItem entityNode;
private SWTBotTreeItem elementNode;
private SWTBotTreeItem groupItem;
private SWTBotTreeItem dataModelItem;
@Before
public void runBeforeEveryTest() {
dataModelItem = serverItem.getNode("Data Model [HEAD]");
dataModelItem.expand();
dataModelItem.contextMenu("New").click();
SWTBotShell newDataContainerShell = bot.shell("New Data Model");
newDataContainerShell.activate();
SWTBotText text = bot
.textWithLabel("Enter a name for the New Instance");
text.setText("TestDataModel");
sleep();
bot.buttonWithTooltip("Add").click();
sleep();
bot.button("OK").click();
sleep();
Assert.assertNotNull(dataModelItem.getNode("TestDataModel"));
sleep(2);
final SWTBotEditor editor = bot.editorByTitle("TestDataModel");
Display.getDefault().syncExec(new Runnable() {
public void run() {
XSDEditor ep = (XSDEditor) editor.getReference().getPart(true);
mainpage = (DataModelMainPage) ep.getSelectedPage();
}
});
Tree conceptTree = mainpage.getElementsViewer().getTree();
conceptBotTree = new SWTBotTree(conceptTree);
newEntity();
newElement();
}
@After
public void runAfterEveryTest() {
Display.getDefault().syncExec(new Runnable() {
public void run() {
mainpage.doSave(new NullProgressMonitor());
bot.activeEditor().close();
}
});
dataModelItem.getNode("TestDataModel").contextMenu("Delete").click();
bot.button("OK").click();
}
public void newEntity() {
conceptBotTree.contextMenu("New Entity").click();
SWTBotShell newEntityShell = bot.shell("New Entity");
newEntityShell.activate();
// create a entity with a complex type
bot.textWithLabel("Name:").setText("ComplexTypeEntity");
sleep();
bot.button("OK").click();
sleep(2);
entityNode = conceptBotTree.getTreeItem("ComplexTypeEntity");
entityNode.select();
bot.toolbarButtonWithTooltip("Expand...", 0).click();
}
public void newElement() {
groupItem = entityNode.getNode("ComplexTypeEntityType");
groupItem.contextMenu("Add Element").click();
SWTBotShell newElementShell = bot.shell("Add a new Business Element");
newElementShell.activate();
bot.textWithLabel("Business Element Name").setText("Ele");
sleep();
bot.button("OK").click();
sleep(2);
elementNode = groupItem.expand().getNode("Ele [0...1]");
elementNode.select();
}
// new feature in 4.2,see bug 0017128
@Test
public void autoPlaceCursorTest() {
elementNode.select();
bot.cTabItem(1).activate();
sleep();
bot.cTabItem(2).activate();
entityNode = conceptBotTree.getTreeItem("ComplexTypeEntity");
entityNode.select();
bot.toolbarButtonWithTooltip("Expand...", 0).click();
}
@Test
public void editElementTest() {
elementNode.contextMenu("Edit Element").click();
SWTBotShell newEleShell = bot.shell("Edit Business Element");
newEleShell.activate();
bot.textWithLabel("Business Element Name").setText("ConceptTest");
sleep();
bot.button("OK").click();
sleep(2);
Assert.assertNotNull(groupItem.getNode("ConceptTest [0...1]"));
}
@Test
public void addElementTest() {
// SWTBotTreeItem groupItem = conceptNode.getNode("ReportingType");
elementNode.contextMenu("Add Element (after)").click();
SWTBotShell newEntityShell = bot.shell("Add a new Business Element");
newEntityShell.activate();
bot.textWithLabel("Business Element Name").setText("testElement");
sleep();
bot.button("OK").click();
sleep(2);
Assert.assertNotNull(groupItem.getNode("testElement [0...1]"));
}
// @Test
public void copyElementTest() {
// TODO:I can not paste a element after I copy the element.
elementNode.contextMenu("Copy Element").click();
sleep();
elementNode.contextMenu("Paste Element").click();
sleep();
SWTBotShell saveShell = bot.shell("Paste Element");
saveShell.activate();
bot.button("OK").click();
sleep();
}
@Test
public void changeToComplexTypeTest() {
elementNode.contextMenu("Change to a Complex Type").click();
sleep();
SWTBotShell changeTypeShell = bot.shell("Complex Type Properties");
changeTypeShell.activate();
bot.radio("Sequence").click();
bot.button("OK").click();
sleep(2);
// TODO:need assertion
}
@Test
public void changeToSimpleTypeTest() {
elementNode.contextMenu("Change to a Simple Type").click();
sleep();
SWTBotShell changeTypeShell = bot.shell("Make Simple Type");
changeTypeShell.activate();
bot.radio("Custom").click();
sleep();
bot.ccomboBoxWithLabel("Type").setSelection(0);
sleep();
bot.button("OK").click();
sleep(2);
}
@Test
public void setLabelsTest() {
elementNode.contextMenu("Set the Labels").click();
sleep();
SWTBotShell shell = bot.shell("Set the Labels");
shell.activate();
bot.comboBox().setSelection(0);
bot.text().setText("en");
bot.buttonWithTooltip("Add").click();
sleep();
bot.comboBox().setSelection(1);
bot.text().setText("fr");
bot.buttonWithTooltip("Add").click();
sleep();
bot.table().select(1);
bot.buttonWithTooltip("Del").click();
sleep();
bot.button("OK").click();
sleep();
Assert.assertNotNull(elementNode.expand().getNode("Annotations")
.expand().getNode("English Label: en"));
}
@Test
public void setDescriptionsTest() {
elementNode.contextMenu("Set the Descriptions").click();
sleep();
SWTBotShell shell = bot.shell("Set the Descriptions of This Element");
shell.activate();
bot.comboBox().setSelection(0);
bot.text().setText("enlish description");
bot.buttonWithTooltip("Add").click();
sleep();
bot.comboBox().setSelection(1);
bot.text().setText("french description");
bot.buttonWithTooltip("Add").click();
sleep();
bot.table().select(1);
bot.buttonWithTooltip("Del").click();
bot.button("OK").click();
sleep();
Assert.assertNotNull(elementNode.expand().getNode("Annotations")
.expand().getNode("English Description: enlish description"));
sleep();
}
@Test
public void setWriteAccessTest() {
elementNode.contextMenu("Set the Roles with Write Access").click();
SWTBotShell newViewShell = bot
.shell("Set The Roles That Have Write Access");
newViewShell.activate();
bot.ccomboBox().setSelection("System_Web");
bot.buttonWithTooltip("Add").click();
bot.ccomboBox().setSelection("System_Admin");
bot.buttonWithTooltip("Add").click();
bot.table().select(0);
bot.buttonWithTooltip("Move down the selected item").click();
sleep(2);
bot.buttonWithTooltip("Move up the selected item").click();
sleep(2);
bot.table().select("System_Web");
bot.buttonWithTooltip("Delete the selected item").click();
sleep();
bot.button("OK").click();
Assert.assertNotNull(elementNode.expand().getNode("Annotations")
.expand().getNode("Writable By : System_Admin"));
sleep();
}
@Test
public void setNoAccessTest() {
elementNode.contextMenu("Set the Roles with No Access").click();
SWTBotShell newViewShell = bot
.shell("Set The Roles That Cannot Access This Field");
newViewShell.activate();
bot.ccomboBox().setSelection("System_Web");
bot.buttonWithTooltip("Add").click();
bot.ccomboBox().setSelection("System_Admin");
bot.buttonWithTooltip("Add").click();
bot.table().select(0);
bot.buttonWithTooltip("Move down the selected item").click();
sleep(2);
bot.buttonWithTooltip("Move up the selected item").click();
sleep(2);
bot.table().select("System_Admin");
bot.buttonWithTooltip("Delete the selected item").click();
sleep();
bot.button("OK").click();
sleep();
Assert.assertNotNull(elementNode.expand().getNode("Annotations")
.expand().getNode("No Access to : System_Web"));
}
// @Test
public void setWorkflowAccessTest() {
// TODO:check this action
elementNode.contextMenu("Set the Workflow Access").click();
SWTBotShell shell = bot.shell("Set the Workflow Access");
shell.activate();
}
@Test
public void setForeignKeyTest() {
Display.getDefault().syncExec(new Runnable() {
public void run() {
mainpage.doSave(new NullProgressMonitor());
}
});
elementNode.contextMenu("Set the Foreign Key").click();
SWTBotShell shell = bot.shell("Set the Foreign Key");
shell.activate();
bot.buttonWithTooltip("Select xpath").click();
// test the filter of the composite by meanwhile.
bot.textWithLabel("Filter:").setText("R");
sleep();
bot.textWithLabel("Filter:").setText("U");
sleep();
bot.textWithLabel("Filter:").setText("");
sleep();
bot.tree().select("ComplexTypeEntity");
sleep();
bot.button("Add").click();
sleep();
shell = bot.shell("Set the Foreign Key");
shell.activate();
bot.button("OK").click();
Assert.assertNotNull(elementNode.expand().getNode("Annotations")
.expand().getNode("Foreign Key: ComplexTypeEntity"));
}
@Test
public void setForeignKeyFilterTest() {
Display.getDefault().syncExec(new Runnable() {
public void run() {
mainpage.doSave(new NullProgressMonitor());
}
});
elementNode.contextMenu("Set the Foreign Key Filter").click();
SWTBotShell shell = bot.shell("Set Foreign Key Filter");
shell.activate();
bot.buttonWithTooltip("Add").click();
bot.table().click(0, 2);
// bot.buttonWithTooltip("Select Xpath").click();
//
// bot.tree().expandNode("BrowseItem").expandNode("anonymous type")
// .select("Owner");
// sleep();
// bot.button("Add").click();
// sleep();
//
// // bot.textInGroup("Custom filters").setText("filter");
// sleep();
bot.button("OK").click();
// Assert.assertNotNull(elementNode.expand().getNode("Annotations")
// .expand().getNode("Foreign Key Filter: Reporting"));
}
@Test
public void setForeignKeyInfoTest() {
Display.getDefault().syncExec(new Runnable() {
public void run() {
mainpage.doSave(new NullProgressMonitor());
}
});
elementNode.contextMenu("Set the Foreign Key Infos").click();
SWTBotShell shell = bot.shell("Set the Foreign Key Infos");
shell.activate();
bot.buttonWithTooltip("Select xpath").click();
SWTBotShell shell1 = bot.shell("Select Xpath ...");
shell1.activate();
bot.tree().select(0);
bot.button("Add").click();
bot.waitUntil(Conditions.shellCloses(shell1));
shell.activate();
bot.button("Ok").click();
}
@Test
public void setFacetTest() {
elementNode.contextMenu("Set the facet message").click();
sleep();
SWTBotShell shell = bot
.shell("Set multilingual facet error messages for the content of this element");
shell.activate();
bot.comboBox().setSelection(0);
bot.text().setText("test error facet in English");
bot.buttonWithTooltip("Add").click();
sleep();
bot.comboBox().setSelection(1);
bot.text().setText("test error facet in French");
bot.buttonWithTooltip("Add").click();
sleep();
bot.table().select(1);
bot.buttonWithTooltip("Del").click();
sleep();
bot.button("OK").click();
sleep();
Assert.assertNotNull(elementNode.expand().getNode("Annotations")
.expand().getNode("Facet_Msg_EN: test error facet in English"));
}
@Test
public void setDisplayFormatTest() {
elementNode.contextMenu("Set the display format").click();
sleep();
SWTBotShell shell = bot
.shell("Set the display format for the content of this element");
shell.activate();
bot.comboBox().setSelection(0);
bot.text().setText("test error format in English");
bot.buttonWithTooltip("Add").click();
sleep();
bot.comboBox().setSelection(1);
bot.text().setText("test error format in French");
bot.buttonWithTooltip("Add").click();
sleep();
bot.table().select(1);
bot.buttonWithTooltip("Del").click();
sleep();
bot.button("OK").click();
sleep();
}
// @Test
public void copyXpathTest() {
// TODO:it dose nothing now,need to check
elementNode.contextMenu("Copy Xpath").click();
sleep();
}
@Test
public void newEntityTest() {
elementNode.contextMenu("New Entity").click();
SWTBotShell newEntityShell = bot.shell("New Entity");
newEntityShell.activate();
// create a entity with a complex type
bot.textWithLabel("Name:").setText("ComplexTypeEntity1");
sleep();
bot.button("OK").click(); // create a entity with a simple type
sleep(2);
}
}

View File

@@ -0,0 +1,377 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.datamodel;
import junit.framework.Assert;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
import com.amalto.workbench.editors.DataModelMainPage;
import com.amalto.workbench.editors.xsdeditor.XSDEditor;
/**
*
*
* DOC rhou class global comment. Detailled comment
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class DataModelSchemaEntityOperationTest extends SWTBotForMDMServiewView {
private SWTBotTree conceptBotTree;
private DataModelMainPage mainpage;
private SWTBotTreeItem dataModelItem;
private SWTBotTreeItem conceptNode;
@Before
public void runBeforeEveryTest() {
dataModelItem = serverItem.getNode("Data Model [HEAD]");
dataModelItem.expand();
if (dataModelItem.getNodes().contains("TestDataModel"))
dataModelItem.getNode("TestDataModel").doubleClick();
else
newDatamodel();
final SWTBotEditor editor = bot.editorByTitle("TestDataModel");
Display.getDefault().syncExec(new Runnable() {
public void run() {
XSDEditor ep = (XSDEditor) editor.getReference().getPart(true);
mainpage = (DataModelMainPage) ep.getSelectedPage();
}
});
Tree conceptTree = mainpage.getElementsViewer().getTree();
conceptBotTree = new SWTBotTree(conceptTree);
newEntity();
}
private void newDatamodel() {
dataModelItem.contextMenu("New").click();
SWTBotShell newDataContainerShell = bot.shell("New Data Model");
newDataContainerShell.activate();
SWTBotText text = bot
.textWithLabel("Enter a name for the New Instance");
text.setText("TestDataModel");
sleep();
bot.buttonWithTooltip("Add").click();
sleep();
bot.button("OK").click();
sleep();
Assert.assertNotNull(dataModelItem.getNode("TestDataModel"));
sleep(2);
}
@After
public void runAfterEveryTest() {
Display.getDefault().syncExec(new Runnable() {
public void run() {
mainpage.doSave(new NullProgressMonitor());
bot.activeEditor().close();
}
});
dataModelItem.getNode("TestDataModel").contextMenu("Delete").click();
bot.button("OK").click();
}
private void newEntity() {
conceptBotTree.contextMenu("New Entity").click();
SWTBotShell newEntityShell = bot.shell("New Entity");
newEntityShell.activate();
// create a entity with a complex type
bot.textWithLabel("Name:").setText("ComplexTypeEntity");
sleep();
bot.button("OK").click();
sleep(2);
conceptNode = conceptBotTree.getTreeItem("ComplexTypeEntity");
conceptNode.select();
bot.toolbarButtonWithTooltip("Expand...", 0).click();
}
private void newElement() {
conceptBotTree.getTreeItem("ComplexTypeEntity")
.getNode("ComplexTypeEntityType").contextMenu("Add Element")
.click();
SWTBotShell newElementShell = bot.shell("Add a new Business Element");
newElementShell.activate();
bot.textWithLabel("Business Element Name").setText("Ele");
sleep();
bot.button("OK").click();
sleep(2);
conceptNode = conceptBotTree.getTreeItem("ComplexTypeEntity");
conceptNode.select();
bot.toolbarButtonWithTooltip("Expand...").click();
}
@Test
public void newEntityTest() {
conceptNode.contextMenu("New Entity").click();
SWTBotShell newEntityShell = bot.shell("New Entity");
newEntityShell.activate();
// create a entity with a complex type
bot.textWithLabel("Name:").setText("newEntity");
sleep();
bot.button("OK").click();
sleep(2);
}
@Test
public void deleteEntityTest() {
conceptNode.select();
conceptNode.contextMenu("Delete Entity").click();
sleep();
}
@Test
public void editEntityTest() {
conceptNode.contextMenu("Edit Entity").click();
SWTBotShell editEntityShell = bot.shell("Edit Entity");
editEntityShell.activate();
bot.textWithLabel("Enter a new Name for the Entity").setText(
"EditEntity");
sleep();
bot.button("OK").click();
sleep(2);
Assert.assertEquals("EditEntity", conceptNode.getText());
// new feature in 4.2,see bug 0017070:
// Assert.assertNotNull(conceptNode.getNode("EditEntity"));
}
@Test
public void generateDefaultViewTest() {
bot.activeEditor().save();
conceptNode.contextMenu("Generate default Browse Items Views").click();
sleep();
SWTBotShell generateViewShell = bot
.shell("Generate default Browse Items Views");
generateViewShell.activate();
bot.button("Finish").click();
}
// @Test
public void copyEntityTest() {
conceptNode.contextMenu("Copy Entity").click();
sleep();
conceptNode.select();
conceptNode.contextMenu("Paste Entity").click();
sleep();
SWTBotShell saveShell = bot.shell("Copy Entity");
saveShell.activate();
bot.button("OK").click();
sleep();
}
@Test
public void changeToSimpleTypeTest() {
conceptNode.contextMenu("Change to a Simple Type").click();
sleep();
SWTBotShell changeTypeShell = bot.shell("Make Simple Type");
changeTypeShell.activate();
bot.radio("Custom").click();
sleep();
bot.ccomboBoxWithLabel("Type").setSelection(1);
sleep();
bot.button("OK").click();
sleep(2);
}
@Test
public void changeToComplexTypeTest() {
conceptNode.contextMenu("Change to a Complex Type").click();
sleep();
SWTBotShell changeTypeShell = bot.shell("Complex Type Properties");
changeTypeShell.activate();
bot.radio("Sequence").click();
bot.button("OK").click();
sleep(2);
}
@Test
public void addKeyTest() {
conceptNode.contextMenu("Add Key").click();
sleep();
SWTBotShell changeTypeShell = bot.shell("Add a new Key");
changeTypeShell.activate();
bot.ccomboBox(1).setSelection(1);
bot.text().setText("Test");
bot.button("OK").click();
}
@Test
public void setLabelsTest() {
conceptNode.contextMenu("Set the Labels").click();
sleep();
SWTBotShell shell = bot.shell("Set the Labels");
shell.activate();
bot.comboBox().setSelection(0);
bot.text().setText("en");
bot.buttonWithTooltip("Add").click();
sleep();
bot.comboBox().setSelection(1);
bot.text().setText("fr");
bot.buttonWithTooltip("Add").click();
sleep();
bot.table().select(1);
bot.buttonWithTooltip("Del").click();
sleep();
bot.button("OK").click();
sleep();
}
@Test
public void setDescriptionsTest() {
conceptNode.contextMenu("Set the Descriptions").click();
sleep();
SWTBotShell shell = bot.shell("Set the Descriptions of This Element");
shell.activate();
bot.comboBox().setSelection(0);
bot.text().setText("enlish descriptions");
bot.buttonWithTooltip("Add").click();
sleep();
bot.comboBox().setSelection(1);
bot.text().setText("french descriptions");
bot.buttonWithTooltip("Add").click();
sleep();
bot.table().select(1);
bot.buttonWithTooltip("Del").click();
sleep();
bot.button("OK").click();
}
@Test
public void setLookupFieldsTest() {
newElement();
conceptNode.contextMenu("Set Lookup Fields").click();
sleep();
SWTBotShell shell = bot.shell("Set Lookup Fields");
shell.activate();
bot.ccomboBox().setSelection(0);
bot.buttonWithTooltip("Add").click();
bot.ccomboBox().setSelection(1);
bot.buttonWithTooltip("Add").click();
bot.table().select(0);
bot.buttonWithTooltip("Move down the selected item").click();
sleep(2);
bot.buttonWithTooltip("Move up the selected item").click();
sleep(2);
bot.table().select(1);
bot.buttonWithTooltip("Delete the selected item").click();
sleep();
bot.button("OK").click();
}
@Test
public void setWriteAccessTest() {
conceptNode.contextMenu("Set the Roles with Write Access").click();
SWTBotShell newViewShell = bot
.shell("Set The Roles That Have Write Access");
newViewShell.activate();
bot.ccomboBox().setSelection(0);
bot.buttonWithTooltip("Add").click();
bot.ccomboBox().setSelection(1);
bot.buttonWithTooltip("Add").click();
bot.table().select(0);
bot.buttonWithTooltip("Move down the selected item").click();
sleep(2);
bot.buttonWithTooltip("Move up the selected item").click();
sleep(2);
bot.table().select(0);
bot.buttonWithTooltip("Delete the selected item").click();
sleep();
bot.button("OK").click();
sleep();
}
@Test
public void setNoAccessTest() {
conceptNode.contextMenu("Set the Roles with No Access").click();
SWTBotShell newViewShell = bot
.shell("Set The Roles That Cannot Access This Field");
newViewShell.activate();
bot.ccomboBox().setSelection(0);
bot.buttonWithTooltip("Add").click();
bot.ccomboBox().setSelection(1);
bot.buttonWithTooltip("Add").click();
bot.table().select(0);
bot.buttonWithTooltip("Move down the selected item").click();
sleep(2);
bot.buttonWithTooltip("Move up the selected item").click();
sleep(2);
bot.table().select(1);
bot.buttonWithTooltip("Delete the selected item").click();
sleep();
bot.button("OK").click();
sleep();
}
// @Test
public void setWorkflowAccessTest() {
conceptNode.contextMenu("Set the Workflow Access").click();
SWTBotShell shell = bot.shell("Set the Workflow Access");
shell.activate();
bot.buttonWithTooltip("Add Multiple").click();
bot.button("OK").click();
}
@Test
public void genarateWorkflowTest() {
conceptNode.contextMenu("Genarate Workflow").click();
SWTBotShell shell = bot.shell("Genarate Workflow");
shell.activate();
bot.buttonWithTooltip("Add").click();
bot.button("OK").click();
}
// @Test
public void addValidationRuleTest() {
conceptNode.contextMenu("Set the Validation Rule").click();
SWTBotShell shell = bot.shell("Add a Validation Rule");
shell.activate();
bot.text().setText("vadation rule");
bot.buttonWithTooltip("Add").click();
bot.button("OK").click();
}
// @Test
public void deleteValidationRuleTest() {
conceptNode.contextMenu("Delete All Validation Rules").click();
SWTBotShell shell = bot.shell("Confirm");
shell.activate();
bot.button("OK").click();
}
}

View File

@@ -0,0 +1,147 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.datamodel;
import junit.framework.Assert;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
import com.amalto.workbench.editors.DataModelMainPage;
import com.amalto.workbench.editors.xsdeditor.XSDEditor;
@RunWith(SWTBotJunit4ClassRunner.class)
public class DataModelSchemaGroupOperationTest extends SWTBotForMDMServiewView {
private SWTBotTree conceptBotTree;
private DataModelMainPage mainpage;
private SWTBotTreeItem dataModelItem;
private SWTBotTreeItem groupNode;
@Before
public void runBeforeEveryTest() {
dataModelItem = serverItem.getNode("Data Model [HEAD]");
dataModelItem.expand();
if (dataModelItem.getNodes().contains("TestDataModel"))
dataModelItem.getNode("TestDataModel").doubleClick();
else
newDatamodel();
final SWTBotEditor editor = bot.editorByTitle("TestDataModel");
Display.getDefault().syncExec(new Runnable() {
public void run() {
XSDEditor ep = (XSDEditor) editor.getReference().getPart(true);
mainpage = (DataModelMainPage) ep.getSelectedPage();
}
});
Tree conceptTree = mainpage.getElementsViewer().getTree();
conceptBotTree = new SWTBotTree(conceptTree);
newEntity();
}
private void newDatamodel() {
dataModelItem.contextMenu("New").click();
SWTBotShell newDataContainerShell = bot.shell("New Data Model");
newDataContainerShell.activate();
SWTBotText text = bot
.textWithLabel("Enter a name for the New Instance");
text.setText("TestDataModel");
sleep();
bot.buttonWithTooltip("Add").click();
sleep();
bot.button("OK").click();
sleep();
Assert.assertNotNull(dataModelItem.getNode("TestDataModel"));
sleep(2);
}
private void newEntity() {
conceptBotTree.contextMenu("New Entity").click();
SWTBotShell newEntityShell = bot.shell("New Entity");
newEntityShell.activate();
// create a entity with a complex type
bot.textWithLabel("Name:").setText("ComplexTypeEntity");
sleep();
bot.button("OK").click();
sleep(2);
groupNode = conceptBotTree.getTreeItem("ComplexTypeEntity").expand()
.getNode("ComplexTypeEntityType");
}
@After
public void runAfterEveryTest() {
Display.getDefault().syncExec(new Runnable() {
public void run() {
mainpage.doSave(new NullProgressMonitor());
bot.activeEditor().close();
}
});
dataModelItem.getNode("TestDataModel").contextMenu("Delete").click();
bot.button("OK").click();
}
// new feature in 4.2,See bug 0012073
@Test
public void addElementTest() {
groupNode.contextMenu("Add Element").click();
SWTBotShell newEntityShell = bot.shell("Add a new Business Element");
newEntityShell.activate();
// create a entity with a complex type
bot.textWithLabel("Business Element Name").setText("testElement");
sleep();
bot.button("OK").click(); // create a entity with a simple type
sleep(2);
}
@Test
public void changeSubElementGroupTest() {
groupNode.contextMenu("Change Sub-Element Group").click();
sleep();
SWTBotShell changeTypeShell = bot.shell("Complex Type Properties");
changeTypeShell.activate();
bot.radio("Choice").click();
bot.button("OK").click();
sleep(2);
}
@Test
public void newEntityTest() {
groupNode.contextMenu("New Entity").click();
SWTBotShell newEntityShell = bot.shell("New Entity");
newEntityShell.activate();
// create a entity with a complex type
bot.textWithLabel("Name:").setText("ComplexEntity");
sleep();
bot.button("OK").click(); // create a entity with a simple type
sleep(2);
}
}

View File

@@ -0,0 +1,165 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.datamodel;
import junit.framework.Assert;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
import com.amalto.workbench.editors.DataModelMainPage;
import com.amalto.workbench.editors.xsdeditor.XSDEditor;
@RunWith(SWTBotJunit4ClassRunner.class)
public class DataModelSchemaKeyOperationTest extends SWTBotForMDMServiewView {
private SWTBotTree conceptBotTree;
private DataModelMainPage mainpage;
private SWTBotTreeItem dataModelItem;
private SWTBotTreeItem keyNode;
@Before
public void runBeforeEveryTest() {
dataModelItem = serverItem.getNode("Data Model [HEAD]");
dataModelItem.expand();
if (dataModelItem.getNodes().contains("TestDataModel"))
dataModelItem.getNode("TestDataModel").doubleClick();
else
newDatamodel();
final SWTBotEditor editor = bot.editorByTitle("TestDataModel");
Display.getDefault().syncExec(new Runnable() {
public void run() {
XSDEditor ep = (XSDEditor) editor.getReference().getPart(true);
mainpage = (DataModelMainPage) ep.getSelectedPage();
}
});
Tree conceptTree = mainpage.getElementsViewer().getTree();
conceptBotTree = new SWTBotTree(conceptTree);
newEntity();
}
private void newDatamodel() {
dataModelItem.contextMenu("New").click();
SWTBotShell newDataContainerShell = bot.shell("New Data Model");
newDataContainerShell.activate();
SWTBotText text = bot
.textWithLabel("Enter a name for the New Instance");
text.setText("TestDataModel");
sleep();
bot.buttonWithTooltip("Add").click();
sleep();
bot.button("OK").click();
sleep();
Assert.assertNotNull(dataModelItem.getNode("TestDataModel"));
sleep(2);
}
private void newEntity() {
conceptBotTree.contextMenu("New Entity").click();
SWTBotShell newEntityShell = bot.shell("New Entity");
newEntityShell.activate();
// create a entity with a complex type
bot.textWithLabel("Name:").setText("ComplexTypeEntity");
sleep();
bot.button("OK").click();
sleep(2);
keyNode = conceptBotTree.getTreeItem("ComplexTypeEntity").expand()
.getNode("ComplexTypeEntity");
}
@After
public void runAfterEveryTest() {
Display.getDefault().syncExec(new Runnable() {
public void run() {
mainpage.doSave(new NullProgressMonitor());
bot.activeEditor().close();
}
});
dataModelItem.getNode("TestDataModel").contextMenu("Delete").click();
bot.button("OK").click();
}
@Test
public void newEntityTest() {
keyNode.contextMenu("New Entity").click();
SWTBotShell newEntityShell = bot.shell("New Entity");
newEntityShell.activate();
// create a entity with a complex type
bot.textWithLabel("Name:").setText("ComplexEntity");
sleep();
bot.button("OK").click(); // create a entity with a simple type
sleep(2);
Assert.assertNotNull(conceptBotTree.getTreeItem("ComplexEntity"));
}
@Test
public void addKeyTest() {
keyNode.contextMenu("Add Key").click();
sleep();
SWTBotShell changeTypeShell = bot.shell("Add a new Key");
changeTypeShell.activate();
bot.ccomboBox(1).setSelection(1);
bot.text().setText("Test");
bot.button("OK").click();
Assert.assertNotNull(conceptBotTree.getTreeItem("ComplexTypeEntity")
.expand().getNode("Test"));
}
@Test
public void deleteKeyTest() {
addKeyTest();
conceptBotTree.getTreeItem("ComplexTypeEntity").expand()
.getNode("Test").contextMenu("Delete Key").click();
sleep();
}
@Test
public void addFieldTest() {
keyNode.contextMenu("New Field").click();
sleep();
SWTBotShell changeTypeShell = bot.shell("Select one field");
changeTypeShell.activate();
bot.ccomboBox().setText("Field");
bot.button("OK").click();
}
@Test
public void editKeyTest() {
addKeyTest();
conceptBotTree.getTreeItem("ComplexTypeEntity").expand()
.getNode("Test").contextMenu("Edit Key").click();
sleep();
SWTBotShell changeTypeShell = bot.shell("Edit Key");
changeTypeShell.activate();
bot.text().setText("TestEditKey");
bot.button("OK").click();
}
}

View File

@@ -0,0 +1,199 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.datamodel;
import junit.framework.Assert;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
import com.amalto.workbench.editors.DataModelMainPage;
import com.amalto.workbench.editors.xsdeditor.XSDEditor;
/**
*
*
* DOC rhou class global comment. Detailled comment
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class DataModelSchemaOperationTest extends SWTBotForMDMServiewView {
private SWTBotTree conceptBotTree;
private DataModelMainPage mainpage;
private SWTBotTreeItem dataModelItem;
private SWTBotTreeItem entityNode;
private SWTBotTreeItem elementNode;
@Before
public void runBeforeEveryTest() {
dataModelItem = serverItem.getNode("Data Model [HEAD]");
dataModelItem.expand();
if (dataModelItem.getNodes().contains("TestDataModel"))
dataModelItem.getNode("TestDataModel").doubleClick();
else
newDatamodel();
final SWTBotEditor editor = bot.editorByTitle("TestDataModel");
Display.getDefault().syncExec(new Runnable() {
public void run() {
XSDEditor ep = (XSDEditor) editor.getReference().getPart(true);
mainpage = (DataModelMainPage) ep.getSelectedPage();
}
});
Tree conceptTree = mainpage.getElementsViewer().getTree();
conceptBotTree = new SWTBotTree(conceptTree);
newEntity();
newElement();
}
private void newDatamodel() {
dataModelItem.contextMenu("New").click();
SWTBotShell newDataContainerShell = bot.shell("New Data Model");
newDataContainerShell.activate();
SWTBotText text = bot
.textWithLabel("Enter a name for the New Instance");
text.setText("TestDataModel");
sleep();
bot.buttonWithTooltip("Add").click();
sleep();
bot.button("OK").click();
sleep();
Assert.assertNotNull(dataModelItem.getNode("TestDataModel"));
sleep(2);
}
private void newEntity() {
conceptBotTree.contextMenu("New Entity").click();
SWTBotShell newEntityShell = bot.shell("New Entity");
newEntityShell.activate();
// create a entity with a complex type
bot.textWithLabel("Name:").setText("ComplexTypeEntity");
sleep();
bot.button("OK").click();
sleep(2);
entityNode = conceptBotTree.getTreeItem("ComplexTypeEntity");
entityNode.select();
}
private void newElement() {
entityNode.expand().getNode("ComplexTypeEntityType")
.contextMenu("Add Element").click();
SWTBotShell newElementShell = bot.shell("Add a new Business Element");
newElementShell.activate();
bot.textWithLabel("Business Element Name").setText("Ele");
sleep();
bot.button("OK").click();
sleep(2);
elementNode = entityNode.expand().getNode("ComplexTypeEntityType")
.expand().getNode("Ele [0...1]");
}
@After
public void runAfterEveryTest() {
Display.getDefault().syncExec(new Runnable() {
public void run() {
mainpage.doSave(new NullProgressMonitor());
bot.activeEditor().close();
}
});
dataModelItem.getNode("TestDataModel").contextMenu("Delete").click();
bot.button("OK").click();
}
// @Test
public void filterTest() {
bot.toolbarRadioButtonWithTooltip("Filter...").click();
SWTBotShell filterShell = bot.shell("Data Model Filter");
filterShell.activate();
bot.ccomboBox().setSelection(1);
sleep();
bot.radio(3).click();
sleep();
bot.button("OK").click();
sleep();
bot.toolbarButtonWithTooltip("Filter...").click();
filterShell = bot.shell("Data Model Filter");
filterShell.activate();
bot.ccomboBox().setSelection(0);
sleep();
bot.radio(0).click();
sleep();
bot.button("OK").click();
}
@Test
public void expandTest() {
entityNode.select();
bot.toolbarButtonWithTooltip("Expand...").click();
sleep(2);
}
@Test
public void collapseTest() {
entityNode.select();
bot.toolbarButtonWithTooltip("Collapse...").click();
sleep(2);
}
@Test
public void expandModelGroupTest() {
entityNode.select();
bot.toolbarButtonWithTooltip("Expand ModelGroup...").click();
sleep(2);
}
@Test
public void elementUpTest() {
elementNode.select();
bot.toolbarButtonWithTooltip("UP...").click();
sleep(2);
}
@Test
public void elementDownTest() {
entityNode.expand().getNode("ComplexTypeEntityType").expand()
.getNode("subelement").select();
bot.toolbarButtonWithTooltip("DOWN...").click();
}
@Test
public void labelOperationTest() {
entityNode.select();
bot.toolbarButtonWithTooltip("Expand...").click();
sleep();
bot.comboBoxWithLabel("Language:").setSelection(1);
bot.buttonWithTooltip("Add...").click();
sleep(2);
bot.buttonWithTooltip("Remove...").click();
sleep(2);
}
}

View File

@@ -0,0 +1,436 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.datamodel;
import junit.framework.Assert;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
import com.amalto.workbench.editors.DataModelMainPage;
import com.amalto.workbench.editors.xsdeditor.XSDEditor;
@RunWith(SWTBotJunit4ClassRunner.class)
public class DataModelTypesElementOperationTest extends SWTBotForMDMServiewView {
private SWTBotTree conceptBotTree;
private SWTBotTree typesBotTree;
private DataModelMainPage mainpage;
private SWTBotTreeItem dataModelItem;
private SWTBotTreeItem typeNode;
private SWTBotTreeItem elementNode;
@Before
public void runBeforeEveryTest() {
dataModelItem = serverItem.getNode("Data Model [HEAD]");
dataModelItem.expand();
dataModelItem.contextMenu("New").click();
SWTBotShell newDataContainerShell = bot.shell("New Data Model");
newDataContainerShell.activate();
SWTBotText text = bot
.textWithLabel("Enter a name for the New Instance");
text.setText("TestDataModel");
sleep();
bot.buttonWithTooltip("Add").click();
sleep();
bot.button("OK").click();
sleep();
Assert.assertNotNull(dataModelItem.getNode("TestDataModel"));
sleep(4);
final SWTBotEditor editor = bot.editorByTitle("TestDataModel");
Display.getDefault().syncExec(new Runnable() {
public void run() {
XSDEditor ep = (XSDEditor) editor.getReference().getPart(true);
mainpage = (DataModelMainPage) ep.getSelectedPage();
}
});
Tree elemetnsTree = mainpage.getElementsViewer().getTree();
conceptBotTree = new SWTBotTree(elemetnsTree);
Tree typesTree = mainpage.getTypesViewer().getTree();
typesBotTree = new SWTBotTree(typesTree);
newEntity();
bot.activeEditor().save();
}
public void newEntity() {
conceptBotTree.contextMenu("New Entity").click();
SWTBotShell newEntityShell = bot.shell("New Entity");
newEntityShell.activate();
// create a entity with a complex type
bot.textWithLabel("Name:").setText("ComplexTypeEntity");
sleep();
bot.button("OK").click();
sleep(2);
elementNode = typesBotTree.getTreeItem("ComplexTypeEntityType")
.expand().getNode("subelement");
}
@After
public void runAfterEveryTest() {
Display.getDefault().syncExec(new Runnable() {
public void run() {
mainpage.doSave(new NullProgressMonitor());
bot.activeEditor().close();
}
});
dataModelItem.getNode("TestDataModel").contextMenu("Delete").click();
bot.button("OK").click();
}
@Test
public void CreateComplexType() {
elementNode.contextMenu("Create a Complex Type").click();
sleep();
SWTBotShell changeTypeShell = bot.shell("Complex Type Properties");
changeTypeShell.activate();
bot.ccomboBox(0).setText("ComplexType");
bot.radio("Sequence").click();
bot.button("OK").click();
sleep(2);
Assert.assertNotNull(typesBotTree.getTreeItem("ComplexType"));
}
@Test
public void CreateSimpleType() {
elementNode.contextMenu("Create a Simple Type").click();
sleep();
SWTBotShell changeTypeShell = bot.shell("New Simple Type");
changeTypeShell.activate();
bot.radio("Custom").click();
sleep();
bot.ccomboBoxWithLabel("Type").setSelection(0);
sleep();
bot.button("OK").click();
sleep();
Assert.assertNotNull(typesBotTree.getTreeItem("PICTURE : string"));
}
@Test
public void editElementTest() {
elementNode.contextMenu("Edit Element").click();
SWTBotShell newEntityShell = bot.shell("Edit Business Element");
newEntityShell.activate();
// create a entity with a complex type
bot.textWithLabel("Business Element Name").setText("element");
sleep();
bot.button("OK").click(); // create a entity with a simple type
sleep(2);
}
@Test
public void addElementTest() {
// SWTBotTreeItem groupItem = conceptNode.getNode("ReportingType");
elementNode.contextMenu("Add Element (after)").click();
SWTBotShell newEntityShell = bot.shell("Add a new Business Element");
newEntityShell.activate();
// create a entity with a complex type
bot.textWithLabel("Business Element Name").setText("element");
sleep();
bot.button("OK").click(); // create a entity with a simple type
sleep(2);
Assert.assertNotNull(typesBotTree.getTreeItem("ComplexTypeEntityType")
.expand().getNode("element [0...1]"));
}
// @Test
public void copyElementTest() {
elementNode.contextMenu("Copy Element").click();
sleep();
elementNode.contextMenu("Paste Element").click();
sleep();
SWTBotShell saveShell = bot.shell("Copy Element");
saveShell.activate();
bot.button("OK").click();
sleep();
}
@Test
public void changeToComplexTypeTest() {
elementNode.contextMenu("Change to a Complex Type").click();
sleep();
SWTBotShell changeTypeShell = bot.shell("Complex Type Properties");
changeTypeShell.activate();
bot.radio("Sequence").click();
bot.button("OK").click();
sleep(2);
}
@Test
public void changeToSimpleTypeTest() {
elementNode.contextMenu("Change to a Simple Type").click();
sleep();
SWTBotShell changeTypeShell = bot.shell("Make Simple Type");
changeTypeShell.activate();
bot.radio("Custom").click();
sleep();
bot.ccomboBoxWithLabel("Type").setSelection(0);
sleep();
bot.button("OK").click();
sleep(2);
}
@Test
public void setLabelsTest() {
elementNode.contextMenu("Set the Labels").click();
sleep();
SWTBotShell shell = bot.shell("Set the Labels");
shell.activate();
bot.comboBox().setSelection(0);
bot.text().setText("en");
bot.buttonWithTooltip("Add").click();
sleep();
bot.comboBox().setSelection(1);
bot.text().setText("fr");
bot.buttonWithTooltip("Add").click();
sleep();
bot.table().select(1);
bot.buttonWithTooltip("Del").click();
sleep();
bot.button("OK").click();
sleep();
}
@Test
public void setDescriptionsTest() {
elementNode.contextMenu("Set the Descriptions").click();
sleep();
SWTBotShell shell = bot.shell("Set the Descriptions of This Element");
shell.activate();
bot.comboBox().setSelection(0);
bot.text().setText("enlish descriptions");
bot.buttonWithTooltip("Add").click();
sleep();
bot.comboBox().setSelection(1);
bot.text().setText("french descriptions");
bot.buttonWithTooltip("Add").click();
sleep();
bot.table().select(1);
bot.buttonWithTooltip("Del").click();
sleep();
bot.button("OK").click();
}
@Test
public void setWriteAccessTest() {
elementNode.contextMenu("Set the Roles with Write Access").click();
SWTBotShell newViewShell = bot
.shell("Set The Roles That Have Write Access");
newViewShell.activate();
bot.ccomboBox().setSelection(0);
bot.buttonWithTooltip("Add").click();
bot.ccomboBox().setSelection(1);
bot.buttonWithTooltip("Add").click();
bot.table().select(0);
bot.buttonWithTooltip("Move down the selected item").click();
sleep(2);
bot.buttonWithTooltip("Move up the selected item").click();
sleep(2);
bot.table().select(0);
bot.buttonWithTooltip("Delete the selected item").click();
sleep();
bot.button("OK").click();
sleep();
}
@Test
public void setNoAccessTest() {
elementNode.contextMenu("Set the Roles with No Access").click();
SWTBotShell newViewShell = bot
.shell("Set The Roles That Cannot Access This Field");
newViewShell.activate();
bot.ccomboBox().setSelection(0);
bot.buttonWithTooltip("Add").click();
bot.ccomboBox().setSelection(1);
bot.buttonWithTooltip("Add").click();
bot.table().select(0);
bot.buttonWithTooltip("Move down the selected item").click();
sleep(2);
bot.buttonWithTooltip("Move up the selected item").click();
sleep(2);
bot.table().select(1);
bot.buttonWithTooltip("Delete the selected item").click();
sleep();
bot.button("OK").click();
sleep();
}
// @Test
public void setWorkflowAccessTest() {
elementNode.contextMenu("Set the Workflow Access").click();
SWTBotShell shell = bot.shell("Set the Workflow Access");
shell.activate();
}
@Test
public void setForeignKeyTest() {
Display.getDefault().syncExec(new Runnable() {
public void run() {
mainpage.doSave(new NullProgressMonitor());
}
});
elementNode.contextMenu("Set the Foreign Key").click();
SWTBotShell shell = bot.shell("Set the Foreign Key");
shell.activate();
bot.buttonWithTooltip("Select xpath").click();
// test the filter of the composite by meanwhile.see bug 0016511
bot.textWithLabel("Filter:").setText("R");
sleep();
bot.textWithLabel("Filter:").setText("U");
sleep();
bot.textWithLabel("Filter:").setText("");
sleep();
bot.tree().select(0);
sleep();
bot.button("Add").click();
sleep();
shell = bot.shell("Set the Foreign Key");
shell.activate();
bot.button("OK").click();
}
@Test
public void setForeignKeyFilterTest() {
Display.getDefault().syncExec(new Runnable() {
public void run() {
mainpage.doSave(new NullProgressMonitor());
}
});
elementNode.contextMenu("Set the Foreign Key Filter").click();
SWTBotShell shell = bot.shell("Set Foreign Key Filter");
shell.activate();
bot.buttonWithTooltip("Add").click();
// TODO:check
// bot.buttonWithTooltip("Select Xpath").click();
//
// bot.tree().expandNode("BrowseItem").select("Owner");
// sleep();
// bot.button("Add").click();
// sleep();
bot.text().setText("filter");
sleep();
bot.button("OK").click();
}
@Test
public void setForeignKeyInfoTest() {
Display.getDefault().syncExec(new Runnable() {
public void run() {
mainpage.doSave(new NullProgressMonitor());
}
});
elementNode.contextMenu("Set the Foreign Key Infos").click();
SWTBotShell shell = bot.shell("Set the Foreign Key Infos");
shell.activate();
bot.buttonWithTooltip("Select xpath").click();
// test the filter of the composite meanwhile.
bot.textWithLabel("Filter:").setText("R");
sleep();
bot.textWithLabel("Filter:").setText("U");
sleep();
bot.textWithLabel("Filter:").setText("");
sleep();
bot.tree().select(0);
sleep();
bot.button("Add").click();
sleep();
shell.activate();
bot.buttonWithTooltip("Add").click();
sleep();
bot.button("OK").click();
}
@Test
public void setFacetTest() {
elementNode.contextMenu("Set the facet message").click();
sleep();
SWTBotShell shell = bot
.shell("Set multilingual facet error messages for the content of this element");
shell.activate();
bot.comboBox().setSelection(0);
bot.text().setText("test error facet in English");
bot.buttonWithTooltip("Add").click();
sleep();
bot.comboBox().setSelection(1);
bot.text().setText("test error facet in French");
bot.buttonWithTooltip("Add").click();
sleep();
bot.table().select(1);
bot.buttonWithTooltip("Del").click();
sleep();
bot.button("OK").click();
sleep();
}
@Test
public void setDisplayFormatTest() {
elementNode.contextMenu("Set the display format").click();
sleep();
SWTBotShell shell = bot
.shell("Set the display format for the content of this element");
shell.activate();
bot.comboBox().setSelection(0);
bot.text().setText("test error format in English");
bot.buttonWithTooltip("Add").click();
sleep();
bot.comboBox().setSelection(1);
bot.text().setText("test error format in French");
bot.buttonWithTooltip("Add").click();
sleep();
bot.table().select(1);
bot.buttonWithTooltip("Del").click();
sleep();
bot.button("OK").click();
sleep();
}
// @Test
public void copyXpathTest() {
// TODO:it dose nothing now,need to check
elementNode.contextMenu("Copy Xpath").click();
sleep();
}
}

View File

@@ -0,0 +1,168 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.datamodel;
import junit.framework.Assert;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
import com.amalto.workbench.editors.DataModelMainPage;
import com.amalto.workbench.editors.xsdeditor.XSDEditor;
@RunWith(SWTBotJunit4ClassRunner.class)
public class DataModelTypesTypeOperationTest extends SWTBotForMDMServiewView {
private SWTBotTree conceptBotTree;
private SWTBotTree typesBotTree;
private DataModelMainPage mainpage;
private SWTBotTreeItem dataModelItem;
private SWTBotTreeItem typeNode;
@Before
public void runBeforeEveryTest() {
dataModelItem = serverItem.getNode("Data Model [HEAD]");
dataModelItem.expand();
dataModelItem.contextMenu("New").click();
SWTBotShell newDataContainerShell = bot.shell("New Data Model");
newDataContainerShell.activate();
SWTBotText text = bot
.textWithLabel("Enter a name for the New Instance");
text.setText("TestDataModel");
sleep();
bot.buttonWithTooltip("Add").click();
sleep();
bot.button("OK").click();
sleep();
Assert.assertNotNull(dataModelItem.getNode("TestDataModel"));
sleep(4);
final SWTBotEditor editor = bot.editorByTitle("TestDataModel");
Display.getDefault().syncExec(new Runnable() {
public void run() {
XSDEditor ep = (XSDEditor) editor.getReference().getPart(true);
mainpage = (DataModelMainPage) ep.getSelectedPage();
}
});
Tree elemetnsTree = mainpage.getElementsViewer().getTree();
conceptBotTree = new SWTBotTree(elemetnsTree);
Tree typesTree = mainpage.getTypesViewer().getTree();
typesBotTree = new SWTBotTree(typesTree);
newEntity();
bot.activeEditor().save();
}
public void newEntity() {
conceptBotTree.contextMenu("New Entity").click();
SWTBotShell newEntityShell = bot.shell("New Entity");
newEntityShell.activate();
// create a entity with a complex type
bot.textWithLabel("Name:").setText("ComplexTypeEntity");
sleep();
bot.button("OK").click();
sleep(2);
typeNode = typesBotTree.getTreeItem("ComplexTypeEntityType");
}
@After
public void runAfterEveryTest() {
Display.getDefault().syncExec(new Runnable() {
public void run() {
mainpage.doSave(new NullProgressMonitor());
bot.activeEditor().close();
}
});
dataModelItem.getNode("TestDataModel").contextMenu("Delete").click();
bot.button("OK").click();
}
@Test
public void createComplexTypeTest() {
typeNode.contextMenu("Create a Complex Type").click();
sleep();
SWTBotShell changeTypeShell = bot.shell("Complex Type Properties");
changeTypeShell.activate();
bot.ccomboBox(0).setText("ComplexType");
bot.radio("Sequence").click();
bot.button("OK").click();
sleep(2);
Assert.assertNotNull(typesBotTree.getTreeItem("ComplexType"));
}
@Test
public void addSimpleTypeTest() {
typeNode.contextMenu("Create a Simple Type").click();
sleep();
SWTBotShell changeTypeShell = bot.shell("New Simple Type");
changeTypeShell.activate();
bot.radio("Custom").click();
sleep();
bot.ccomboBoxWithLabel("Type").setSelection(0);
sleep();
bot.button("OK").click();
sleep();
Assert.assertNotNull(typesBotTree.getTreeItem("PICTURE : string"));
}
@Test
public void addElementTest() {
typeNode.contextMenu("Add Element").click();
SWTBotShell newEntityShell = bot.shell("Add a new Business Element");
newEntityShell.activate();
// create a entity with a complex type
bot.textWithLabel("Business Element Name").setText("testElement");
sleep();
bot.button("OK").click(); // create a entity with a simple type
sleep(2);
Assert.assertNotNull(typeNode.expand().getNode("testElement [0...1]"));
}
@Test
public void editComplexTypeTest() {
typeNode.contextMenu("Edit a Complex Type").click();
sleep();
SWTBotShell editTypeShell = bot.shell("Edit Complex Type");
editTypeShell.activate();
bot.text().setText("TextEditComplexType");
bot.button("OK").click();
Assert.assertNotNull(typesBotTree.getTreeItem("TextEditComplexType"));
}
// @Test
public void deleteComplexTypeTest() {
createComplexTypeTest();
typesBotTree.getTreeItem("ComplexType")
.contextMenu("Delete type definition").click();
sleep();
}
}

View File

@@ -0,0 +1,54 @@
package org.talend.swtbot.mdm.test.serverview.eventmanagement;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
@RunWith(SWTBotJunit4ClassRunner.class)
public class EventManagerTest extends SWTBotForMDMServiewView {
private SWTBotTreeItem eventManagerNode;
private SWTBotTreeItem eventManagementItem;
@Before
public void runBeforeEveryTest() {
eventManagementItem = serverItem.getNode("Event Management");
eventManagementItem.expand();
eventManagerNode = eventManagementItem.getNode("Event Manager");
}
@After
public void runAfterEveryTest() {
}
@Test
public void browseTest() {
eventManagerNode.contextMenu("Browse").click();
sleep(5);
}
// @Test
public void statusTest() {
bot.buttonWithTooltip("Start").click();
sleep();
bot.buttonWithTooltip("Suspend").click();
sleep();
bot.buttonWithTooltip("Stop").click();
sleep();
}
@Test
public void searchTest() {
bot.comboBoxWithLabel("Status").setSelection(1);
bot.buttonWithTooltip("Search").click();
sleep();
bot.activeEditor().close();
}
}

View File

@@ -0,0 +1,51 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.job;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
/**
* @author rhou
*
*/
public class JobRunTest extends SWTBotForMDMServiewView {
private SWTBotTreeItem jobParentItem;
private SWTBotTreeItem jobItem;
@Before
public void runBeforeEveryTest() {
jobParentItem = serverItem.getNode("Job Repository");
jobParentItem.expand();
if(jobParentItem.getNodes().contains("Source Jobs"))
jobItem=jobParentItem.getNode("Source Jobs").getNode(0);
}
@After
public void runAfterEveryTest() {
}
//new feature in 4.2,see bug 0018022,0018002
@Test
public void jobRunTest(){
if(jobItem!=null)
jobItem.contextMenu("Run").click();
}
}

View File

@@ -0,0 +1,142 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.menu;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
/**
*
* DOC rhou class global comment. Detailled comment
*
*
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class MenuContentTest extends SWTBotForMDMServiewView {
private SWTBotTreeItem menuParentItem;
private SWTBotTreeItem menuItem;
@Before
public void runBeforeEveryTest() {
menuParentItem = serverItem.getNode("Menu [HEAD]");
menuParentItem.expand();
init();
}
@After
public void runAfterEveryTest() {
menuParentItem.getNode("TestMenu").contextMenu("Delete").click();
sleep();
bot.button("OK").click();
sleep();
}
private void init() {
menuParentItem.contextMenu("New").click();
SWTBotShell shell = bot.shell("New Menu");
shell.activate();
SWTBotText text = bot
.textWithLabel("Enter a Name for the New Instance");
text.setText("TestMenu");
sleep();
bot.button("OK").click();
bot.activeEditor().save();
sleep();
menuItem = menuParentItem.getNode("TestMenu");
Assert.assertNotNull(menuItem);
sleep(2);
}
@Test
public void setDescriptionTest() {
String des = "This is a description for TestMenu";
bot.textWithLabel("Description").setText(des);
Assert.assertEquals(des, bot.textWithLabel("Description").getText());
}
// @Test
public void editMenuEntryTest() {
bot.tree().contextMenu("Edit").click();
bot.shell("Edit the Menu Entry TestMenu").activate();
bot.textWithLabel("Context").setText("TestMenu");
bot.textWithLabel("Application").setText("TestMenu");
bot.textWithLabel("Icon Path").setText("");// TODO:add the url of the
// icon.
bot.buttonWithTooltip("OK").click();
sleep();
}
// @Test
public void addBeforeEntryTest() {
bot.tree().contextMenu("Add a menu entry before this entry").click();
bot.shell("Edit the Menu Entry TestMenu").activate();
bot.textWithLabel("ID").setText("BeforeEntry");
bot.textWithLabel("Context").setText("BeforeEntry");
bot.textWithLabel("Application").setText("BeforeEntry");
bot.textInGroup("Menu Entry Labels").setText("BeforeEntry");
bot.buttonWithTooltip("Add").click();
bot.buttonWithTooltip("OK").click();
Assert.assertNotNull(bot.tree().getTreeItem(
"BeforeEntry - [en: BeforeEntry]"));
sleep();
}
// @Test
public void addAfterEntryTest() {
bot.tree().contextMenu("Add a menu entry after this entry").click();
bot.shell("Edit the Menu Entry TestMenu").activate();
bot.textWithLabel("ID").setText("AfterEntry");
bot.textWithLabel("Context").setText("AfterEntry");
bot.textWithLabel("Application").setText("AfterEntry");
bot.textInGroup("Menu Entry Labels").setText("AfterEntry");
bot.buttonWithTooltip("Add").click();
bot.buttonWithTooltip("OK").click();
Assert.assertNotNull(bot.tree().getTreeItem(
"AfterEntry - [en: AfterEntry]"));
sleep();
}
// @Test
public void addSubEntryTest() {
bot.tree().contextMenu("Add a menu entry after this entry").click();
bot.shell("Edit the Menu Entry TestMenu").activate();
bot.textWithLabel("ID").setText("SubEntry");
bot.textWithLabel("Context").setText("SubEntry");
bot.textWithLabel("Application").setText("SubEntry");
bot.textInGroup("Menu Entry Labels").setText("SubEntry");
bot.buttonWithTooltip("Add").click();
bot.buttonWithTooltip("OK").click();
Assert.assertNotNull(bot.tree()
.getTreeItem("TestMenu - [en: TestMenu]")
.getNode("SubEntry - [en: SubEntry]"));
sleep();
}
// @Test
public void deleteEntryTest() {
bot.tree().contextMenu("Delete Entry").click();
Assert.assertNull(bot.tree().getTreeItem("TestMenu - [en: TestMenu]"));
sleep();
}
}

View File

@@ -0,0 +1,64 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.resources.customtype;
import java.io.IOException;
import java.net.URISyntaxException;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.util.Util;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
/**
* DOC rhou class global comment. Detailled comment
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class CustomTypeUploadTest extends SWTBotForMDMServiewView {
private SWTBotTreeItem customTypeParentNode;
private static String SAMPLE_RELATIVE_FILEPATH = "customType.xsd";
private String[] creation;
@Before
public void runBeforeEveryTest() {
SWTBotTreeItem resourcesItem = serverItem.getNode("Resources");
resourcesItem.expand();
customTypeParentNode = resourcesItem.getNode("Custom Type");
}
@After
public void runAfterEveryTest() {
customTypeParentNode.select(creation).contextMenu("Delete").click();
sleep();
bot.button("OK").click();
sleep();
}
// @Test
public void customTypeUploadTest() throws IOException, URISyntaxException {
customTypeParentNode.contextMenu("Upload").click();
bot.shell("Upload Custom Type").activate();
bot.textWithLabel("Custom Type Name").setText("CustomType");
bot.textWithLabel("File Path").setText(
Util.getFileFromCurrentPluginSampleFolder(
SAMPLE_RELATIVE_FILEPATH).getAbsolutePath());
}
}

View File

@@ -0,0 +1,103 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.role;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
/**
*
* DOC rhou class global comment. Detailled comment
*
*
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class RoleContentTest extends SWTBotForMDMServiewView {
private SWTBotTreeItem roleParentItem;
private SWTBotTreeItem roleItem;
@Before
public void runBeforeEveryTest() {
roleParentItem = serverItem.getNode("Role [HEAD]");
roleParentItem.expand();
roleItem = roleParentItem.getNode("Manager_MWest");
roleItem.doubleClick();
sleep(2);
}
@After
public void runAfterEveryTest() {
bot.activeEditor().close();
}
private void init() {
roleParentItem.contextMenu("New Role").click();
SWTBotShell newroleShell = bot.shell("New Role");
newroleShell.activate();
SWTBotText text = bot.textWithLabel("Enter a name for the Role:");
text.setText("TestRole");
sleep();
bot.buttonWithTooltip("Add").click();
sleep();
bot.button(IDialogConstants.NEXT_LABEL).click();
sleep();
bot.comboBoxWithLabel("Administrator").selection();
bot.button(IDialogConstants.FINISH_LABEL).click();
bot.activeEditor().save();
bot.activeEditor().close();
roleItem = roleParentItem.getNode("TestRole");
Assert.assertNotNull(roleItem);
roleItem.doubleClick();
sleep(2);
}
@Test
public void setDescriptionTest() {
bot.buttonWithTooltip("Set the Descriptions").click();
bot.shell("Set the Description of the Role").activate();
bot.comboBox().setSelection("English");
String des = "Administrator";
bot.text().setText(des);
bot.buttonWithTooltip("Add").click();
bot.button("OK").click();
}
@Test
public void setPermissionTest() {
String type = "Object Type";
String instance = "Read and Write Permissins On Specific Instances";
bot.comboBoxWithLabel(type).setSelection("Data Container");
bot.comboBox(1).setSelection("CONF");
bot.buttonWithTooltip("Add").click();
sleep();
bot.comboBoxWithLabel(type).setSelection("Data Model");
bot.comboBox(1).setSelection("SearchTemplate");
bot.comboBox("Read Only").setSelection("Read & Write");
bot.buttonWithTooltip("Add").click();
sleep();
}
}

View File

@@ -0,0 +1,66 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.serviceconfiguration;
import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
/**
* DOC rhou class global comment. Detailled comment
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class ServiceConfigurationTest extends SWTBotForMDMServiewView {
private SWTBotTreeItem scItem;
@Before
public void runBeforeEveryTest() {
scItem = serverItem.getNode("Service Configuration");
scItem.expand();
scItem.doubleClick();
sleep(2);
}
@After
public void runAfterEveryTest() {
bot.activeEditor().close();
}
@Test
public void serviceConfigurationContentTest() {
bot.comboBox().setSelection("smtp");
bot.button("Check").click();
// Assert.assertEquals("Connection sucessfully!",
// bot.text(1).getText());
sleep();
bot.comboBox().setSelection("svn");
bot.button("Check").click();
// Assert.assertEquals("Connection sucessfully!",
// bot.text(1).getText());
sleep();
bot.comboBox().setSelection("workflow");
bot.button("Check").click();
// Assert.assertEquals("Connection sucessfully!",
// bot.text(1).getText());
sleep();
}
}

View File

@@ -0,0 +1,94 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.storedprocedure;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
/**
*
* DOC rhou class global comment. Detailled comment
*
*
*
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class StoredProcedureContentTest extends SWTBotForMDMServiewView {
private SWTBotTreeItem spParentItem;
private SWTBotTreeItem spItem;
@Before
public void runBeforeEveryTest() {
spParentItem = serverItem.getNode("Stored Procedure [HEAD]");
spParentItem.expand();
}
private void init() {
spParentItem.contextMenu("New").click();
SWTBotShell newspShell = bot.shell("New Stored Procedure");
newspShell.activate();
SWTBotText text = bot.textWithLabel("Enter a Name for the New Instance");
text.setText("TestStoredProcedure");
bot.button("OK").click();
bot.activeEditor().save();
sleep();
spParentItem.expand();
spItem = spParentItem.getNode("TestStoredProcedure");
Assert.assertNotNull(spItem);
spItem.doubleClick();
sleep(2);
}
@After
public void runAfterEveryTest() {
}
@Test
public void setDescriptionTest() {
init();
String des = "This is a stored procedure";
bot.textWithLabel("Description").setText(des);
Assert.assertEquals(des, bot.textWithLabel("Description").getText());
}
@Test
public void setProcedureTest() {
String pro = "";
bot.styledText().setText(pro);
Assert.assertEquals(pro, bot.styledText().getText());
}
@Test
public void executeProcedureTest() {
String pro = "";
bot.comboBox().setSelection("SearchTemplate");
bot.button("Execute Procedure").click();
spParentItem.expand();
spParentItem.getNode("TestStoredProcedure").contextMenu("Delete").click();
sleep();
bot.button("OK").click();
sleep();
}
}

View File

@@ -0,0 +1,100 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.synchronization;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
/**
*
* DOC rhou class global comment. Detailled comment
*
*
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class SynchronizationPlanContentTest extends SWTBotForMDMServiewView {
private SWTBotTreeItem spParentItem;
private SWTBotTreeItem spItem;
@Before
public void runBeforeEveryTest() {
spParentItem = serverItem.getNode("Synchronization Plan [HEAD]");
spParentItem.expand();
}
private void init() {
spParentItem.contextMenu("New").click();
SWTBotShell newspShell = bot.shell("New Synchronization Plan");
newspShell.activate();
SWTBotText text = bot.textWithLabel("Enter a Name for the New Instance");
text.setText("TestSynchronizationPlan");
sleep();
bot.button("OK").click();
bot.activeEditor().save();
sleep();
spItem = spParentItem.getNode("TestSynchronizationPlan");
Assert.assertNotNull(spItem);
spItem.doubleClick();
sleep(2);
}
@After
public void runAfterEveryTest() {
}
@Test
public void setDescriptionTest() {
init();
String des = "This is a stored procedure";
bot.textWithLabel("Description").setText(des);
Assert.assertEquals(des, bot.textWithLabel("Description").getText());
}
@Test
public void checkServerTest() {
bot.textWithLabel("Name").setText("Test");
bot.textWithLabel("URL").setText("http://localhost:8080/talend/TalendPort");
bot.textWithLabel("Username").setText("admin");
bot.textWithLabel("Password").setText("talend");
bot.button("Check").click();
}
@Test
public void addRecordsSPTest() {
// TODO:need more detailed test codes with version after the version is created.
}
@Test
public void checkActionTest() {
bot.activeEditor().save();
bot.buttonWithTooltip("Start Full").click();
// TODO:need assertion;
spParentItem.getNode("TestSynchronizationPlan").contextMenu("Delete").click();
sleep();
bot.button("OK").click();
sleep();
}
}

View File

@@ -0,0 +1,58 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.transformer;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
/**
*
* DOC rhou class global comment. Detailled comment
*
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class TransformerContentTest extends SWTBotForMDMServiewView {
private SWTBotTreeItem jobParentItem;
private SWTBotTreeItem jobCategoryItem;
private SWTBotTreeItem jobItem = null;
@Before
public void runBeforeEveryTest() {
jobParentItem = serverItem.getNode("Job Repository");
jobParentItem.expand();
jobCategoryItem = jobParentItem.getNode("Deployed Jobs");
if (jobCategoryItem.getItems().length > 0) {
jobItem = jobCategoryItem.getNode(0);
jobItem.doubleClick();
}
}
@After
public void runAfterEveryTest() {
}
@Test
public void checkTest() {
if (jobItem != null)
bot.button("Check").click();
}
}

View File

@@ -0,0 +1,163 @@
package org.talend.swtbot.mdm.test.serverview.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.util.Date;
import java.util.List;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.URIUtil;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
import org.eclipse.swtbot.swt.finder.results.VoidResult;
import org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyList;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
/**
* DOC rhou class global comment. Detailled comment
*/
public class Util {
private static String SAMPLE_FOLDER_PATH = "/sample/";//$NON-NLS-1$
/**
* Copy a file with the FileChannel that will accelerate the process.
*
* @param inputFile
* @param outFile
* @return
* @throws Exception
*/
public static long copyFile(File inputFile, File outFile) throws Exception {
long time = new Date().getTime();
int length = 2097152;
FileInputStream in = new FileInputStream(inputFile);
FileOutputStream out = new FileOutputStream(outFile);
FileChannel inC = in.getChannel();
FileChannel outC = out.getChannel();
ByteBuffer b = null;
while (true) {
if (inC.position() == inC.size()) {
inC.close();
outC.close();
return new Date().getTime() - time;
}
if ((inC.size() - inC.position()) < length) {
length = (int) (inC.size() - inC.position());
} else
length = 2097152;
b = ByteBuffer.allocateDirect(length);
inC.read(b);
b.flip();
outC.write(b);
outC.force(false);
}
}
/**
* Return a File instance pointing to the file or folder located below this
* plugin sample folder
*
* @param subSamplePath
* , path located below /sample/, so subpath should never start
* with a /, example : test.xsl
* @return
* @throws IOException
* @throws URISyntaxException
*/
public static File getFileFromCurrentPluginSampleFolder(String subSamplePath)
throws IOException, URISyntaxException {
URL url = Util.class.getResource(SAMPLE_FOLDER_PATH + subSamplePath);
URI escapedURI = getFileUrl(url);
return URIUtil.toFile(escapedURI);
}
/**
* Convert any URL to a file URL
*
* @param url
* ,maybe an eclipse URL
* @return
* @throws IOException
* @throws URISyntaxException
*/
private static URI getFileUrl(URL url) throws IOException,
URISyntaxException {
URL unescapedURL = FileLocator.toFileURL(url);
URI escapedURI = new URI(unescapedURL.getProtocol(),
unescapedURL.getPath(), unescapedURL.getQuery());
return escapedURI;
}
/**
* look for all the widget of type TalendTabbedPropertyList and select the
* tab at index for all of them
*
* @param index
* index of the tab to select in aTalendTabbedPropertyList
* TalendTabbedPropertyList(values start from 0)
*/
public static void selecteTalendTabbedPropertyListAtIndex(SWTBot bot,
final int index) {
// look for all the widgets of type TabbedPropertyList
final List<TabbedPropertyList> controls = bot.getFinder().findControls(
new BaseMatcher<TabbedPropertyList>() {
// @Override
public boolean matches(Object item) {
if (item instanceof TabbedPropertyList) {
return true;
} else {
return false;
}
}
// @Override
public void describeTo(Description description) {
description
.appendText("looking for widget of type TabbedPropertyList");
}
});
// select the desired tab in the UI thread
UIThreadRunnable.syncExec(new VoidResult() {
// @Override
public void run() {
for (TabbedPropertyList ttpl : controls) {
Method select;
try {
select = ttpl.getClass().getDeclaredMethod("select",
int.class);
select.setAccessible(true);
select.invoke(ttpl, index);
} catch (SecurityException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} finally {
}
}
}
});
}
}

View File

@@ -0,0 +1,96 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.version;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
/**
*
* DOC rhou class global comment. Detailled comment
*
*
*
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class VersionContentTest extends SWTBotForMDMServiewView {
private SWTBotTreeItem versionParentItem;
private SWTBotTreeItem versionItem;
@Before
public void runBeforeEveryTest() {
versionParentItem = serverItem.getNode("Version");
versionParentItem.expand();
}
private void init() {
versionParentItem.contextMenu("New").click();
SWTBotShell newspShell = bot.shell("New Version");
newspShell.activate();
SWTBotText text = bot
.textWithLabel("Enter a Name for the New Instance");
text.setText("TestVersion");
sleep();
bot.button("OK").click();
bot.activeEditor().save();
sleep();
versionItem = versionParentItem.expand().getNode("TestVersion");
Assert.assertNotNull(versionItem);
versionItem.doubleClick();
sleep(2);
}
@After
public void runAfterEveryTest() {
}
@Test
public void setDescriptionTest() {
init();
String des = "This is a Version";
bot.textWithLabel("Description").setText(des);
Assert.assertEquals(des, bot.textWithLabel("Description").getText());
}
@Test
public void setEntityIDTest() {
bot.text(1).setText("r1");
bot.buttonWithTooltip("Add").click();
// String pro = "";
// bot.styledText().setText(pro);
// Assert.assertEquals(pro, bot.styledText().getText());
}
@Test
public void setSOIDTest() {
// bot.ccomboBoxWithLabel("Data Model").setText("DataModel");
bot.ccomboBox(0).setText("DataModel");
versionParentItem.expand().getNode("TestVersion").contextMenu("Delete")
.click();
sleep();
bot.button("OK").click();
sleep();
}
}

View File

@@ -0,0 +1,102 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.view;
import junit.framework.Assert;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Before;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
public class IsEmptyOrNullOperatorTest extends SWTBotForMDMServiewView {
private SWTBotTreeItem viewParentItem;
private SWTBotTreeItem viewItem;
private String[] array = new String[] { "Id", "Firstname", "Lastname",
"CommissionCode", "StartDate", "TermDate" };
private String PREFIX = "Browse_items_";
@Before
public void runBeforeEveryTest() {
viewParentItem = serverItem.getNode("View [HEAD]");
viewParentItem.expand();
}
private void setElements() {
setViewableElementsTest();
bot.buttonWithTooltip("Add", 1).click();
}
private void setViewableElementsTest() {
bot.buttonWithTooltip("Add Multiple", 0).click();
bot.shell("Select Multiple XPaths").activate();
// bot.comboBox().setSelection("CONF");
// sleep();
SWTBotTreeItem parent = bot.tree().getTreeItem("Conf").expand()
.getNode(0).expand();
parent.select("id");
sleep();
bot.button("Add").click();
sleep();
}
@After
public void runAfterEveryTest() {
bot.activeEditor().save();
bot.activeEditor().close();
viewParentItem.getNode(PREFIX + "Conf").contextMenu("Delete").click();
sleep();
bot.button("OK").click();
sleep();
}
private void createView() {
viewParentItem.contextMenu("New").click();
SWTBotShell newViewShell = bot.shell("New View");
newViewShell.activate();
bot.buttonWithTooltip("Select one Entity").click();
bot.shell("Select one Entity").activate();
bot.comboBoxWithLabel("Data Models:").setSelection("CONF");
bot.tree().select("Conf");
bot.button("Add").click();
sleep();
bot.button("OK").click();
sleep(2);
}
private void init() {
createView();
setElements();
}
// new feature in 4.2,see bug 0018359.
// @Test
public void isEmptyOrNullOperatorTest() {
init();
bot.buttonWithTooltip("Add", 2).click();
bot.table(2).click(0, 1);
SWTBotCombo com = bot.comboBox();
com.setFocus();
com.setSelection("IsEmptyOrNull");
Assert.assertEquals("IsEmptyOrNull", bot.ccomboBox().getText());
}
}

View File

@@ -0,0 +1,157 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.view;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
/**
* ViewContentOperationTest is a SWTBot test class to imitate the process to
* create a view like Browse_items_Agent.
*
* DOC rhou class global comment. Detailled comment
*
* see bug 0017197.
*
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class ViewContentTest extends SWTBotForMDMServiewView {
private SWTBotTreeItem viewParentItem;
private SWTBotTreeItem viewItem;
// private String[] array = new String[] { "Id", "Firstname", "Lastname",
// "CommissionCode", "StartDate", "TermDate" };
private String[] array = new String[] { "id", "Config" };
private String PREFIX = "Browse_items_";
@Before
public void runBeforeEveryTest() {
viewParentItem = serverItem.getNode("View [HEAD]");
viewParentItem.expand();
}
private void createView() {
// new feature in 4.2,see bug 0016511.
// Create a new view to test the filter of the xpath.
viewParentItem.contextMenu("New").click();
// bot.sleep(1000);
SWTBotShell newViewShell = bot.shell("New View");
newViewShell.activate();
// bot.buttonWithLabel("...").click();
bot.buttonWithTooltip("Select one Entity").click();
bot.shell("Select one Entity").activate();
bot.comboBoxWithLabel("Data Models:").setSelection("CONF");
bot.tree().select("Conf");
bot.button("Add").click();
sleep();
bot.button("OK").click();
// setDescription();
// setElements();
// bot.activeEditor().save();
// bot.activeEditor().close();
sleep(2);
}
private void init() {
createView();
}
@Test
public void setDescriptionTest() {
bot.buttonWithTooltip("Set the Descriptions").click();
bot.shell("Set the Descriptions").activate();
bot.comboBox().setSelection("English");
String des = "Conf";
bot.text().setText(des);
bot.buttonWithTooltip("Add").click();
bot.button("OK").click();
sleep();
}
@Test
public void setViewableElementsTest() {
init();
bot.buttonWithTooltip("Add Multiple", 0).click();
bot.shell("Select Multiple XPaths").activate();
// bot.comboBox().setSelection("CONF");
// sleep();
SWTBotTreeItem parent = bot.tree().getTreeItem("Conf").expand()
.getNode(0).expand();
parent.select(array);
sleep();
bot.button("Add").click();
sleep();
}
@Test
public void setSearchableElementsTest() {
bot.buttonWithTooltip("Add Multiple", 1).click();
bot.shell("Select Multiple XPaths").activate();
// bot.comboBox().setSelection("Agent");
// sleep();
SWTBotTreeItem parent = bot.tree().getTreeItem("Conf").expand()
.getNode(0).expand();
parent.select(array);
sleep();
bot.button("Add").click();
sleep();
// bot.buttonWithTooltip("Add Multiple", 1).click();
// bot.shell("Select Multiple XPaths").activate();
// bot.comboBox().setSelection("Agent");
// sleep();
// bot.tree().select("Agent");
// sleep();
// bot.button("Add").click();
// sleep();
}
@Test
public void setWhereConditionsTest() {
bot.buttonWithTooltip("Add Multiple", 2).click();
bot.shell("Select Multiple XPaths").activate();
// bot.comboBox().setSelection("Agent");
// sleep();
SWTBotTreeItem parent = bot.tree().getTreeItem("Conf").expand()
.getNode(0).expand();
parent.select("Config");
sleep();
bot.button("Add").click();
sleep();
bot.activeEditor().save();
sleep(2);
viewParentItem.getNode(PREFIX + "Conf").contextMenu("Delete").click();
sleep();
bot.button("OK").click();
sleep();
}
@After
public void runAfterEveryTest() {
// TODO:add the content
}
}

View File

@@ -0,0 +1,52 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.swtbot.mdm.test.serverview.workflow;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.talend.swtbot.mdm.test.serverview.SWTBotForMDMServiewView;
/**
* DOC rhou class global comment. Detailled comment
*/
@RunWith(SWTBotJunit4ClassRunner.class)
public class WorkflowContentTest extends SWTBotForMDMServiewView {
private SWTBotTreeItem workflowParentItem;
@Before
public void runBeforeEveryTest() {
workflowParentItem = serverItem.getNode("Workflow");
workflowParentItem.expand();
SWTBotTreeItem workflowItem;
if (workflowParentItem.getItems().length > 0) {
workflowItem = workflowParentItem.getNode(0);
workflowItem.doubleClick();
}
}
@After
public void runAfterEveryTest() {
}
@Test
public void workflowContentTest() {
// TODO:need further test codes.
}
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.talend.repositorymanager.selenium.test</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,13 @@
#Tue Sep 14 10:33:44 CEST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.4
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.4

View File

@@ -0,0 +1,9 @@
#Tue Sep 14 10:33:44 CEST 2010
activeProfiles=
eclipse.preferences.version=1
fullBuildGoals=process-test-resources
includeModules=false
resolveWorkspaceProjects=true
resourceFilterGoals=process-resources resources\:testResources
skipCompilerPlugin=true
version=1

View File

@@ -0,0 +1,208 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.talend.repositorymanager.tests</groupId>
<artifactId>repositorymanager-acceptance</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.talend.repositorymanager.tests</groupId>
<artifactId>repositorymanager-tests</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>repositorymanager-tests</name>
<properties>
<repositorymanager.webapp>RepoMngGxt.war</repositorymanager.webapp>
<tomcat.file>file:/d:/apache-tomcat-6.0.20.zip</tomcat.file>
<war.file>RepoMngGxt.war</war.file>
<webapp.url>http://localhost:8080/RepoMngGxt</webapp.url>
<webapp.timeout>240000</webapp.timeout>
<tomcat.home>target/tomcat6x</tomcat.home>
<container.id>tomcat6x</container.id>
<container.type>standalone</container.type>
<selenium.background>true</selenium.background>
<repositorymanager.wait>false</repositorymanager.wait>
</properties>
<dependencies>
<dependency>
<groupId>org.talend.repositorymanager.tests</groupId>
<artifactId>repositorymanager-assembly</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.openqa.selenium</groupId>
<artifactId>selenium-rc</artifactId>
<version>1.0-20081010.060147</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium.client-drivers</groupId>
<artifactId>selenium-java-client-driver</artifactId>
<version>1.0.2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>env-build</id>
<activation>
<property>
<name>env-build</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>xvfb</id>
<phase>package</phase>
<goals>
<goal>xvfb</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<testSourceDirectory>src/main/java</testSourceDirectory>
<plugins>
<!-- JUnit Compilation -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Junit Tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Cargo -->
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<container>
<containerId>${container.id}</containerId>
<zipUrlInstaller>
<url>${tomcat.file}</url>
</zipUrlInstaller>
</container>
<!-- Configuration to use with the Container -->
<configuration>
<type>${container.type}</type>
<home>${tomcat.home}</home>
</configuration>
<!-- Deployment of war file in standalone Tomcat -->
<deployer>
<deployables>
<deployable>
<type>war</type>
<location>${war.file}</location>
<pingURL>${webapp.url}</pingURL>
<pingTimeout>${webapp.timeout}</pingTimeout>
</deployable>
</deployables>
</deployer>
</configuration>
<executions>
<execution>
<id>start-container</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
<goal>deployer-deploy</goal>
</goals>
<configuration>
<wait>${repositorymanager.wait}</wait>
</configuration>
</execution>
<execution>
<id>stop-container</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Selenium management -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>start-selenium</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
<configuration>
<background>${selenium.background}</background>
<logOutput>true</logOutput>
</configuration>
</execution>
<execution>
<id>stop-selenium</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop-server</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,19 @@
package org.talend.repositorymanager.selenium.test.login;
import com.thoughtworks.selenium.SeleneseTestCase;
public class BaseSeleniumConfig extends SeleneseTestCase {
private static String application_server = "localhost";
private static String port = "8080";
private static String browser = "*firefox";
private static String url = "/RepoMngGxt/";
public void setUp() throws Exception {
setUp("http://" + application_server + ":" + port, browser);
}
public static String getUrl() {
return url;
}
}

View File

@@ -0,0 +1,19 @@
package org.talend.repositorymanager.selenium.test.login;
import com.thoughtworks.selenium.Selenium;
public class LoginAdmin extends BaseSeleniumConfig {
public LoginAdmin(Selenium selenium) {
super.selenium = selenium;
}
public void testLogin() throws Exception {
selenium.open(getUrl());
selenium.type("idLoginInput", "admin@company.com");
selenium.type("idLoginPasswordInput", "admin");
selenium.keyDown("idLoginInput", "\\13");
selenium.keyUp("idLoginInput", "\\13");
}
}

View File

@@ -0,0 +1,16 @@
package org.talend.repositorymanager.selenium.test.login;
import com.thoughtworks.selenium.Selenium;
public class Logout extends BaseSeleniumConfig {
public Logout(Selenium selenium) {
super.selenium = selenium;
}
public void testLogout() throws Exception {
selenium.click("idLeftMenuTreeLogoutButton");
}
}

View File

@@ -0,0 +1,29 @@
package org.talend.repositorymanager.selenium.test.login;
import com.thoughtworks.selenium.Selenium;
public class TestAdminLogin extends BaseSeleniumConfig {
Logout logout;
LoginAdmin login_admin;
public TestAdminLogin() {
}
public TestAdminLogin(Selenium selenium) {
super.selenium = selenium;
}
public void setUp() throws Exception {
super.setUp();
login_admin = new LoginAdmin(super.selenium);
logout = new Logout(super.selenium);
}
public void testLogin() throws Exception {
login_admin.testLogin();
selenium.waitForPageToLoad("60000");
logout.testLogout();
}
}

View File

@@ -0,0 +1,13 @@
package org.talend.repositorymanager.selenium.test.login;
public class TestWrongLogin extends BaseSeleniumConfig {
public void testWrongLogin() throws Exception {
selenium.open(getUrl());
selenium.type("idLoginInput", "user@unknown-company.com");
selenium.type("idLoginPasswordInput", "admin");
selenium.keyDown("idLoginInput", "\\13");
selenium.keyUp("idLoginInput", "\\13");
}
}

View File

@@ -0,0 +1,17 @@
package org.talend.repositorymanager.selenium.test.login;
public class TestWrongPassword extends BaseSeleniumConfig {
public void setUp() throws Exception {
super.setUp();
}
public void testWrongPassword() throws Exception {
selenium.open(getUrl());
selenium.type("idLoginInput", "admin@company.com");
selenium.type("idLoginPasswordInput", "wrong_password");
selenium.keyDown("idLoginInput", "\\13");
selenium.keyUp("idLoginInput", "\\13");
}
}

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.talend.repositorymanager-assembly.selenium.test</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,13 @@
#Thu Nov 04 12:35:34 CET 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.4
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.4

View File

@@ -0,0 +1,9 @@
#Thu Nov 04 12:35:31 CET 2010
activeProfiles=
eclipse.preferences.version=1
fullBuildGoals=process-test-resources
includeModules=false
resolveWorkspaceProjects=true
resourceFilterGoals=process-resources resources\:testResources
skipCompilerPlugin=true
version=1

View File

@@ -0,0 +1,64 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.talend.repositorymanager.tests</groupId>
<artifactId>repositorymanager-acceptance</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.talend.repositorymanager.tests</groupId>
<artifactId>repositorymanager-assembly</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>repositorymanager-assembly</name>
<!-- Variables used in the project -->
<properties>
<repositorymanager.webapp>RepoMngGxt.war</repositorymanager.webapp>
<tomcat.file>file:/c:/apache-tomcat-6.0.28-windows-x86.zip</tomcat.file>
<war.file>RepoMngGxt.war</war.file>
<webapp.url>http://localhost:8080/RepoMngGxt</webapp.url>
<webapp.timeout>240000</webapp.timeout>
<tomcat.home>target/tomcat6x</tomcat.home>
<container.id>tomcat6x</container.id>
<container.type>standalone</container.type>
</properties>
<build>
<plugins>
<!-- Tomcat container management -->
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0.3</version>
<configuration>
<container>
<containerId>${container.id}</containerId>
<zipUrlInstaller>
<url>${tomcat.file}</url>
</zipUrlInstaller>
</container>
<!-- Configuration to use with the Container -->
<configuration>
<type>${container.type}</type>
<home>${tomcat.home}</home>
</configuration>
<!-- Deployment of war file in standalone Tomcat -->
<deployer>
<deployables>
<deployable>
<type>war</type>
<location>${war.file}</location>
<pingURL>${webapp.url}</pingURL>
<pingTimeout>${webapp.timeout}</pingTimeout>
</deployable>
</deployables>
</deployer>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,36 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.talend.repositorymanager.tests</groupId>
<artifactId>repositorymanager-acceptance</artifactId>
<packaging>pom</packaging>
<name>repositorymanager-acceptance</name>
<version>1.0-SNAPSHOT</version>
<description>Repository Manager Acceptance parent POM</description>
<scm>
<connection>scm:svn:http://www.talendforge.org/svn/tis_shared/trunk/org.talend.repositorymanager.selenium.test</connection>
<url>http://www.talendforge.org/svn/tis_shared/trunk/org.talend.repositorymanager.selenium.test</url>
</scm>
<modules>
<module>org.talend.repositorymanager-assembly.selenium.test</module>
<module>org.talend.repository-manager-tests.selenium.test</module>
</modules>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<configuration>
<connectionType>connection</connectionType>
<username>${scm.username}</username>
<password>${scm.password}</password>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Selenium2"/>
<classpathentry kind="lib" path="C:/Users/andy/Downloads/apache-log4j-1.2.16/log4j-1.2.16.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/selenium2.19"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.talend.selenium.mdm.test</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<suite name="Suite" parallel="false">
<parameter name="testlink.porject" value="TMDMQA"/>
<parameter name="testlink.id" value="TMDMQA-0"/>
<parameter name ="url" value ="http://localhost:8180"/>
<parameter name ="root" value ="/talendmdm/secure/"/>
<parameter name="user.name" value="administrator" />
<parameter name="user.password" value="administrator" />
<parameter name="message" value="User 'administrator' is already logged in another session!" />
<parameter name="container" value="Product" />
<parameter name="modle" value="Product" />
<parameter name="user.frank.name" value="frank" />
<parameter name="user.frank.password" value="frank" />
<parameter name="user.jennifer.name" value="jennifer" />
<parameter name="user.jennifer.password" value="jennifer" />
<suite-files>
<suite-file path='org/talend/mdm/conf/welcome.xml' />
<suite-file path='org/talend/mdm/conf/license.xml' />
<suite-file path='org/talend/mdm/conf/login.xml' />
<suite-file path='org/talend/mdm/conf/user.xml' />
<suite-file path='org/talend/mdm/conf/productFamilyRecord.xml' />
<suite-file path='org/talend/mdm/conf/productRecord.xml' />
<suite-file path='org/talend/mdm/conf/storeRecord.xml' />
<suite-file path='org/talend/mdm/conf/agencyRecord.xml' />
<suite-file path='org/talend/mdm/conf/agentRecord.xml' />
<suite-file path='org/talend/mdm/conf/dsc.xml' />
</suite-files>
</suite>

View File

@@ -0,0 +1,655 @@
package org.talend.mdm;
import java.awt.AWTException;
import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.ResourceBundle;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.imageio.ImageIO;
import org.apache.log4j.Logger;
import org.openqa.selenium.Alert;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.talend.mdm.TestCase.Result;
import org.testng.Assert;
import org.testng.IClass;
import org.testng.ITestContext;
import org.testng.ITestResult;
import org.testng.Reporter;
import org.testng.TestListenerAdapter;
import org.testng.TestRunner;
import com.google.common.base.Function;
import com.google.common.base.Predicate;
public class Base {
public Logger logger = Logger.getLogger(this.getClass());
public Locale currentLocale = new Locale("en", "US"); // set the locale that
// you want to test
public ResourceBundle rb = ResourceBundle.getBundle("org.talend.mdm.resources.messages",currentLocale);
public ResourceBundle other = ResourceBundle.getBundle("org.talend.mdm.resources.other",currentLocale);
public ResourceBundle locator = ResourceBundle.getBundle("org.talend.mdm.resources.locator",currentLocale);
public enum Browser{
firefox,iexplore
}
public final static int WAIT_TIME_MIN =50;
public final static int WAIT_TIME_MID = 300;
public final static int WAIT_TIME_MAX = 5000;
public static List<TestCase> successTestCases = new ArrayList<TestCase>();
public static List<TestCase> failedTestCases = new ArrayList<TestCase>();
TestCaseRecorder testCaseRecorder = new TestCaseRecorder();
TestCaseScreenRecorder testCaseScreenRecorder;
public WebDriver driver;
public void setDriver(WebDriver driver) {
this.driver = driver;
}
public void sleepCertainTime(int sleepTime){
try {
Thread.sleep(sleepTime);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void refreshBrowser(){
driver.navigate().refresh();
}
public void openURL(WebDriver dri,String url){
dri.get(url);
}
public WebDriver initNewDriver(){
return new FirefoxDriver();
}
public WebElement findElementDefineDriver(WebDriver dri,By by){
return dri.findElement(by);
}
public WebElement waitfor(final By by, int timeout) {
WebElement element = null;
WebDriverWait wait = new WebDriverWait(driver, timeout);
try {
element = wait.until((new Function<WebDriver, WebElement>() {
public WebElement apply(WebDriver webDriver) {
WebElement wElement = webDriver.findElement(by);
if (wElement != null) {
return wElement;
}
return null;
}
}));
} catch (Exception e) {
System.out.println("Couldn't find the element - " + by);
}
return element;
}
public boolean isElementPresent(By by, int timeout) {
if(this.waitfor(by, WAIT_TIME_MIN) == null) {
return false;
} else {
return true;
}
}
public WebElement waitfor(final By by, int checkTimes, int timeout) {
int i=0;
WebElement element = null;
do{
i++;
element = waitfor(by, timeout);
try {
Thread.sleep(timeout);
} catch (InterruptedException e) {
}
}while(element==null | i<=checkTimes);
return element;
}
/**
*/
public boolean waitforElementDisplayed(final By by, int timeout) {
WebDriverWait wait = new WebDriverWait(driver, timeout);
wait.until((new Predicate<WebDriver>(){
public boolean apply(WebDriver webDriver) {
WebElement wElement = webDriver.findElement(by);
return wElement.isDisplayed();
}
}));
return false;
}
/**
*/
public boolean waitforElementDisplayed(final WebElement wElement, int timeout) {
WebDriverWait wait = new WebDriverWait(driver, timeout);
wait.until((new Predicate<WebDriver>(){
public boolean apply(WebDriver webDriver) {
return wElement.isDisplayed();
}
}));
return false;
}
/**
* driver.findElement(By.tagName("body")).getText().contains(what);
* @param by
* @param timeout
*/
public boolean waitforTextDisplayed(final String text, int timeout) {
WebDriverWait wait = new WebDriverWait(driver, timeout);
wait.until((new Predicate<WebDriver>(){
public boolean apply(WebDriver webDriver) {
return driver.findElement(By.tagName("body")).getText().contains(text);
}
}));
return false;
}
/**
* driver.findElement(By.tagName("body")).getText().contains(what);
* @param by
* @param timeout
*/
public boolean waitforTextDisplayed(final String text, int checkTimes, int timeout) {
int i=0;
boolean flag = false;
do{
i++;
flag = this.waitforTextDisplayed(text, timeout);
}while(flag | i>checkTimes);
return flag;
}
/**
* driver.findElement(By.tagName("body")).getText().contains(what);
* @param by
* @param timeout
*/
public boolean waitforTextDisappeared(final String text, int timeout) {
WebDriverWait wait = new WebDriverWait(driver, timeout);
wait.until((new Predicate<WebDriver>(){
public boolean apply(WebDriver webDriver) {
return !driver.findElement(By.tagName("body")).getText().contains(text);
}
}));
return false;
}
public void typeString(WebElement ele,String value){
Assert.assertTrue(ele.isEnabled());
// ele.click();
ele.clear();
ele.sendKeys(value);
}
public void typeString(By by, String str, int timeout) {
WebElement element = this.waitfor(by, timeout);
element.sendKeys(str);
}
public WebElement getElementById(String id) {
return this.waitfor(By.id(id), WAIT_TIME_MIN);
}
public WebElement getElementByName(String name) {
return this.waitfor(By.name(name), WAIT_TIME_MIN);
}
public WebElement getElementByXpath(String xpath) {
return this.waitfor(By.xpath(xpath), WAIT_TIME_MIN);
}
public WebElement getElementByLinkText(String linkText) {
return this.waitfor(By.linkText(linkText), WAIT_TIME_MIN);
}
public void typeTextById(String id, String text) {
this.getElementById(id).sendKeys(text);
// System.out.println("ID - " + this.getElementById(id).getText());
}
public void typeTextByName(String name, String text) {
this.getElementByName(name).sendKeys(text);
}
public void typeTextByXpath(String xpath, String text) {
this.getElementByXpath(xpath).sendKeys(text);
}
public void modifyText(WebElement element,String text) {
element.clear();
element.sendKeys(text);
}
public void modifyTextById(String id, String text) {
this.modifyText(this.getElementById(id), text);
}
public void modifyTextByName(String name, String text) {
this.modifyText(this.getElementByName(name), text);
}
public void modifyTextByXpath(String xpath, String text) {
this.modifyText(this.getElementByXpath(xpath), text);
}
public String getText(){
return driver.findElement(By.tagName("body")).getText();
}
public String getValue(WebElement element){
return element.getText();
}
public boolean isTextPresent(String what) {
try {
return driver.findElement(By.tagName("body")).getText().contains(what);
} catch (Exception e) {
return false;
}
}
public void clickElementById(String id){
this.getElementById(id).click();
}
public void clickElementByName(String name){
this.getElementByName(name).click();
}
public void clickElementByXpath(String xpath){
Assert.assertTrue(this.waitfor(By.xpath(xpath), WAIT_TIME_MIN)!=null);
this.driver.findElement(By.xpath(xpath)).click();
// this.getElementByXpath(xpath).click();
}
public void clickVisibleElementByXpath(String xpath){
List<WebElement> a = this.getElementsByXpath(xpath);
for(int i = 0; i < a.size(); i ++) {
if (a.get(i).isDisplayed()){
a.get(i).click();
}
}
}
public void clickElementByLinkText(String linkText){
this.getElementByLinkText(linkText).click();
}
public List<WebElement> getElementsByXpath(String xpath){
return driver.findElements(By.xpath(xpath));
}
public void dragAndDrop(WebElement source, WebElement target){
(new Actions(driver)).dragAndDrop(source, target).perform();
}
public void dragAndDropBy(WebElement source, int xOffset, int yOffset){
new Actions(driver).dragAndDropBy(source, xOffset, yOffset).perform();
}
public void dragAndDropByXOffset(WebElement source, int xOffset){
new Actions(driver).dragAndDropBy(source, xOffset, 0).perform();
}
public void dragAndDropByYOffset(WebElement source, int yOffset){
new Actions(driver).dragAndDropBy(source, 0, yOffset).perform();
}
public void rightClick(WebElement element){
new Actions(driver).contextClick(element).perform();
}
public void doubleClick(WebElement element){
new Actions(driver).doubleClick(element).perform();
}
public void release(WebElement element){
new Actions(driver).release(element).perform();
}
public void release(){
new Actions(driver).release().perform();
}
public void clickAndOnHold(WebElement element){
new Actions(driver).clickAndHold(element).perform();
}
public void keyDown(WebElement element, Keys keys){
new Actions(driver).keyDown(element, keys).perform();
}
public void keyDown(Keys keys){
new Actions(driver).keyDown(keys).perform();
}
public void keyUp(WebElement element, Keys keys){
new Actions(driver).keyUp(element, keys).perform();
}
public void keyUp(Keys keys){
new Actions(driver).keyUp(keys).perform();
}
public void moveToElement(WebElement element){
new Actions(driver).moveToElement(element).perform();
}
public void moveToElement(WebElement element, int xOffset, int yOffset){
new Actions(driver).moveToElement(element, xOffset, yOffset).perform();
}
public void moveToElement(int xOffset, int yOffset){
new Actions(driver).moveByOffset(xOffset, yOffset).perform();
}
public void acceptAlert(){
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
Alert alert = driver.switchTo().alert();
System.out.println(driver.switchTo().alert().getText());
alert.accept();
}
public void acceptAlert(String allertMessage){
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
Alert alert = driver.switchTo().alert();
Assert.assertTrue((driver.switchTo().alert().getText().contains(allertMessage)),"allert wrong message!");
alert.accept();
}
public void dismissAlert(){
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
Alert alert = driver.switchTo().alert();
System.out.println(driver.switchTo().alert().getText());
alert.dismiss();
}
public void windowMaximize(){
driver.manage().window().maximize();
// Toolkit toolkit = Toolkit.getDefaultToolkit ();
// java.awt.Dimension dim = toolkit.getScreenSize();
// Dimension dimension = new Dimension(dim.width, dim.height);
// driver.manage().window().setSize(dimension);
}
public void captureScreenshot(String filename){
try {
Robot robot = new Robot();
BufferedImage screenShot = robot.createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));
ImageIO.write(screenShot, "JPG", new File(filename));
} catch (IOException e) {
e.printStackTrace();
} catch (AWTException e) {
e.printStackTrace();
}
}
public void onTestListener(ITestContext context, final String imgFilePath){
TestRunner runner = (TestRunner) context;
runner.addListener(new TestListenerAdapter(){
@Override
public void onTestFailure(ITestResult tr) {
Reporter.setCurrentTestResult(tr);
String testCaseInfo = this.getTestCaseInfo(tr);
String methodName = tr.getMethod().getMethodName();
int lineNumber = 0;
for(StackTraceElement element: tr.getThrowable().getStackTrace()) {
if(methodName.equals(element.getMethodName())) {
lineNumber = element.getLineNumber();
}
}
String name = testCaseInfo + "_" + lineNumber + ".png";
try {
captureScreenshot(imgFilePath + File.separator + name);
System.out.println(imgFilePath + File.separator + name);
} catch (Exception e) {
}
this.setTestCaseResultInfo(failedTestCases, testCaseInfo, Result.f);
}
@Override
public void onTestSuccess(ITestResult tr) {
super.onTestSuccess(tr);
Reporter.setCurrentTestResult(tr);
String testCaseInfo = this.getTestCaseInfo(tr);
this.setTestCaseResultInfo(successTestCases, testCaseInfo, Result.p);
}
@Override
public void onTestStart(ITestResult tr) {
String testCaseInfo = this.getTestCaseInfo(tr);
try {
// Comment the video record
// testCaseScreenRecorder = testCaseRecorder.getScreenRecorder(getAbsoluteFolderPath("org/talend/mdm/download") + "/" + testCaseInfo);
logger.info(getAbsoluteFolderPath("org/talend/mdm/download") + "/" + testCaseInfo);
if(testCaseScreenRecorder == null) {
logger.info("testCaseScreenRecorder = null");
}
// testCaseScreenRecorder.start();
} catch (Exception e) {
logger.info(e.getMessage());
e.printStackTrace();
}
super.onTestStart(tr);
}
@Override
public void onFinish(ITestContext testContext) {
try {
if(testCaseScreenRecorder != null) {
testCaseScreenRecorder.stop();
}
} catch (IOException e) {
e.printStackTrace();
} finally {
testCaseScreenRecorder = null;
}
super.onFinish(testContext);
}
public String getTestCaseInfo(ITestResult tr) {
IClass clazz = tr.getTestClass();
String className = clazz.getRealClass().getSimpleName();
String methodName = tr.getMethod().getMethodName();
String parameter = "";
try {
for(Object param : tr.getParameters()) {
String par = (String)param;
parameter = parameter + ",'" + par.replaceAll("/", "_")+"'";
}
} catch (Exception ex) {
ex.printStackTrace();
}
if(parameter!=null && !"".equals(parameter.trim())){
parameter = parameter.substring(1);
}
return className + "." + methodName + "(" + parameter + ")";
}
public void setTestCaseResultInfo(List<TestCase> testcases, String testCaseInfo, Result result) {
TestCase testCase = new TestCase();
String testlinkProject = System.getProperty("testlink.porject");
String testlinkId = System.getProperty("testlink.id");
int id = Integer.parseInt(testlinkId.substring(testlinkProject.length()+1));
testCase.setId(id);
testCase.setResult(result);
testCase.setNote(testCaseInfo + " !");
testCase.setComment(testCaseInfo);
testcases.add(testCase);
}
});
}
/**
* split parameter to an array
* @param parameter
* @return an array
*/
public String[] splitParameter(String parameter){
String[] parameters = parameter.split(",");
return parameters;
}
public String getString(ResourceBundle locator, String key, String[] params) {
String value = locator.getString(key);
for (int i = 0; i < params.length; i++) {
Pattern pattern = Pattern.compile(".*{" + i + "}.*");
Matcher matcher = pattern.matcher(value);
if (matcher.matches()) {
value = value.replace("{" + i + "}", params[i]);
}
}
return value;
}
public String getString(ResourceBundle locator,String key, String param) {
if ("".equals(param) || param == null) {
return locator.getString(key);
} else {
return this.getString(locator, key, new String[] { param });
}
}
public String getAbsoluteFolderPath(String folder) {
String path = Base.class.getClassLoader().getResource(folder).getPath();
if(System.getProperty("os.name").startsWith("Windows")) {
if(path.startsWith("/")){
path = path.substring(1);
}
path = path.replace("/", "\\");
}
return path;
}
public void seletDropDownList(By by,String option){
Assert.assertTrue(this.isElementPresent(by, 3000));
Assert.assertTrue(this.waitfor(by, 50)!=null);
// this.clickElementByXpath(locator.getString("xpath.datatewardship.administration.createtask.panel.taskproperties.tasktype.arrow"));
this.waitfor(by, WAIT_TIME_MIN).click();
// this.clickElementByXpath(locator.getString("xpath.datatewardship.administration.createtask.panel.taskproperties.tasktype.arrow"));
this.isElementPresent(By.xpath("//div[contains(@class,'x-combo-list-item') and contains(text(),'"+option+"')]"),WAIT_TIME_MAX);
this.clickElementByXpath("//div[contains(@class,'x-combo-list-item') and contains(text(),'"+option+"')]");
}
public String getValueInput(By by){
return this.waitfor(by, WAIT_TIME_MIN).getAttribute("value");
}
public Dimension getWindowSize(){
return driver.manage().window().getSize();
}
public int getWindowSizeHeight(){
return driver.manage().window().getSize().height;
}
public int getWindowSizeWidth(){
return driver.manage().window().getSize().width;
}
public WebDriver setWebDriver(Browser browser){
switch(browser) {
case iexplore:
driver = this.setIExplore();
break;
default:
driver = this.setFirefox();
}
return driver;
}
public WebDriver setIExplore(){
DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();
ieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
return new InternetExplorerDriver(ieCapabilities);
}
public WebDriver setFirefox() {
logger.info("webdriver.firefox.bin.path = " + System.getProperty("webdriver.firefox.bin.path"));
if(null == System.getProperty("webdriver.firefox.bin.path") || "".equals(System.getProperty("webdriver.firefox.bin.path").trim()) || System.getProperty("webdriver.firefox.bin.path").trim().contains("webdriver.firefox.bin.path")) {
} else{
System.setProperty("webdriver.firefox.bin", System.getProperty("webdriver.firefox.bin.path").trim());
}
FirefoxProfile firefoxProfile = new FirefoxProfile();
firefoxProfile.setPreference("browser.download.folderList",2);
firefoxProfile.setPreference("browser.download.manager.showWhenStarting",false);
firefoxProfile.setPreference("browser.download.dir", this.getAbsoluteFolderPath("org/talend/mdm/download"));
firefoxProfile.setPreference("browser.helperApps.neverAsk.saveToDisk","text/csv, application/vnd.ms-excel, application/zip, application/pdf");
firefoxProfile.setPreference("dom.max_script_run_time", 0);
firefoxProfile.setPreference("dom.max_chrome_script_run_time", 0);
// firefoxProfile.setPreference("native_events_enabled", false);
firefoxProfile.setPreference("webdriver_enable_native_events", false);
// firefoxProfile.setEnableNativeEvents(true);
logger.info("setEnableNativeEvents-" + firefoxProfile.areNativeEventsEnabled());
// firefoxProfile.setEnableNativeEvents(false);
// logger.info("setEnableNativeEvents-" + firefoxProfile.areNativeEventsEnabled());
return new FirefoxDriver(firefoxProfile);
}
}

View File

@@ -0,0 +1,141 @@
package org.talend.mdm;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.apache.log4j.PropertyConfigurator;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.testng.ITestContext;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
public class Login extends Base{
protected WebDriver driver;
@BeforeClass
@Parameters({"url", "root", "testlink.id", "testlink.porject"})
public void initWebdriver(String url, String root, String testlinkId, String testlinkProject , ITestContext context){
System.setProperty("testlink.id", testlinkId);
System.setProperty("testlink.porject", testlinkProject);
URL file = Login.class.getClassLoader().getResource("org/talend/mdm/resources");
PropertyConfigurator.configure( file.getPath() + "/log4j.properties" );
if(null == System.getProperty("webdriver.browser") || "".equals(System.getProperty("webdriver.browser").trim()) || System.getProperty("webdriver.browser").trim().contains("webdriver.browser")) {
driver = this.setFirefox();
} else{
try {
driver = this.setWebDriver(Browser.valueOf(System.getProperty("webdriver.browser").trim()));
} catch (Exception e) {
logger.info("Doesn't not support the browser of - " + System.getProperty("webdriver.browser").trim() + ", will use firefox!");
driver = this.setFirefox();
}
}
// Old code for firefox
/**
logger.info("webdriver.firefox.bin.path = " + System.getProperty("webdriver.firefox.bin.path").trim());
if(null == System.getProperty("webdriver.firefox.bin.path") || "".equals(System.getProperty("webdriver.firefox.bin.path").trim()) || System.getProperty("webdriver.firefox.bin.path").trim().contains("webdriver.firefox.bin.path")) {
} else{
System.setProperty("webdriver.firefox.bin", System.getProperty("webdriver.firefox.bin.path").trim());
}
FirefoxProfile firefoxProfile = new FirefoxProfile();
firefoxProfile.setPreference("browser.download.folderList",2);
firefoxProfile.setPreference("browser.download.manager.showWhenStarting",false);
firefoxProfile.setPreference("browser.download.dir", this.getAbsoluteFolderPath("org/talend/mdm/download"));
firefoxProfile.setPreference("browser.helperApps.neverAsk.saveToDisk","text/csv, application/vnd.ms-excel, application/zip, application/pdf");
firefoxProfile.setPreference("dom.max_script_run_time", 0);
firefoxProfile.setPreference("dom.max_chrome_script_run_time", 0);
// firefoxProfile.setPreference("native_events_enabled", false);
firefoxProfile.setPreference("webdriver_enable_native_events", false);
// firefoxProfile.setEnableNativeEvents(true);
//
logger.info("setEnableNativeEvents-" + firefoxProfile.areNativeEventsEnabled());
// firefoxProfile.setEnableNativeEvents(false);
//
// logger.info("setEnableNativeEvents-" + firefoxProfile.areNativeEventsEnabled());
driver = new FirefoxDriver(firefoxProfile);
**/
//set driver time out with TimeUnit
driver.manage().timeouts().setScriptTimeout(10, TimeUnit.SECONDS);
logger.info("Set Firefox Driver with Profile");
// driver = new FirefoxDriver();
logger.info("URL - " +url + root);
driver.get(url + root);
super.setDriver(driver);
windowMaximize();
onTestListener(context, Login.class.getClassLoader().getResource("org/talend/mdm/download").getPath());
}
@BeforeMethod
@Parameters( { "user.name", "user.password", "message" })
public void login(String userName, String userPassword, String message) {
this.login(userName, userPassword);
// if (this.isTextPresent(message)) {
// this.getElementById("idLoginForceLogoutButton").click();
// this.getElementById("idLoginButton").click();
// logger.info("Force login TAC");
// }
if(this.isTextPresent(message)) {
this.getElementByLinkText("Force user to logout").click();
this.login(userName, userPassword);
} else {
logger.info("Force Login MDM");
}
}
public void login(String userName, String userPassword) {
WebElement userE = this.getElementByName(locator.getString("id.login.username"));
userE.clear();
userE.sendKeys(userName);
WebElement passwordE = this.getElementByName(locator.getString("id.login.password"));
passwordE.clear();
passwordE.sendKeys(userPassword);
this.getElementByName("login").click();
logger.info("Login MDM");
}
@AfterMethod
public void logout() {
logger.info("Click MDM logout button");
this.getElementByXpath("//button[text()='Logout']").click();
logger.info("Logout MDM");
}
@AfterClass
public void killBroswer() {
driver.quit();
logger.info("WebDriver Quit");
}
@AfterSuite
public void generateXmlReport(){
Results result = new Results();
result.crateXmlFile(result.getResults(failedTestCases), this.getAbsoluteFolderPath("org/talend/mdm/download")+ "/Failed.xml");
result.crateXmlFile(result.getResults(successTestCases), this.getAbsoluteFolderPath("org/talend/mdm/download")+ "/Succes.xml");
}
}

View File

@@ -0,0 +1,43 @@
package org.talend.mdm;
import java.io.FileWriter;
import java.io.IOException;
import java.util.List;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.io.OutputFormat;
import org.dom4j.io.XMLWriter;
public class Results {
public Document getResults(List<TestCase> tcs){
Document document = DocumentHelper.createDocument();
Element results = document.addElement("results");
for(TestCase tc : tcs) {
results.addComment(tc.getComment());
Element testcase = results.addElement("testcase");
testcase.addAttribute("id", tc.getId()+"");
Element result = testcase.addElement("result");
result.setText(tc.getResult().toString());
Element notes = testcase.addElement("notes");
notes.setText(tc.getNote());
}
return document;
}
public void crateXmlFile(Document document, String fileName) {
XMLWriter output;
OutputFormat format = OutputFormat.createPrettyPrint();
try {
output = new XMLWriter(new FileWriter(fileName), format);
output.write(document);
output.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}

View File

@@ -0,0 +1,38 @@
package org.talend.mdm;
public class TestCase {
private int id;
private Result result;
private String note;
private String comment;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public Result getResult() {
return result;
}
public void setResult(Result result) {
this.result = result;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public enum Result {
p,f,b;
}
}

View File

@@ -0,0 +1,59 @@
package org.talend.mdm;
import static org.monte.media.AudioFormatKeys.SampleRateKey;
import static org.monte.media.AudioFormatKeys.SampleSizeInBitsKey;
import static org.monte.media.FormatKeys.EncodingKey;
import static org.monte.media.FormatKeys.FrameRateKey;
import static org.monte.media.FormatKeys.KeyFrameIntervalKey;
import static org.monte.media.FormatKeys.MediaTypeKey;
import static org.monte.media.FormatKeys.MimeTypeKey;
import static org.monte.media.VideoFormatKeys.CompressorNameKey;
import static org.monte.media.VideoFormatKeys.DepthKey;
import static org.monte.media.VideoFormatKeys.QualityKey;
import java.awt.AWTException;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsEnvironment;
import java.io.IOException;
import org.monte.media.Format;
import org.monte.media.FormatKeys.MediaType;
import org.monte.media.math.Rational;
public class TestCaseRecorder {
private TestCaseScreenRecorder screenRecorder;
public TestCaseScreenRecorder getScreenRecorder(String name) throws IOException, AWTException{
GraphicsConfiguration gc = GraphicsEnvironment//
.getLocalGraphicsEnvironment()//
.getDefaultScreenDevice()//
.getDefaultConfiguration();
TestCaseScreenRecorder screenRecorder = new TestCaseScreenRecorder(gc,
// the file format:
new Format(MediaTypeKey, MediaType.FILE, MimeTypeKey, "video/avi"),
//
// the output format for screen capture:
new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey, "tscc",
CompressorNameKey, "tscc",
DepthKey, 8, FrameRateKey, Rational.valueOf(15.0),
QualityKey, 1.0f,
KeyFrameIntervalKey, (int) (15.0 * 60) // one keyframe per minute is enough
),
//
// the output format for mouse capture:
new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey, "black",
FrameRateKey, Rational.valueOf(30.0)),
//
// the output format for audio capture:
new Format(MediaTypeKey, MediaType.AUDIO,
//EncodingKey, audioFormatName,
SampleRateKey, Rational.valueOf(8000),
SampleSizeInBitsKey, 16), name);
return screenRecorder;
}
}

View File

@@ -0,0 +1,890 @@
package org.talend.mdm;
import static java.lang.Math.max;
import static org.monte.media.AudioFormatKeys.ByteOrderKey;
import static org.monte.media.AudioFormatKeys.ChannelsKey;
import static org.monte.media.AudioFormatKeys.ENCODING_QUICKTIME_TWOS_PCM;
import static org.monte.media.AudioFormatKeys.SampleRateKey;
import static org.monte.media.AudioFormatKeys.SampleSizeInBitsKey;
import static org.monte.media.AudioFormatKeys.SignedKey;
import static org.monte.media.AudioFormatKeys.fromAudioFormat;
import static org.monte.media.BufferFlag.SAME_DATA;
import static org.monte.media.FormatKeys.EncodingKey;
import static org.monte.media.FormatKeys.FrameRateKey;
import static org.monte.media.FormatKeys.MIME_AVI;
import static org.monte.media.FormatKeys.MIME_QUICKTIME;
import static org.monte.media.FormatKeys.MediaTypeKey;
import static org.monte.media.FormatKeys.MimeTypeKey;
import static org.monte.media.VideoFormatKeys.COMPRESSOR_NAME_QUICKTIME_ANIMATION;
import static org.monte.media.VideoFormatKeys.CompressorNameKey;
import static org.monte.media.VideoFormatKeys.DepthKey;
import static org.monte.media.VideoFormatKeys.ENCODING_BUFFERED_IMAGE;
import static org.monte.media.VideoFormatKeys.ENCODING_QUICKTIME_ANIMATION;
import static org.monte.media.VideoFormatKeys.HeightKey;
import static org.monte.media.VideoFormatKeys.WidthKey;
import java.awt.AWTException;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.MouseInfo;
import java.awt.Point;
import java.awt.PointerInfo;
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.Robot;
import java.awt.image.BufferedImage;
import java.awt.image.IndexColorModel;
import java.io.File;
import java.io.IOException;
import java.nio.ByteOrder;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.TargetDataLine;
import javax.swing.SwingUtilities;
import org.monte.media.AudioFormatKeys;
import org.monte.media.Buffer;
import org.monte.media.Codec;
import org.monte.media.Format;
import org.monte.media.MovieWriter;
import org.monte.media.Registry;
import org.monte.media.FormatKeys.MediaType;
import org.monte.media.avi.AVIWriter;
import org.monte.media.beans.AbstractStateModel;
import org.monte.media.color.Colors;
import org.monte.media.image.Images;
import org.monte.media.math.Rational;
import org.monte.media.quicktime.QuickTimeWriter;
public class TestCaseScreenRecorder extends AbstractStateModel {
public enum State {
DONE, FAILED, RECORDING
}
private State state=State.DONE;
/**
* "Encoding" for black mouse cursor. */
public final static String ENCODING_BLACK_CURSOR = "black";
/**
* "Encoding" for white mouse cursor. */
public final static String ENCODING_WHITE_CURSOR = "white";
/**
* The file format. "AVI" or "QuickTime" */
private Format fileFormat;
/**
* The video format for cursor capture. "black" or "white". */
private Format mouseFormat;
/**
* The video format for screen capture. */
private Format screenFormat;
/**
* The audio format for audio capture. */
private Format audioFormat;
/**
* The writer for the movie file. */
private MovieWriter w;
/**
* The start time of the recording. */
private long startTime;
/**
* The stoop time of the recording. */
private long stopTime;
/**
* The time the previous screen frame was captured. */
private long prevScreenCaptureTime;
/**
* The AWT Robot which we use for capturing the screen. */
private Robot robot;
/**
* The bounds of the graphics device that we capture with AWT Robot. */
private Rectangle rect;
/**
* Holds the screen capture made with AWT Robot. */
private BufferedImage screenCapture;
/**
* Holds the mouse captures made with {@code MouseInfo}. */
private ArrayBlockingQueue<MouseCapture> mouseCaptures;
/** Holds the composed image (screen capture and super-imposed mouse cursor).
* This is the image that is written into the video track of the file.
*/
private BufferedImage videoImg;
/**
* Graphics object for drawing into {@code videoImg}. */
private Graphics2D videoGraphics;
/**
* Timer for screen captures. */
private ScheduledThreadPoolExecutor screenTimer;
/**
* Timer for mouse captures. */
private ScheduledThreadPoolExecutor mouseTimer;
/**
* Mouse cursor. */
private BufferedImage cursorImg;
/**
* Hot spot of the mouse cursor in cursorImg. */
private Point cursorOffset = new Point(-8, -5);
/**
* Object for thread synchronization. */
private final Object sync = new Object();
/**
* This variable holds the Runnable for audio capture. */
private volatile Thread audioRunner;
/**
* With QuickTime, we can use a variable frame rate. We don't want to
* have frames with a sampleDuration longer than 1000 milliseconds though.
*/
private long maxFrameDuration = 1000;
private volatile Thread writerThread;
private ArrayBlockingQueue<Buffer> writerQueue;
/** This codec encodes a video frame. */
private Codec frameEncoder;
/** outputTime and ffrDuration are needed for conversion of the
* video stream from variable frame rate to fixed frame rate. */
private Rational outputTime;
private Rational ffrDuration;
/** Creates a screen recorder.
*
* @param cfg Graphics configuration of the capture screen.
*/
public TestCaseScreenRecorder(GraphicsConfiguration cfg) throws IOException, AWTException {
this(cfg,
// the file format
new Format(MediaTypeKey, MediaType.FILE,
MimeTypeKey, MIME_QUICKTIME),
//
// the output format for screen capture
new Format(MediaTypeKey, MediaType.VIDEO,
EncodingKey, ENCODING_QUICKTIME_ANIMATION,
CompressorNameKey, COMPRESSOR_NAME_QUICKTIME_ANIMATION,
DepthKey, 24, FrameRateKey, new Rational(15, 1)),
//
// the output format for mouse capture
new Format(MediaTypeKey, MediaType.VIDEO,
EncodingKey, ENCODING_BLACK_CURSOR,
FrameRateKey, new Rational(30, 1)),
//
// the output format for audio capture
new Format(MediaTypeKey, MediaType.AUDIO,
EncodingKey, ENCODING_QUICKTIME_TWOS_PCM,
FrameRateKey, new Rational(48000, 1),
SampleSizeInBitsKey, 16,
ChannelsKey, 2, SampleRateKey, new Rational(48000, 1),
SignedKey, true, ByteOrderKey, ByteOrder.BIG_ENDIAN));
}
/** Creates a screen recorder.
*
* @param cfg Graphics configuration of the capture screen.
* @param fileFormat The file format "AVI" or "QuickTime".
* @param screenFormat The video format for screen capture.
* @param mouseFormat The video format for mouse capture. The {@code EncodingKey}
* must be ENCODING_BLACK_CURSOR or ENCODING_WHITE_CURSOR. The {@code SampleRateKey} can be
* independent from the {@code screenFormat}. Specify null if you
* don't want to capture the mouse cursor.
* @param audioFormat The audio format for audio capture. Specify null
* if you don't want audio capture.
*/
public TestCaseScreenRecorder(GraphicsConfiguration cfg,
Format fileFormat,
Format screenFormat,
Format mouseFormat,
Format audioFormat) throws IOException, AWTException {
this.fileFormat = fileFormat;
this.screenFormat = screenFormat;
this.mouseFormat = mouseFormat;
if (this.mouseFormat == null) {
this.mouseFormat = new Format(FrameRateKey, new Rational(0, 0), EncodingKey, ENCODING_BLACK_CURSOR);
}
this.audioFormat = audioFormat;
rect = cfg.getBounds();
robot = new Robot(cfg.getDevice());
if (screenFormat.get(DepthKey) == 24) {
videoImg = new BufferedImage(rect.width, rect.height, BufferedImage.TYPE_INT_RGB);
} else if (screenFormat.get(DepthKey) == 16) {
videoImg = new BufferedImage(rect.width, rect.height, BufferedImage.TYPE_USHORT_555_RGB);
} else if (screenFormat.get(DepthKey) == 8) {
videoImg = new BufferedImage(rect.width, rect.height, BufferedImage.TYPE_BYTE_INDEXED, Colors.createMacColors());
} else {
throw new IOException("Unsupported color depth " + screenFormat.get(DepthKey));
}
videoGraphics = videoImg.createGraphics();
videoGraphics.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
videoGraphics.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_SPEED);
videoGraphics.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_SPEED);
if (mouseFormat != null && mouseFormat.get(FrameRateKey).intValue() > 0) {
mouseCaptures = new ArrayBlockingQueue<MouseCapture>(mouseFormat.get(FrameRateKey).intValue());
if (this.mouseFormat.get(EncodingKey).equals(ENCODING_BLACK_CURSOR)) {
cursorImg = Images.toBufferedImage(Images.createImage(TestCaseScreenRecorder.class, "/org/monte/media/images/Cursor.black.png"));
} else {
cursorImg = Images.toBufferedImage(Images.createImage(TestCaseScreenRecorder.class, "/org/monte/media/images/Cursor.white.png"));
}
}
createMovieWriter();
}
////--------------------------------------------------------------------------------------------------
protected void createMovieWriter() throws IOException {
File folder;
if (System.getProperty("os.name").toLowerCase().startsWith("windows")) {
folder = new File(System.getProperty("user.home") + File.separator + "Videos");
} else {
folder = new File(System.getProperty("user.home") + File.separator + "Movies");
}
if (!folder.exists()) {
folder.mkdirs();
} else if (!folder.isDirectory()) {
throw new IOException("\"" + folder + "\" is not a directory.");
}
Rational videoRate = Rational.max(screenFormat.get(FrameRateKey), mouseFormat.get(FrameRateKey));
ffrDuration = videoRate.inverse();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd 'at' HH.mm.ss");
Format inputFormat = new Format(MediaTypeKey, MediaType.VIDEO,
EncodingKey, ENCODING_BUFFERED_IMAGE,
WidthKey, rect.width,
HeightKey, rect.height,
FrameRateKey, videoRate).append(screenFormat);
Format outputFormat = new Format(
WidthKey, rect.width,
HeightKey, rect.height,
FrameRateKey, videoRate,
MimeTypeKey, fileFormat.get(MimeTypeKey)).append(screenFormat);
// FIXME - There should be no need for format-specific code.
File f;
if (fileFormat.get(MimeTypeKey).equals(MIME_AVI)) {
AVIWriter aviw;
w = aviw = new AVIWriter(f = new File(folder,//
"ScreenRecording " + dateFormat.format(new Date()) + ".avi"));
w.addTrack(outputFormat);
if (screenFormat.get(DepthKey) == 8) {
aviw.setPalette(0, (IndexColorModel) videoImg.getColorModel());
}
if (audioFormat != null) {
aviw.addTrack(audioFormat);
}
} else if (fileFormat.get(MimeTypeKey).equals(MIME_QUICKTIME)) {
QuickTimeWriter qtw;
w = qtw = new QuickTimeWriter(f = new File(folder,//
"ScreenRecording " + dateFormat.format(new Date()) + ".mov"));
w.addTrack(outputFormat);
if (screenFormat.get(DepthKey) == 8) {
qtw.setVideoColorTable(0, (IndexColorModel) videoImg.getColorModel());
}
if (audioFormat != null) {
qtw.addTrack(audioFormat);
}
} else {
throw new IOException("Unsupported format " + fileFormat);
}
System.out.println("Writing movie to file: " + f);
// Create the video encoder
Codec encoder = Registry.getInstance().getEncoder(w.getFormat(0));
if (encoder == null) {
throw new IOException("No encoder for format " + w.getFormat(0));
}
frameEncoder = encoder;
frameEncoder.setInputFormat(inputFormat);
frameEncoder.setOutputFormat(outputFormat);
if (frameEncoder.getOutputFormat()==null) {
throw new IOException("Unable to encode video frames in this format.");
}
}
public TestCaseScreenRecorder(GraphicsConfiguration cfg,
Format fileFormat,
Format screenFormat,
Format mouseFormat,
Format audioFormat, String file) throws IOException, AWTException {
this.fileFormat = fileFormat;
this.screenFormat = screenFormat;
this.mouseFormat = mouseFormat;
if (this.mouseFormat == null) {
this.mouseFormat = new Format(FrameRateKey, new Rational(0, 0), EncodingKey, ENCODING_BLACK_CURSOR);
}
this.audioFormat = audioFormat;
rect = cfg.getBounds();
robot = new Robot(cfg.getDevice());
if (screenFormat.get(DepthKey) == 24) {
videoImg = new BufferedImage(rect.width, rect.height, BufferedImage.TYPE_INT_RGB);
} else if (screenFormat.get(DepthKey) == 16) {
videoImg = new BufferedImage(rect.width, rect.height, BufferedImage.TYPE_USHORT_555_RGB);
} else if (screenFormat.get(DepthKey) == 8) {
videoImg = new BufferedImage(rect.width, rect.height, BufferedImage.TYPE_BYTE_INDEXED, Colors.createMacColors());
} else {
throw new IOException("Unsupported color depth " + screenFormat.get(DepthKey));
}
videoGraphics = videoImg.createGraphics();
videoGraphics.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
videoGraphics.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_SPEED);
videoGraphics.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_SPEED);
if (mouseFormat != null && mouseFormat.get(FrameRateKey).intValue() > 0) {
mouseCaptures = new ArrayBlockingQueue<MouseCapture>(mouseFormat.get(FrameRateKey).intValue());
if (this.mouseFormat.get(EncodingKey).equals(ENCODING_BLACK_CURSOR)) {
cursorImg = Images.toBufferedImage(Images.createImage(TestCaseScreenRecorder.class, "/org/monte/media/images/Cursor.black.png"));
} else {
cursorImg = Images.toBufferedImage(Images.createImage(TestCaseScreenRecorder.class, "/org/monte/media/images/Cursor.white.png"));
}
}
createMovieWriter(file);
}
////--------------------------------------------------------------------------------------------------
protected void createMovieWriter(String file) throws IOException {
Rational videoRate = Rational.max(screenFormat.get(FrameRateKey), mouseFormat.get(FrameRateKey));
ffrDuration = videoRate.inverse();
Format inputFormat = new Format(MediaTypeKey, MediaType.VIDEO,
EncodingKey, ENCODING_BUFFERED_IMAGE,
WidthKey, rect.width,
HeightKey, rect.height,
FrameRateKey, videoRate).append(screenFormat);
Format outputFormat = new Format(
WidthKey, rect.width,
HeightKey, rect.height,
FrameRateKey, videoRate,
MimeTypeKey, fileFormat.get(MimeTypeKey)).append(screenFormat);
// FIXME - There should be no need for format-specific code.
File f;
if (fileFormat.get(MimeTypeKey).equals(MIME_AVI)) {
AVIWriter aviw;
w = aviw = new AVIWriter(f = new File(file + ".avi"));
w.addTrack(outputFormat);
if (screenFormat.get(DepthKey) == 8) {
aviw.setPalette(0, (IndexColorModel) videoImg.getColorModel());
}
if (audioFormat != null) {
aviw.addTrack(audioFormat);
}
} else if (fileFormat.get(MimeTypeKey).equals(MIME_QUICKTIME)) {
QuickTimeWriter qtw;
w = qtw = new QuickTimeWriter(f = new File(file + ".mov"));
w.addTrack(outputFormat);
if (screenFormat.get(DepthKey) == 8) {
qtw.setVideoColorTable(0, (IndexColorModel) videoImg.getColorModel());
}
if (audioFormat != null) {
qtw.addTrack(audioFormat);
}
} else {
throw new IOException("Unsupported format " + fileFormat);
}
System.out.println("Writing movie to file: " + f);
// Create the video encoder
Codec encoder = Registry.getInstance().getEncoder(w.getFormat(0));
if (encoder == null) {
throw new IOException("No encoder for format " + w.getFormat(0));
}
frameEncoder = encoder;
frameEncoder.setInputFormat(inputFormat);
frameEncoder.setOutputFormat(outputFormat);
if (frameEncoder.getOutputFormat()==null) {
throw new IOException("Unable to encode video frames in this format.");
}
}
/** Returns the state of the recorder. */
public State getState() {
return state;
}
/** Starts the screen recorder. */
public void start() {
startTime = prevScreenCaptureTime = System.currentTimeMillis();
stopTime = Long.MAX_VALUE;
outputTime = new Rational(0, 0);
startWriter();
startScreenCapture();
if (mouseFormat != null && mouseFormat.get(FrameRateKey).intValue() > 0) {
startMouseCapture();
}
if (audioFormat != null) {
startAudioCapture();
}
state= State.RECORDING;
fireStateChanged();
}
/** Starts screen capture. */
private void startScreenCapture() {
screenTimer = new ScheduledThreadPoolExecutor(1);
int delay = max(1, (int) (1000 / screenFormat.get(FrameRateKey).doubleValue()));
screenTimer.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
try {
grabScreen();
} catch (Throwable ex) {
ex.printStackTrace();
screenTimer.shutdown();
recordingFailed();
}
}
}, delay, delay, TimeUnit.MILLISECONDS);
}
/** Starts mouse capture. */
private void startMouseCapture() {
mouseTimer = new ScheduledThreadPoolExecutor(1);
int delay = max(1, (int) (1000 / mouseFormat.get(FrameRateKey).doubleValue()));
mouseTimer.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
try {
grabMouse();
} catch (Throwable ex) {
ex.printStackTrace();
mouseTimer.shutdown();
recordingFailed();
}
}
}, delay, delay, TimeUnit.MILLISECONDS);
}
/** Starts audio capture. */
private void startAudioCapture() {
DataLine.Info info = new DataLine.Info(
TargetDataLine.class, AudioFormatKeys.toAudioFormat(audioFormat));
final TargetDataLine line;
try {
line = (TargetDataLine) AudioSystem.getLine(info);
line.open();
line.start();
audioRunner = new Thread() {
@Override
public void run() {
Buffer buf = new Buffer();
AudioFormat lineFormat = line.getFormat();
buf.format = fromAudioFormat(lineFormat);
// For even sample rates, we select a buffer size that can
// hold half a second of audio. This allows audio/video interlave
// twice a second, as recommended for AVI and QuickTime movies.
// For odd sample rates, we have to select a buffer size that can hold
// one second of audio.
int bufferSize = lineFormat.getFrameSize() * (int) lineFormat.getSampleRate();
if (((int) lineFormat.getSampleRate() & 1) == 0) {
bufferSize /= 2;
}
byte bdat[] = new byte[bufferSize];
buf.data = bdat;
Rational sampleRate = Rational.valueOf(lineFormat.getSampleRate());
Rational frameRate = Rational.valueOf(lineFormat.getFrameRate());
long totalSampleCount = 0;
try {
while (audioRunner == this) {
int count = line.read(bdat, 0, bdat.length);
if (count > 0) {
buf.sampleCount = count * 8 / (lineFormat.getSampleSizeInBits() * lineFormat.getChannels());
buf.sampleDuration = sampleRate.inverse();
buf.offset = 0;
buf.length = count;
buf.track = 1;
buf.timeStamp = new Rational(totalSampleCount, 1).divide(frameRate);
totalSampleCount += buf.sampleCount;
write(buf);
synchronized (sync) {
if (buf.timeStamp.add(buf.sampleDuration.multiply(buf.sampleCount)).compareTo(new Rational(stopTime, 1000)) > 0) {
// FIXME - Truncate the buffer
break;
}
}
}
}
} catch (Throwable e) {
e.printStackTrace();
return;
} finally {
line.close();
}
}
};
audioRunner.start();
} catch (LineUnavailableException ex) {
// FIXME - Instead of silently suppressing audio recording, we should
// print an error message to the user
ex.printStackTrace();
recordingFailed();
}
}
/** Starts file writing. */
private void startWriter() {
writerQueue = new ArrayBlockingQueue<Buffer>(screenFormat.get(FrameRateKey).intValue() + 1);
writerThread = new Thread() {
@Override
public void run() {
try {
while (writerThread == this) {
try {
Buffer buf = writerQueue.take();
doWrite(buf);
} catch (InterruptedException ex) {
// We have been interrupted, terminate
break;
}
}
} catch (Throwable e) {
e.printStackTrace();
recordingFailed();
}
}
};
writerThread.start();
}
private void recordingFailed() {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
try {
state= State.FAILED;
stop();
} catch (IOException ex2) {
ex2.printStackTrace();
}
}
});
}
/** Stops the screen recorder. */
public void stop() throws IOException {
System.out.println("Stopping ScreenRecorder...");
synchronized (sync) {
stopTime = System.currentTimeMillis();
}
if (mouseTimer != null) {
mouseTimer.shutdown();
}
if (screenTimer != null) {
screenTimer.shutdown();
}
Thread pendingAudioCaptureThread = audioRunner;
audioRunner = null;
try {
if (mouseTimer != null) {
mouseTimer.awaitTermination((int) (1000 / mouseFormat.get(FrameRateKey).doubleValue()), TimeUnit.MILLISECONDS);
}
if (screenTimer != null) {
screenTimer.awaitTermination((int) (1000 / screenFormat.get(FrameRateKey).doubleValue()), TimeUnit.MILLISECONDS);
}
if (pendingAudioCaptureThread != null) {
pendingAudioCaptureThread.join();
}
} catch (InterruptedException ex) {
// nothing to do
}
Thread pendingWriterThread = writerThread;
writerThread = null;
try {
if (pendingWriterThread != null) {
pendingWriterThread.interrupt();
pendingWriterThread.join();
}
} catch (InterruptedException ex) {
// nothing to do
ex.printStackTrace();
}
System.out.println("...ScreenRecorder stopped");
System.out.println("Closing File...");
for (int i = 0, n = w.getTrackCount(); i < n; i++) {
System.out.println(" Track " + i + " duration=" + w.getDuration(i));
}
synchronized (sync) {
w.close();
w = null;
}
videoGraphics.dispose();
videoImg.flush();
System.out.println("...File closed");
if (state == State.RECORDING) {
state=State.DONE;
}
fireStateChanged();
}
private long previousGrab = 0;
/** Grabs a screen, generates video images with pending mouse captures
* and writes them into the movie file.
*/
private void grabScreen() throws IOException {
// Capture the screen
BufferedImage previousScreenCapture = screenCapture;
long timeBeforeCapture = System.currentTimeMillis();
previousGrab = timeBeforeCapture;
screenCapture = robot.createScreenCapture(new Rectangle(0, 0, rect.width, rect.height));
long timeAfterCapture = System.currentTimeMillis();
if (previousScreenCapture == null) {
previousScreenCapture = screenCapture;
}
videoGraphics.drawImage(previousScreenCapture, 0, 0, null);
Buffer buf = new Buffer();
buf.format = new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey, ENCODING_BUFFERED_IMAGE);
// Generate video frames with mouse cursor painted on them
boolean hasMouseCapture = false;
if (mouseFormat != null && mouseFormat.get(FrameRateKey).intValue() > 0) {
Point previous = new Point(Integer.MAX_VALUE, Integer.MAX_VALUE);
while (!mouseCaptures.isEmpty() && mouseCaptures.peek().time < timeAfterCapture) {
MouseCapture mouseCapture = mouseCaptures.poll();
if (mouseCapture.time > prevScreenCaptureTime) {
if (mouseCapture.time > timeBeforeCapture) {
previousScreenCapture = screenCapture;
videoGraphics.drawImage(previousScreenCapture, 0, 0, null);
}
hasMouseCapture = true;
Point p = mouseCapture.p;
p.x -= rect.x;
p.y -= rect.y;
synchronized (sync) {
if (mouseCapture.time > stopTime) {
break;
}
if (p.x != previous.x || p.y != previous.y || mouseCapture.time - prevScreenCaptureTime > maxFrameDuration) {
previous.x = p.x;
previous.y = p.y;
// draw cursor
videoGraphics.drawImage(cursorImg, p.x + cursorOffset.x, p.y + cursorOffset.y, null);
try {
buf.clearFlags();
buf.data = videoImg;
buf.sampleDuration = new Rational(mouseCapture.time - prevScreenCaptureTime, 1000);
buf.timeStamp = new Rational(prevScreenCaptureTime - startTime, 1000);
buf.track = 0;
write(buf);
} catch (Throwable t) {
System.out.flush();
t.printStackTrace();
System.err.flush();
System.exit(10);
}
prevScreenCaptureTime = mouseCapture.time;
// erase cursor
videoGraphics.drawImage(previousScreenCapture, //
p.x + cursorOffset.x, p.y + cursorOffset.y,//
p.x + cursorOffset.x + cursorImg.getWidth() - 1, p.y + cursorOffset.y + cursorImg.getHeight() - 1,//
p.x + cursorOffset.x, p.y + cursorOffset.y,//
p.x + cursorOffset.x + cursorImg.getWidth() - 1, p.y + cursorOffset.y + cursorImg.getHeight() - 1,//
null);
}
}
}
}
if (!hasMouseCapture) {
Point p = null;
if (mouseFormat != null) {
PointerInfo info = MouseInfo.getPointerInfo();
p = info.getLocation();
videoGraphics.drawImage(cursorImg, p.x + cursorOffset.x, p.x + cursorOffset.y, null);
}
buf.data = videoImg;
buf.sampleDuration = new Rational(timeAfterCapture - prevScreenCaptureTime, 1000);
buf.timeStamp = new Rational(prevScreenCaptureTime - startTime, 1000);
buf.track = 0;
write(buf);
prevScreenCaptureTime = timeAfterCapture;
if (p != null) {
// erase cursor
videoGraphics.drawImage(previousScreenCapture, //
p.x + cursorOffset.x, p.y + cursorOffset.y,//
p.x + cursorOffset.x + cursorImg.getWidth() - 1, p.y + cursorOffset.y + cursorImg.getHeight() - 1,//
p.x + cursorOffset.x, p.y + cursorOffset.y,//
p.x + cursorOffset.x + cursorImg.getWidth() - 1, p.y + cursorOffset.y + cursorImg.getHeight() - 1,//
null);
}
}
} else {
buf.data = videoImg;
buf.sampleDuration = new Rational(timeAfterCapture - prevScreenCaptureTime, 1000);
buf.timeStamp = new Rational(prevScreenCaptureTime - startTime, 1000);
buf.track = 0;
write(buf);
prevScreenCaptureTime = timeAfterCapture;
}
}
/** Captures the mouse cursor. */
private void grabMouse() {
long now = System.currentTimeMillis();
PointerInfo info = MouseInfo.getPointerInfo();
mouseCaptures.offer(new MouseCapture(now, info.getLocation()));
}
/** Holds a mouse capture. */
private static class MouseCapture {
public long time;
public Point p;
public MouseCapture(long time, Point p) {
this.time = time;
this.p = p;
}
}
/** Writes a buffer into the movie. Since the file system may not be
* immediately available at all times, we do this asynchronously.
* <p>
* The buffer is copied and passed to the writer queue, which is consumed
* by the writer thread. See method startWriter().
* <p>
* AVI does not support a variable frame rate for the video track. Since
* we can not capture frames at a fixed frame rate we have to resend the
* same captured screen multiple times to the writer.
*
* @param buf
* @throws IOException
*/
private void write(Buffer buf) throws IOException {
MovieWriter writer = this.w;
if (writer == null) {
return;
}
// Create a clone of the buffer
// Note that this creates a lot of memory garbage.
// The Java garbage collector seems to handle it well.
// In a "real" application we would probably reuse the buffers with a
// ring buffer.
if (buf.track == 0) {// video track
if (writer.isVFRSupported()) {// variable frame rate is supported => easy
Buffer wbuf = new Buffer();
frameEncoder.process(buf, wbuf);
writerQueue.offer(wbuf);
} else {// variable frame rate not supported => convert to fixed frame rate
Rational inputTime = buf.timeStamp.add(buf.sampleDuration);
boolean isFirst = true;
while (outputTime.compareTo(inputTime) < 0) {
buf.timeStamp = outputTime;
buf.sampleDuration = ffrDuration;
if (isFirst) {
isFirst = false;
} else {
buf.setFlag(SAME_DATA);
}
Buffer wbuf = new Buffer();
if (frameEncoder.process(buf, wbuf) != Codec.CODEC_OK) {
throw new IOException("Codec failed or could not process frame in a single step.");
}
writerQueue.offer(wbuf);
outputTime = outputTime.add(ffrDuration);
}
}
} else {// audio track
Buffer wbuf = new Buffer();
wbuf.setMetaTo(buf);
wbuf.data = ((byte[]) buf.data).clone();
wbuf.length = buf.length;
wbuf.offset = buf.offset;
writerQueue.offer(wbuf);
}
}
/**
* The actual writing of the buffer happens here.
* <p>
* This method is called from the writer thread in startWriter().
*
* @param buf
* @throws IOException
*/
private void doWrite(Buffer buf) throws IOException {
synchronized (sync) {
w.write(buf.track, buf);
// Close file on a separate thread if file is full or an hour
// has passed.
long now = System.currentTimeMillis();
if (w.isDataLimitReached() || now - startTime > 60 * 60 * 1000) {
final MovieWriter closingWriter = w;
new Thread() {
@Override
public void run() {
try {
closingWriter.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
}.start();
createMovieWriter();
startTime = now;
}
}
long end = System.currentTimeMillis();
}
}

View File

@@ -0,0 +1,50 @@
package org.talend.mdm.cases.dsc;
import org.talend.mdm.Login;
import org.talend.mdm.impl.DataStewardImpl;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
public class TestDSC extends Login {
DataStewardImpl dsc;
@BeforeMethod
public void beforeMethod(){
dsc = new DataStewardImpl(driver);
}
@Test
@Parameters( {"task.name","task.type.resotion","task.default.source","task.fieldName1"})
public void testCreateTaskWithTypeResolution(String taskName,String taskType,String source ,String filedName1){
dsc.createTaskWithTypeDefined(taskName, taskType, source,filedName1);
}
@Test
@Parameters( {"task.name","task.type.data","task.default.source","task.fieldName1"})
public void testCreateTaskWithTypeData(String taskName,String taskType,String source ,String filedName1){
dsc.createTaskWithTypeDefined(taskName, taskType, source,filedName1);
}
@Test
@Parameters( {"task.name","task.type.data","task.default.source","task.fieldName1"})
public void testTaskAssignment(String taskName,String taskType,String source ,String filedName1){
dsc.taskAssign(taskName, taskType, source,filedName1,"user","user","administrator","administrator");
}
@AfterMethod
@Override
public void logout() {
}
}

View File

@@ -0,0 +1,44 @@
package org.talend.mdm.cases.license;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.talend.mdm.Login;
import org.talend.mdm.impl.LicenseImpl;
import org.talend.mdm.impl.LogonImpl;
import org.talend.mdm.impl.UserImpl;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
public class TestLicense extends Login {
LicenseImpl license;
@BeforeMethod
public void beforeMethod(){
license = new LicenseImpl(driver);
logger.info("Set Before Info");
}
@Test
@Parameters( {"license.file.path"})
public void testUploadValidLicense(String fileLicenseValid){
license.uploadValidLicense(fileLicenseValid);
}
@Test
@Parameters( {"license.file.path"})
public void testUploadInValidLicense(String fileLicenseValid){
license.uploadInValidLicense(fileLicenseValid);
}
@Test
@Parameters( {"license.file.path"})
public void testUploadExpiredLicense(String fileLicenseValid){
license.uploadExpiredLicense(fileLicenseValid);
}
}

View File

@@ -0,0 +1,53 @@
package org.talend.mdm.cases.login;
import org.talend.mdm.Base;
import org.talend.mdm.Login;
import org.talend.mdm.impl.LicenseImpl;
import org.talend.mdm.impl.LogonImpl;
import org.talend.mdm.impl.UserImpl;
import org.talend.mdm.modules.Logon;
import org.testng.ITestContext;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
public class TestLogin extends Base {
LogonImpl log;
@BeforeMethod
public void beforeMethod(){
log = new LogonImpl(driver);
}
@Test
@Parameters( { "url", "root","user.name","user.password","message" })
public void testRightLogin(String url,String root,String userName,String userPassword,String message,ITestContext context) {
log.initWebdriver(url, root, context);
log.loginAdministratorImpl( userName, userPassword , message);
}
@Test
@Parameters( { "url", "root","user.name","user.password","message" })
public void testLogoutCorrectly(String url,String root,String userName,String userPassword,String message,ITestContext context) {
log.initWebdriver(url, root, context);
log.loginAdministratorLogoutImpl( userName, userPassword , message);
}
@Test
@Parameters( { "url", "root","user.name","user.password","message" ,"session.timeout"})
public void testLoginAndSessionTimeout(String url,String root,String userName,String userPassword,String message,int timeout,ITestContext context) {
log.initWebdriver(url, root, context);
log.loginAdministratorSessionTimeoutImpl(userName, userPassword, message, timeout);
}
@Test
@Parameters( { "url", "root","user.name","user.password","message.wrong.username" })
public void testWongLogin(String url,String root,String userName,String userPassword,String message,ITestContext context) {
log.initWebdriver(url, root, context);
log.loginWithWrongNamePassImpl( userName, userPassword , message);
}
}

View File

@@ -0,0 +1,88 @@
package org.talend.mdm.cases.record;
import org.talend.mdm.Login;
import org.talend.mdm.impl.RecordImpl;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
public class TestRecord extends Login {
RecordImpl recordImpl;
@BeforeMethod
public void beforeMethod(){
recordImpl = new RecordImpl(driver);
logger.info("Set Before Info");
}
@Test
@Parameters( { "container","modle","entity","feild1Value","feild1Name" })
public void testDeleteRecord(String container,String modle,String entity,String feild1Value,String feild1Name ) {
recordImpl.deleteRecordImpl(container,modle,entity,feild1Value,feild1Name);
}
/*@Test
@Parameters( { "container","modle","entity","feild1Value","feild1Name" })
public void testExportRecord(String container,String modle,String entity,String feild1Value,String feild1Name ) {
recordImpl.ExportRecordImpl(container,modle,entity);
}*/
@Test
@Parameters( { "container","modle","entity" })
public void testExportRecord(String container,String modle,String entity ) {
recordImpl.ExportRecordImpl(container,modle,entity);
}
/*@Test
@Parameters( { "container","modle","entity","feild1Value","feild1Name" })
public void testJournalOpenRecord(String container,String modle,String entity,String feild1Value,String feild1Name ) {
recordImpl.JournalOpenRecordImpl(container,modle,entity,feild1Value,feild1Name);
}
*/
@Test
@Parameters( { "container","modle","entity","feild1Value","feild1Name" })
public void testDeleteRecordToRecycle(String container,String modle,String entity,String feild1Value,String feild1Name ) {
recordImpl.deleteRecordToRecycleImpl(container,modle,entity,feild1Value,feild1Name);
}
@Test
@Parameters( { "container","modle","entity","feild1Value","feild1Name" })
public void testRestoreFromRecycle(String container,String modle,String entity,String feild1Value,String feild1Name ) {
recordImpl.restoreFromRecycleImpl(container, modle, entity, feild1Value, feild1Name);
}
@Test
@Parameters( { "container","modle","entity", "feild2Value","feild2Name" })
public void testCreateRecord(String container,String modle,String entity,String feild2Value,String feild2Name) {
recordImpl.createRecordImpl(container, modle, entity, feild2Value, feild2Name);
}
@Test
@Parameters( { "container","modle","entity","feild2Value_old", "feild2Value","feild2Name" })
public void testDuplicateRecord(String container,String modle,String entity,String feild2Value_old,String feild2Value,String feild2Name) {
recordImpl.duplicateRecordImpl(container, modle, entity, feild2Value_old, feild2Value, feild2Name);
}
@Test
@Parameters( { "container","modle","entity","feild2Value_old", "feild2Value","feild2Name"})
public void testUpdateRecord(String container,String modle,String entity,String feild2Value_old,String feild2Value,String feild2Name) {
recordImpl.updateRecordImpl(container, modle, entity,feild2Value_old, feild2Value, feild2Name);
}
@Test
@Parameters( { "container","modle","entity","searchFeild", "opeartion", "value" })
public void testSearchRecordByValue(String container,String modle,String entity,String searchFeild,String opeartion,String value) {
recordImpl.SearchRecordByValueImpl(container, modle, entity, searchFeild,opeartion,value);
}
@Test
@Parameters( { "container","modle","entity","searchFeild", "opeartion", "value" })
public void testSearchRecordByString(String container,String modle,String entity,String searchFeild,String opeartion,String value) {
recordImpl.SearchRecordByStringImpl(container, modle, entity, searchFeild,opeartion,value);
}
@Test
@Parameters( { "container","modle","entity","searchFeild", "opeartion", "value" })
public void testSearchRecordByDate(String container,String modle,String entity,String searchFeild,String opeartion,String value) {
recordImpl.SearchRecordByDateImpl(container, modle, entity, searchFeild,opeartion,value);
}
}

View File

@@ -0,0 +1,39 @@
package org.talend.mdm.cases.record;
import org.talend.mdm.Login;
import org.talend.mdm.impl.RecordImplAgency;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
public class TestRecordAgency extends Login {
RecordImplAgency recordImpl;
@BeforeMethod
public void beforeMethod(){
recordImpl = new RecordImplAgency(driver);
logger.info("Set Before Info");
}
@Test
@Parameters( { "container","modle","entity","Identifie" ,"IdentifieValue"})
public void testDeleteRecord(String container,String modle,String entity,String Identifie,String IdentifieValue ) {
recordImpl.deleteRecordImpl(container,modle,entity, Identifie,IdentifieValue);
}
@Test
@Parameters( { "container","modle","entity", "Name","NameValue","Identifie" ,"IdentifieValue","Zipcode","ZipcodeValue"})
public void testCreateRecord(String container,String modle,String entity,String Name,String NameValue,String Identifie,String IdentifieValue,String Zipcode,String ZipcodeValue ) {
recordImpl.createRecordImpl(container, modle, entity, Name,NameValue, Identifie,IdentifieValue,Zipcode,ZipcodeValue);
}
@Test
@Parameters( { "container","modle","entity","Identifie" ,"IdentifieValue","IdentifieValueDup" })
public void testDuplicateRecord(String container,String modle,String entity,String Identifie,String IdentifieValue,String IdentifieValueDup ) {
recordImpl.duplicateRecordImpl(container, modle, entity, Identifie,IdentifieValue, IdentifieValueDup);
}
@Test
@Parameters( { "container","modle","entity","Identifie" ,"IdentifieValue","Zipcode","ZipcodeValue"})
public void testUpdateRecord(String container,String modle,String entity,String Identifie,String IdentifieValue,String Zipcode,String ZipcodeValue ) {
recordImpl.updateRecordImpl(container, modle, entity,Identifie,IdentifieValue,Zipcode,ZipcodeValue);
}
}

View File

@@ -0,0 +1,57 @@
package org.talend.mdm.cases.record;
import org.talend.mdm.Login;
import org.talend.mdm.impl.RecordImplAgent;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
public class TestRecordAgent extends Login {
RecordImplAgent recordImpl;
@BeforeMethod
public void beforeMethod(){
recordImpl = new RecordImplAgent(driver);
logger.info("Set Before Info");
}
@Test
@Parameters( { "container","modle","entity","Identifie" ,"IdentifieValue"})
public void testDeleteRecord(String container,String modle,String entity,String Identifie,String IdentifieValue ) {
recordImpl.deleteRecordImpl(container,modle,entity, Identifie,IdentifieValue);
}
@Test
@Parameters( { "container","modle","entity","Identifie" ,"IdentifieValue", "Firstname","FirstnameValue","Lastname","LastnameValue","CommissionCode" ,"CommissionCodeValue","StartDate","StartDateValue"})
public void testCreateRecord(String container,String modle,String entity,String Identifie,String IdentifieValue,String Firstname,String FirstnameValue,String Lastname,String LastnameValue,String CommissionCode,String CommissionCodeValue,String StartDate,String StartDateValue ) {
recordImpl.createRecordImpl(container, modle, entity,Identifie,IdentifieValue,Firstname,FirstnameValue,Lastname,LastnameValue,CommissionCode,CommissionCodeValue,StartDate,StartDateValue );
}
@Test
@Parameters( { "container","modle","entity","Identifie" ,"IdentifieValue","CommissionCode" ,"CommissionCodeValue","CommissionCodeValueUpdate"})
public void testUpdateRecord(String container,String modle,String entity,String Identifie,String IdentifieValue,String CommissionCode,String CommissionCodeValue,String CommissionCodeValueUpdate) {
recordImpl.UpdateRecordImpl(container, modle, entity,Identifie,IdentifieValue,CommissionCode,CommissionCodeValue,CommissionCodeValueUpdate);
}
@Test
@Parameters( { "container","modle","entity","Identifie" ,"IdentifieValue","IdentifieValueDup", "Firstname","FirstnameValue"})
public void testDuplicateRecord(String container,String modle,String entity,String Identifie,String IdentifieValue,String IdentifieValueDup,String Firstname,String FirstnameValue) {
recordImpl.DuplicateRecordImpl(container, modle, entity,Identifie,IdentifieValue,IdentifieValueDup,Firstname,FirstnameValue);
}
@Test
@Parameters( { "container","modle","entity","Identifie" ,"IdentifieValue", "Firstname","FirstnameValue","Lastname","LastnameValue","CommissionCode" ,"CommissionCodeValue","StartDate","StartDateValue"})
public void testCreateRecordWrongRule(String container,String modle,String entity,String Identifie,String IdentifieValue,String Firstname,String FirstnameValue,String Lastname,String LastnameValue,String CommissionCode,String CommissionCodeValue,String StartDate,String StartDateValue ) {
recordImpl.createRecordWrongRuleImpl(container, modle, entity,Identifie,IdentifieValue,Firstname,FirstnameValue,Lastname,LastnameValue,CommissionCode,CommissionCodeValue,StartDate,StartDateValue );
}
@Test
@Parameters( {"user.frank.name","user.frank.password","user.jennifer.name","user.jennifer.password", "container","modle","entity","Identifie" ,"IdentifieValue", "Firstname","FirstnameValue","Lastname","LastnameValue","CommissionCode" ,"CommissionCodeValue","StartDate","StartDateValue" })
public void testChangeCommissionCodeNotApprovedWorkflow(String userFrank,String frankPass,String userJennifer,String jenniferPass,String container,String modle,String entity,String Identifie,String agentID,String Firstname,String FirstnameValue,String Lastname,String LastnameValue,String CommissionCode,String CommissionCodeValue,String StartDate,String StartDateValue ) {
recordImpl.changeCommissionCodeNotApprovedWorkflow( userFrank, frankPass, userJennifer, jenniferPass,container, modle, entity,Identifie,agentID, Firstname, FirstnameValue, Lastname, LastnameValue, CommissionCode, CommissionCodeValue, StartDate, StartDateValue );
}
@Test
@Parameters( {"user.frank.name","user.frank.password","user.jennifer.name","user.jennifer.password", "container","modle","entity","Identifie" ,"IdentifieValue", "Firstname","FirstnameValue","Lastname","LastnameValue","CommissionCode" ,"CommissionCodeValue","StartDate","StartDateValue" })
public void testChangeCommissionCodeApprovedWorkflow(String userFrank,String frankPass,String userJennifer,String jenniferPass,String container,String modle,String entity,String Identifie,String agentID,String Firstname,String FirstnameValue,String Lastname,String LastnameValue,String CommissionCode,String CommissionCodeValue,String StartDate,String StartDateValue ) {
recordImpl.changeCommissionCodeApprovedWorkflow( userFrank, frankPass, userJennifer, jenniferPass,container, modle, entity,Identifie,agentID, Firstname, FirstnameValue, Lastname, LastnameValue, CommissionCode, CommissionCodeValue, StartDate, StartDateValue );
}
}

View File

@@ -0,0 +1,96 @@
package org.talend.mdm.cases.record;
import org.talend.mdm.Login;
import org.talend.mdm.impl.RecordImplProduct;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
public class TestRecordProduct extends Login {
RecordImplProduct recordImpl;
@BeforeMethod
public void beforeMethod(){
recordImpl = new RecordImplProduct(driver);
logger.info("Set Before Info");
}
@Test
@Parameters( { "container","modle","entity","UniqueId","UniqueIdValue" })
public void testDeleteRecord(String container,String modle,String entity,String UniqueId,String UniqueIdValue ) {
recordImpl.deleteRecordImpl(container,modle,entity,UniqueId,UniqueIdValue);
}
@Test
@Parameters( { "container","modle","entity","UniqueId","UniqueIdValue" })
public void testDeleteToRecycleRecord(String container,String modle,String entity,String UniqueId,String UniqueIdValue ) {
recordImpl.deleteRecordToRecycleImpl(container,modle,entity,UniqueId,UniqueIdValue);
}
@Test
@Parameters( { "container","modle","entity","UniqueId","UniqueIdValue" })
public void testRestoreFromRecycleRecord(String container,String modle,String entity,String UniqueId,String UniqueIdValue ) {
recordImpl.restoreFromRecycleImpl(container,modle,entity,UniqueId,UniqueIdValue);
}
@Test
@Parameters( { "container","modle","entity", "UniqueId","UniqueIdValue","Name","NameValue","Description","DescriptionValue","Price","PriceValue"})
public void testCreateRecord(String container,String modle,String entity,String UniqueId,String UniqueIdValue,String Name,String NameValue,String Description,String DescriptionValue,String Price,String PriceValue) {
recordImpl.createRecordImpl(container, modle, entity, UniqueId,UniqueIdValue,Name,NameValue,Description,DescriptionValue,Price,PriceValue);
}
@Test
@Parameters( { "container","modle","entity", "UniqueId","UniqueIdValue","UniqueIdValueDup"})
public void testDuplicateRecord(String container,String modle,String entity,String UniqueId,String UniqueIdValue,String UniqueIdValueDup) {
recordImpl.testDuplicateRecordImpl(container, modle, entity, UniqueId,UniqueIdValue,UniqueIdValueDup);
}
@Test
@Parameters( { "container","modle","entity", "UniqueId","UniqueIdValue","Price","PriceValue","flag","PriceValueOld"})
public void testUpdatePriceRecord(String container,String modle,String entity,String UniqueId,String UniqueIdValue,String Price,String PriceValue,String flag,String PriceValueOld) {
recordImpl.testUpdatePriceRecordImpl(container, modle, entity, UniqueId,UniqueIdValue,Price,PriceValue,flag,PriceValueOld);
}
@Test
@Parameters( { "container","modle","entity","entity_Element","searchFeild","searchFeild_Element","opeartion", "value" })
public void testSearchRecordByValue(String container,String modle,String entity,String entity_Element,String searchFeild,String searchFeild_Element,String opeartion,String value) {
recordImpl.SearchRecordByValueImpl(container, modle, entity,entity_Element ,searchFeild,searchFeild_Element,opeartion,value);
}
@Test
@Parameters( { "container","modle","entity","entity_Element","searchFeild","searchFeild_Element","opeartion", "value" })
public void testSearchRecordByString(String container,String modle,String entity,String entity_Element,String searchFeild,String searchFeild_Element,String opeartion,String value) {
recordImpl.SearchRecordByStringImpl(container, modle, entity, entity_Element ,searchFeild,searchFeild_Element,opeartion,value);
}
@Test
@Parameters( {"user.frank.name","user.frank.password","user.jennifer.name","user.jennifer.password", "container","modle","entity","UniqueIdValue"})
public void testPriceChangeValidApprovedWorkflow(String userFrank,String frankPass,String userJennifer,String jenniferPass,String container,String model,String entity,String productUniqID) {
recordImpl.priceChangeWorkFlowValidApprovedImpl(userFrank, frankPass, userJennifer, jenniferPass, container, model, entity,productUniqID);
}
@Test
@Parameters( {"user.frank.name","user.frank.password","user.jennifer.name","user.jennifer.password", "container","modle","entity","UniqueIdValue"})
public void testPriceValidNotApproveWorkFlow(String userFrank,String frankPass,String userJennifer,String jenniferPass,String container,String model,String entity,String productUniqID) {
recordImpl.priceChangeWorkFlowValidNotApprovedImpl(userFrank, frankPass, userJennifer, jenniferPass, container, model, entity,productUniqID);
}
@Test
@Parameters( {"user.frank.name","user.frank.password","user.jennifer.name","user.jennifer.password", "container","modle","entity","UniqueIdValue"})
public void testPriceChangeInvalidWorkflow(String userFrank,String frankPass,String userJennifer,String jenniferPass,String container,String model,String entity,String productUniqID) {
recordImpl.priceChangeWorkFlowInValidImpl(userFrank, frankPass, userJennifer, jenniferPass, container, model, entity,productUniqID);
}
@Test
@Parameters( {"container","modle","entity","UniqueIdValue"})
public void testStoreShowOnMapProcess(String container,String model,String entity,String productUniqID) {
recordImpl.storeShowOnMapProcessImpl(container, model, entity,productUniqID);
}
@Test
@Parameters( {"user.frank.name","user.frank.password","user.jennifer.name","user.jennifer.password", "container","modle","entity","UniqueIdValue","familyid","familyname","franksubmited.familyname"})
public void testForeignKeyInforDisplay(String userFrank,String frankPass,String userJennifer,String jenniferPass,String container,String model,String entity,String productUniqID,String productFamilyId,String productFamilyName,String frankSubmitedFamilyName) {
recordImpl.foreignKeyInfoDisplay(userFrank, frankPass, userJennifer, jenniferPass, container, model, entity,productUniqID, productFamilyId, productFamilyName, frankSubmitedFamilyName);
}
@Test
@Parameters( {"user.frank.name","user.frank.password","user.jennifer.name","user.jennifer.password", "container","modle","entity","UniqueIdValue","familyid","familyname","franksubmited.familyname"})
public void testTwoWaysOpenWorkFlow(String userFrank,String frankPass,String userJennifer,String jenniferPass,String container,String model,String entity,String productUniqID,String productFamilyId,String productFamilyName,String frankSubmitedFamilyName) {
recordImpl.openWorkflowTask(userFrank, frankPass, userJennifer, jenniferPass, container, model, entity,productUniqID, productFamilyId, productFamilyName, frankSubmitedFamilyName);
}
}

View File

@@ -0,0 +1,82 @@
package org.talend.mdm.cases.record;
import org.talend.mdm.Login;
import org.talend.mdm.impl.RecordImplProductFamily;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
public class TestRecordProductFamily extends Login {
RecordImplProductFamily recordImpl;
@BeforeMethod
public void beforeMethod(){
recordImpl = new RecordImplProductFamily(driver);
logger.info("Set Before Info");
}
@Test
@Parameters( { "container","modle","entity","feild2Value","feild2Name","feild1Name" })
public void testDeleteRecord(String container,String modle,String entity,String feild2Value,String feild2Name,String feild1Name ) {
recordImpl.deleteRecordImpl(container,modle,entity,feild2Value,feild2Name,feild1Name);
}
/*@Test
@Parameters( { "container","modle","entity","feild1Value","feild1Name" })
public void testExportRecord(String container,String modle,String entity,String feild1Value,String feild1Name ) {
recordImpl.ExportRecordImpl(container,modle,entity);
}*/
@Test
@Parameters( { "container","modle","entity" })
public void testExportRecord(String container,String modle,String entity ) {
recordImpl.ExportRecordImpl(container,modle,entity);
}
@Test
@Parameters( { "container","modle","entity","feild2Value","feild2Name" ,"feild1Name"})
public void testDeleteRecordToRecycle(String container,String modle,String entity,String feild2Value,String feild2Name ,String feild1Name) {
recordImpl.deleteRecordToRecycleImpl(container,modle,entity,feild2Value,feild2Name,feild1Name);
}
@Test
@Parameters( { "container","modle","entity","feild2Value","feild2Name" })
public void testRestoreFromRecycle(String container,String modle,String entity,String feild2Value,String feild2Name ) {
recordImpl.restoreFromRecycleImpl(container, modle, entity, feild2Value, feild2Name);
}
@Test
@Parameters( { "container","modle","entity", "feild2Value","feild2Name","feild1Name" })
public void testCreateRecord(String container,String modle,String entity,String feild2Value,String feild2Name,String feild1Name) {
recordImpl.createRecordImpl(container, modle, entity, feild2Value, feild2Name,feild1Name);
}
@Test
@Parameters( { "container","modle","entity","feild2Value_old", "feild2Value","feild2Name" ,"feild1Name" })
public void testDuplicateRecord(String container,String modle,String entity,String feild2Value_old,String feild2Value,String feild2Name,String feild1Name) {
recordImpl.duplicateRecordImpl(container, modle, entity, feild2Value_old, feild2Value, feild2Name,feild1Name);
}
@Test
@Parameters( { "container","modle","entity","feild2Value_old", "feild2Value","feild2Name","feild1Name" })
public void testUpdateRecord(String container,String modle,String entity,String feild2Value_old,String feild2Value,String feild2Name,String feild1Name) {
recordImpl.updateRecordImpl(container, modle, entity,feild2Value_old, feild2Value, feild2Name, feild1Name);
}
@Test
@Parameters( { "container","modle","entity","searchFeild", "opeartion", "value" })
public void testSearchRecordByValue(String container,String modle,String entity,String searchFeild,String opeartion,String value) {
recordImpl.SearchRecordByValueImpl(container, modle, entity, searchFeild,opeartion,value);
}
@Test
@Parameters( { "container","modle","entity","searchFeild", "opeartion", "value" })
public void testSearchRecordByString(String container,String modle,String entity,String searchFeild,String opeartion,String value) {
recordImpl.SearchRecordByStringImpl(container, modle, entity, searchFeild,opeartion,value);
}
@Test
@Parameters( { "container","modle","entity","searchFeild", "opeartion", "value" })
public void testSearchRecordByDate(String container,String modle,String entity,String searchFeild,String opeartion,String value) {
recordImpl.SearchRecordByDateImpl(container, modle, entity, searchFeild,opeartion,value);
}
}

View File

@@ -0,0 +1,43 @@
package org.talend.mdm.cases.record;
import org.talend.mdm.Login;
import org.talend.mdm.impl.RecordImplStore;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
public class TestRecordStore extends Login {
RecordImplStore recordImpl;
@BeforeMethod
public void beforeMethod(){
recordImpl = new RecordImplStore(driver);
logger.info("Set Before Info");
}
@Test
@Parameters( { "container","modle","entity","storeId","storeIdValue" })
public void testDeleteRecord(String container,String modle,String entity,String UniqueId,String UniqueIdValue ) {
recordImpl.deleteRecordImpl(container,modle,entity,UniqueId,UniqueIdValue);
}
@Test
@Parameters( { "container","modle","entity", "storeId","storeIdValue","address","addressValue"})
public void testCreateRecord(String container,String modle,String entity,String storeId,String storeIdValue,String address,String addressValue) {
recordImpl.createRecordImpl(container, modle, entity,storeId,storeIdValue,address,addressValue);
}
@Test
@Parameters( { "container","modle","entity", "storeId","storeIdValue","storeIdValueDup"})
public void testDuplicateRecord(String container,String modle,String entity,String storeId,String storeIdValue,String storeIdValueDup) {
recordImpl.testDuplicateRecordImpl(container, modle, entity,storeId, storeIdValue,storeIdValueDup);
}
@Test
@Parameters( { "container","modle","entity","storeId","storeIdValue","address","addressValue"})
public void testUpdateAddressRecord(String container,String modle,String entity,String storeId,String storeIdValue,String address,String addressValue) {
recordImpl.testUpdateAddressRecordImpl(container, modle, entity,storeId,storeIdValue,address,addressValue);
}
}

View File

@@ -0,0 +1,133 @@
package org.talend.mdm.cases.user;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.talend.mdm.Login;
import org.talend.mdm.impl.LicenseImpl;
import org.talend.mdm.impl.LogonImpl;
import org.talend.mdm.impl.UserImpl;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
public class TestUser extends Login {
UserImpl userImpl;
LicenseImpl license;
LogonImpl loger;
@BeforeMethod
public void beforeMethod(){
loger = new LogonImpl(driver);
userImpl = new UserImpl(driver);
license = new LicenseImpl(driver);
logger.info("Set Before Info");
}
@Test
@Parameters( { "roles" })
public void testAddUserAllowedAdmin(String roles) {
license.openLicense();
userImpl.addUserAllowed(roles, license.getAvailableAdmin());
}
@Test
@Parameters( { "identifier", "first.name", "last.name", "password", "confirm.password", "email", "company", "default.version", "active", "roles" })
public void testAddUserAdminOverAllowed(String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion,boolean active,String roles) {
license.openLicense();
userImpl.addUserOverAllowedAdmin(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, roles,license.getAvailableWeb());
}
@Test
@Parameters( { "roles" })
public void testAddUserAllowedWeb(String roles) {
license.openLicense();
userImpl.addUserAllowed(roles, license.getAvailableWeb());
}
@Test
@Parameters( { "identifier", "first.name", "last.name", "password", "confirm.password", "email", "company", "default.version", "active", "roles" })
public void testAddUserWebOverAllowed(String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion,boolean active,String roles) {
license.openLicense();
userImpl.addUserOverAllowedWeb(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, roles,license.getAvailableWeb());
}
@Test
@Parameters( { "identifier", "first.name", "last.name", "password", "confirm.password", "email", "company", "default.version", "active", "roles" })
public void testAddUserWebOverAllowedInactive(String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion,boolean active,String roles) {
license.openLicense();
userImpl.addUserOverAllowedWebInactive(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, roles,license.getAvailableWeb());
}
@Test
@Parameters( {"user.name","identifier", "first.name", "last.name", "password", "confirm.password", "email", "company", "default.version", "active", "roles" })
public void testAddUserMultipleRoles(String userNameAdministrator,String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active,String roles) {
userImpl.addUserWithMultipleRoles("test",identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, splitParameter(roles));
}
@Test
@Parameters( {"user.name","identifier", "first.name", "last.name", "password", "confirm.password", "email", "company", "default.version", "active", "roles" })
public void testUserSelectedAfterSave(String userNameAdministrator,String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active,String roles) {
userImpl.userSelectedAfterSave(userNameAdministrator,identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, splitParameter(roles));
}
@Test
@Parameters( {"user.name","user.password","identifier", "first.name", "last.name", "password", "confirm.password", "email", "company", "default.version", "active", "roles" })
public void testUserLoginWithNewRole(String userNameAdministrator,String adminPass,String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active,String roles) {
userImpl.userLoginWithNewRole(userNameAdministrator,adminPass,identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, (roles));
}
@Test
@Parameters( {"user.name","identifier", "first.name", "last.name", "password", "confirm.password", "email", "company", "default.version", "active", "roles" })
public void testaddUserWithMultipleRolesOneAllowedAnotherNot(String userNameAdministrator,String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active,String roles) {
userImpl.addUserWithMultipleRolesOneAllowedAnotherNot(userNameAdministrator,identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, splitParameter(roles));
}
@Test
@Parameters( {"identifier", "first.name", "last.name", "password", "confirm.password", "email", "company", "default.version", "active", "roles" })
public void testAddUserWithPasswordNotEqualsConfirmPassword(String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active,String roles) {
userImpl.addUserWithPasswordNotEqualsConfirmPassword(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, splitParameter(roles));
}
@Test
@Parameters( {"user.name","user.password" ,"identifier", "first.name", "last.name", "password", "confirm.password", "email", "company", "default.version", "active", "roles" })
public void testAddUserInactiveCheckLoginThenActive(String administrator,String adminPass,String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active,String roles) {
userImpl.AddUserInactiveCheckLoginThenActive(administrator, adminPass, identifier,
firstName, lastName, password, confirmPassword, email, company,
defaultVersion, active, (roles));
}
@Test
@Parameters( {"identifier", "first.name", "last.name", "password", "confirm.password", "email", "company", "default.version", "active"})
public void testAddUserWithoutSelectRoles(String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active) {
userImpl.addUserWithoutSelectRoles(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active);
}
@Test
@Parameters( {"url","user.name"})
public void testFlushCache(String url,String userName){
userImpl.flushCache(userName,url);
}
@Test
@Parameters( {"user.name","user.password" ,"identifier", "first.name", "last.name", "password", "confirm.password", "email", "company", "default.version", "active","roles.customize", "roles" })
public void testaddUserWithCustomizeRoles(String administrator,String administratorPass,String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active,String rolesCustomize,String rolesSystem) {
userImpl.addUserWithCustomizeRoles(administrator,administratorPass,identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, rolesCustomize,rolesSystem);
}
@Test
@Parameters( {"user.name","user.password","identifier", "first.name", "last.name", "password", "confirm.password", "email", "company", "default.version", "active", "roles","container","modle","entity","UniqueId","Name","Description","Price"})
public void testUserViewerReadOnlyAccess(String userNameAdministrator,String adminPass,String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active,String roles,String container,String modle,String entity,String UniqueId,String Name,String Description,String Price) {
userImpl.readOnlyAccessForViewer(userNameAdministrator,adminPass,identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, (roles),container,modle,entity, UniqueId, Name, Description, Price);
}
}

View File

@@ -0,0 +1,30 @@
package org.talend.mdm.cases.welcome;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.talend.mdm.Login;
import org.talend.mdm.impl.LicenseImpl;
import org.talend.mdm.impl.LogonImpl;
import org.talend.mdm.impl.UserImpl;
import org.talend.mdm.impl.WelcomeImpl;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
public class TestWelcomePage extends Login {
WelcomeImpl welcom;
@BeforeMethod
public void beforeMethod(){
welcom = new WelcomeImpl(driver);
}
@Test
public void testWelcomLayoutResort() {
welcom.reSortWindows();
}
}

View File

@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<suite name=" Product Family Record" parallel="false">
<parameter name="user.name" value="jennifer" />
<parameter name="user.password" value="jennifer" />
<parameter name="message" value="User 'jennifer' is already logged in another session!" />
<parameter name="container" value="DStar" />
<parameter name="modle" value="DStar" />
<parameter name="IdentifieValue" value="h001" />
<parameter name="entity" value="Agency" />
<parameter name="Identifie" value="Id" />
<test name="Agency create a record">
<classes>
<parameter name="Name" value="Name" />
<parameter name="NameValue" value="test" />
<parameter name="Zipcode" value="Zip" />
<parameter name="ZipcodeValue" value="11405" />
<class name="org.talend.mdm.cases.record.TestRecordAgency">
<methods>
<include name="testCreateRecord"/>
</methods>
</class>
</classes>
</test>
<test name="Agency update a record">
<classes>
<parameter name="Zipcode" value="Zip" />
<parameter name="ZipcodeValue" value="60957" />
<class name="org.talend.mdm.cases.record.TestRecordAgency">
<methods>
<include name="testUpdateRecord"/>
</methods>
</class>
</classes>
</test>
<test name="Agency duplicate a record">
<classes>
<parameter name="Name" value="Name" />
<parameter name="NameValue" value="testDup" />
<parameter name="IdentifieValueDup" value="dup001" />
<class name="org.talend.mdm.cases.record.TestRecordAgency">
<methods>
<include name="testDuplicateRecord"/>
</methods>
</class>
</classes>
</test>
<test name="Agency delete record">
<classes>
<class name="org.talend.mdm.cases.record.TestRecordAgency">
<methods>
<include name="testDeleteRecord"/>
</methods>
</class>
</classes>
</test>
<test name="Agency delete the duplicate record">
<classes>
<parameter name="IdentifieValue" value="dup001" />
<class name="org.talend.mdm.cases.record.TestRecordAgency">
<methods>
<include name="testDeleteRecord"/>
</methods>
</class>
</classes>
</test>
</suite>

View File

@@ -0,0 +1,141 @@
<?xml version="1.0" encoding="UTF-8"?>
<suite name=" Product Family Record" parallel="false">
<parameter name="user.name" value="jennifer" />
<parameter name="user.password" value="jennifer" />
<parameter name="message" value="User 'jennifer' is already logged in another session!" />
<parameter name="container" value="DStar" />
<parameter name="modle" value="DStar" />
<parameter name="entity" value="Agent" />
<parameter name="Identifie" value="Id" />
<parameter name="IdentifieValue" value="fcduo" />
<test name="test change agent commission code workflow approved">
<parameter name="IdentifieValue" value="AdrTa" />
<parameter name="Firstname" value="Firstname" />
<parameter name="FirstnameValue" value="Adrian" />
<parameter name="Lastname" value="Lastname" />
<parameter name="LastnameValue" value="Taft" />
<parameter name="CommissionCode" value="CommissionCode" />
<parameter name="CommissionCodeValue" value="1" />
<parameter name="StartDate" value="StartDate" />
<parameter name="StartDateValue" value="2009-06-06" />
<classes>
<class name="org.talend.mdm.cases.record.TestRecordAgent">
<methods>
<include name="testChangeCommissionCodeApprovedWorkflow"/>
</methods>
</class>
</classes>
</test>
<test name="test change agent commission code workflow not approved">
<parameter name="IdentifieValue" value="BilNi" />
<parameter name="Firstname" value="Firstname" />
<parameter name="FirstnameValue" value="Bill" />
<parameter name="Lastname" value="Lastname" />
<parameter name="LastnameValue" value="Nixon" />
<parameter name="CommissionCode" value="CommissionCode" />
<parameter name="CommissionCodeValue" value="1" />
<parameter name="StartDate" value="StartDate" />
<parameter name="StartDateValue" value="2007-08-29" />
<classes>
<class name="org.talend.mdm.cases.record.TestRecordAgent">
<methods>
<include name="testChangeCommissionCodeNotApprovedWorkflow"/>
</methods>
</class>
</classes>
</test>
<test name="Agent create a record according to validation rule">
<classes>
<parameter name="Firstname" value="Firstname" />
<parameter name="FirstnameValue" value="fcdqaz" />
<parameter name="Lastname" value="Lastname" />
<parameter name="LastnameValue" value="uomijn" />
<parameter name="CommissionCode" value="CommissionCode" />
<parameter name="CommissionCodeValue" value="4" />
<parameter name="StartDate" value="StartDate" />
<parameter name="StartDateValue" value="2012-05-25" />
<class name="org.talend.mdm.cases.record.TestRecordAgent">
<methods>
<include name="testCreateRecord"/>
</methods>
</class>
</classes>
</test>
<test name="Agent create a record not according to validation rule">
<classes>
<parameter name="Firstname" value="Firstname" />
<parameter name="FirstnameValue" value="ppmqaz" />
<parameter name="Lastname" value="Lastname" />
<parameter name="LastnameValue" value="oumijn" />
<parameter name="CommissionCode" value="CommissionCode" />
<parameter name="CommissionCodeValue" value="4" />
<parameter name="StartDate" value="StartDate" />
<parameter name="StartDateValue" value="2012-05-25" />
<class name="org.talend.mdm.cases.record.TestRecordAgent">
<methods>
<include name="testCreateRecordWrongRule"/>
</methods>
</class>
</classes>
</test>
<test name="Agent update a record ">
<classes>
<parameter name="CommissionCode" value="CommissionCode" />
<parameter name="CommissionCodeValue" value="4" />
<parameter name="CommissionCodeValueUpdate" value="2" />
<class name="org.talend.mdm.cases.record.TestRecordAgent">
<methods>
<include name="testUpdateRecord"/>
</methods>
</class>
</classes>
</test>
<test name="Agent duplicate a record according to validation rule">
<classes>
<parameter name="IdentifieValueDup" value="yhauo" />
<parameter name="Firstname" value="Firstname" />
<parameter name="FirstnameValue" value="yhazbcd" />
<class name="org.talend.mdm.cases.record.TestRecordAgent">
<methods>
<include name="testDuplicateRecord"/>
</methods>
</class>
</classes>
</test>
<test name="Agent delete record">
<classes>
<class name="org.talend.mdm.cases.record.TestRecordAgent">
<methods>
<include name="testDeleteRecord"/>
</methods>
</class>
</classes>
</test>
<test name="Agent delete the duplicate record">
<classes>
<parameter name="IdentifieValue" value="yhauo" />
<class name="org.talend.mdm.cases.record.TestRecordAgent">
<methods>
<include name="testDeleteRecord"/>
</methods>
</class>
</classes>
</test>
</suite>

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<suite name="Suite" parallel="false">
<test name="test create task with type of resoluton">
<parameter name="task.name" value="taskresolution" />
<parameter name="task.type.resotion" value="Resolution" />
<parameter name="task.default.source" value="Source" />
<parameter name="task.fieldName1" value="testa" />
<classes>
<class name="org.talend.mdm.cases.dsc.TestDSC">
<methods>
<include name="testCreateTaskWithTypeResolution"/>
</methods>
</class>
</classes>
</test>
<test name="test create task with type of data">
<parameter name="task.name" value="taskredata" />
<parameter name="task.type.data" value="Data" />
<parameter name="task.default.source" value="Source" />
<parameter name="task.fieldName1" value="testb" />
<classes>
<class name="org.talend.mdm.cases.dsc.TestDSC">
<methods>
<include name="testCreateTaskWithTypeData"/>
</methods>
</class>
</classes>
</test>
<test name="test task assignment">
<parameter name="task.name" value="taskredata" />
<parameter name="task.type.data" value="Data" />
<parameter name="task.default.source" value="Source" />
<parameter name="task.fieldName1" value="testb" />
<classes>
<class name="org.talend.mdm.cases.dsc.TestDSC">
<methods>
<include name="testTaskAssignment"/>
</methods>
</class>
</classes>
</test>
</suite>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<suite name="Suite" parallel="false">
<test name="test upload invalid license">
<parameter name="testlink.id" value="TMDMQA-5779"/>
<parameter name="license.file.path"
value="org/talend/mdm/resources/license_invalid" />
<classes>
<class name="org.talend.mdm.cases.license.TestLicense" />
<methods>
<include name="testUploadInValidLicense"/>
</methods>
</classes>
</test>
<test name="test upload expired license">
<parameter name="testlink.id" value="TMDMQA-5780"/>
<parameter name="license.file.path"
value="org/talend/mdm/resources/license_invalid" />
<classes>
<class name="org.talend.mdm.cases.license.TestLicense" />
<methods>
<include name="testUploadExpiredLicense"/>
</methods>
</classes>
</test>
<test name="test upload valid license">
<parameter name="testlink.id" value="TMDMQA-5778"/>
<parameter name="license.file.path"
value="org/talend/mdm/resources/license" />
<classes>
<class name="org.talend.mdm.cases.license.TestLicense" />
<methods>
<include name="testUploadValidLicense"/>
</methods>
</classes>
</test>
</suite>

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<suite name="Suite" parallel="false">
<parameter name ="session.timeout" value ="600000"/>
<test name="test user right login">
<classes>
<class name="org.talend.mdm.cases.login.TestLogin">
<methods>
<include name="testRightLogin"/>
</methods>
</class>
</classes>
</test>
<test name="test user right login and logout">
<classes>
<class name="org.talend.mdm.cases.login.TestLogin">
<methods>
<include name="testLogoutCorrectly"/>
</methods>
</class>
</classes>
</test>
<test name="test user wrong login">
<parameter name="message.wrong.username" value="Login failed. Please check your login and password" />
<parameter name="user.name" value="test" />
<parameter name="user.password" value="administrator" />
<classes>
<class name="org.talend.mdm.cases.login.TestLogin">
<methods>
<include name="testWongLogin"/>
</methods>
</class>
</classes>
</test><!--
<test name="test user login and session timeout">
<classes>
<class name="org.talend.mdm.cases.login.TestLogin">
<methods>
<include name="testLoginAndSessionTimeout"/>
</methods>
</class>
</classes>
</test>
--></suite>

View File

@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<suite name=" Product Family Record" parallel="false">
<parameter name="user.name" value="jennifer" />
<parameter name="user.password" value="jennifer" />
<parameter name="message" value="User 'jennifer' is already logged in another session!" />
<test name="Product Family create a record" preserve-order="true">
<classes>
<parameter name="entity" value="Product Family" />
<parameter name="feild2Name" value="Name" />
<parameter name="feild2Value" value="Books" />
<parameter name="feild1Name" value="Id" />
<class name="org.talend.mdm.cases.record.TestRecordProductFamily">
<methods>
<include name="testCreateRecord"/>
</methods>
</class>
</classes>
</test>
<test name="Product Family update a record">
<classes>
<parameter name="entity" value="Product Family" />
<parameter name="feild2Name" value="Name" />
<parameter name="feild2Value_old" value="Books" />
<parameter name="feild1Name" value="Id" />
<parameter name="feild2Value" value="Books_update" />
<class name="org.talend.mdm.cases.record.TestRecordProductFamily">
<methods>
<include name="testUpdateRecord"/>
</methods>
</class>
</classes>
</test>
<test name="Product Family duplicate a record">
<classes>
<parameter name="entity" value="Product Family" />
<parameter name="feild2Name" value="Name" />
<parameter name="feild1Name" value="Id" />
<parameter name="feild2Value_old" value="Books_update" />
<parameter name="feild2Value" value="Books_dup" />
<class name="org.talend.mdm.cases.record.TestRecordProductFamily">
<methods>
<include name="testDuplicateRecord"/>
</methods>
</class>
</classes>
</test>
<test name="Product Family delete a record">
<classes>
<parameter name="entity" value="Product Family" />
<parameter name="feild2Name" value="Name" />
<parameter name="feild2Value" value="Books_update" />
<parameter name="feild1Name" value="Id" />
<class name="org.talend.mdm.cases.record.TestRecordProductFamily">
<methods>
<include name="testDeleteRecord"/>
</methods>
</class>
</classes>
</test>
<test name="Product Family delete the duplicate record">
<classes>
<parameter name="entity" value="Product Family" />
<parameter name="feild2Name" value="Name" />
<parameter name="feild2Value" value="Books_dup" />
<parameter name="feild1Name" value="Id" />
<class name="org.talend.mdm.cases.record.TestRecordProductFamily">
<methods>
<include name="testDeleteRecord"/>
</methods>
</class>
</classes>
</test>
<!-- <test name="Product Family delete a record to recycle and restore the record " >
<classes>
<parameter name="entity" value="Product Family" />
<parameter name="feild2Name" value="Name" />
<parameter name="feild2Value" value="Books_dup" />
<parameter name="feild1Name" value="Id" />
<class name="org.talend.mdm.cases.record.TestRecordProductFamily">
<methods>
<include name="testDeleteRecordToRecycle"/>
<include name="testRestoreFromRecycle"/>
</methods>
</class>
</classes>
</test> -->
</suite>

View File

@@ -0,0 +1,292 @@
<?xml version="1.0" encoding="UTF-8"?>
<suite name=" Product entity Record" parallel="false">
<parameter name="user.name" value="jennifer" />
<parameter name="user.password" value="jennifer" />
<parameter name="message" value="User 'jennifer' is already logged in another session!" />
<parameter name="entity" value="Product" />
<parameter name="UniqueId" value="Id" />
<parameter name="UniqueIdValue" value="1671111134" />
<test name="test two ways to open workflow task on map">
<classes>
<parameter name="entity" value="Product" />
<parameter name="UniqueIdValue" value="231035933" />
<parameter name="familyid" value="3" />
<parameter name="familyname" value="Pets" />
<parameter name="franksubmited.familyname" value="Mugs" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testTwoWaysOpenWorkFlow"/>
</methods>
</class>
</classes>
</test>
<test name="test show foreign key info">
<classes>
<parameter name="UniqueIdValue" value="231035933" />
<parameter name="familyid" value="3" />
<parameter name="familyname" value="Pets" />
<parameter name="franksubmited.familyname" value="Mugs" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testForeignKeyInforDisplay"/>
</methods>
</class>
</classes>
</test>
<test name="test workflow change price valid and approved">
<classes>
<parameter name="UniqueIdValue" value="231035934" />
<parameter name="entity" value="Product" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testPriceChangeValidApprovedWorkflow"/>
</methods>
</class>
</classes>
</test>
<test name="test workflow change price valid and not approve">
<classes>
<parameter name="UniqueIdValue" value="231035933" />
<parameter name="entity" value="Product" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testPriceValidNotApproveWorkFlow"/>
</methods>
</class>
</classes>
</test>
<test name="test workflow change price invalid">
<classes>
<parameter name="UniqueIdValue" value="231035933" />
<parameter name="entity" value="Product" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testPriceChangeInvalidWorkflow"/>
</methods>
</class>
</classes>
</test>
<test name="test work flow process show on map">
<classes>
<parameter name="entity" value="Product" />
<parameter name="UniqueIdValue" value="231035933" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testStoreShowOnMapProcess"/>
</methods>
</class>
</classes>
</test>
<test name=" create a record" >
<classes>
<parameter name="Name" value="Name" />
<parameter name="Description" value="Description" />
<parameter name="Price" value="Price" />
<parameter name="NameValue" value="Talend Large Mug_test" />
<parameter name="DescriptionValue" value="this is a test Talend Large Mug_test" />
<parameter name="PriceValue" value="16.91" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testCreateRecord"/>
</methods>
</class>
</classes>
</test>
<test name="update the record to set a price of +15%">
<classes>
<parameter name="Price" value="Price" />
<parameter name="PriceValue" value="19.91" />
<parameter name="PriceValueOld" value="16.91" />
<parameter name="flag" value="0" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testUpdatePriceRecord"/>
</methods>
</class>
</classes>
</test>
<test name="update the record to set a price of -15%">
<classes>
<parameter name="Price" value="Price" />
<parameter name="PriceValue" value="13.91" />
<parameter name="PriceValueOld" value="16.91" />
<parameter name="flag" value="1" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testUpdatePriceRecord"/>
</methods>
</class>
</classes>
</test>
<test name="update the record to set a price of -15% and +15%">
<classes>
<parameter name="Price" value="Price" />
<parameter name="PriceValue" value="15.91" />
<parameter name="PriceValueOld" value="16.91" />
<parameter name="flag" value="2" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testUpdatePriceRecord"/>
</methods>
</class>
</classes>
</test>
<test name="duplicate a record" >
<classes>
<parameter name="UniqueIdValueDup" value="557175934" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testDuplicateRecord"/>
</methods>
</class>
</classes>
</test>
<test name="in Product view search a record by Unique Id the opeartion is lower than" >
<classes>
<parameter name="entity_Element" value="Product" />
<parameter name="opeartion" value="is lower than" />
<parameter name="value" value="16.91" />
<parameter name="searchFeild" value="Price" />
<parameter name="searchFeild_Element" value="Price" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testSearchRecordByValue"/>
</methods>
</class>
</classes>
</test>
<test name="in Product Family view search a record by name the opeartion contains the word(s)" >
<classes>
<parameter name="entity" value="Product Family" />
<parameter name="entity_Element" value="ProductFamily" />
<parameter name="opeartion" value="contains the word(s)" />
<parameter name="value" value="Pets" />
<parameter name="searchFeild" value="Name" />
<parameter name="searchFeild_Element" value="Name" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testSearchRecordByString"/>
</methods>
</class>
</classes>
</test>
<test name="in Product Stores view search a record by Price the opeartion is lower than" >
<classes>
<parameter name="entity" value="Product with Stores" />
<parameter name="entity_Element" value="Product" />
<parameter name="opeartion" value="is lower than" />
<parameter name="searchFeild" value="Price" />
<parameter name="searchFeild_Element" value="Price" />
<parameter name="value" value="16.91" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testSearchRecordByValue"/>
</methods>
</class>
</classes>
</test>
<test name="in Product with Family view search a record by name the opeartion is contains the word(s)" >
<classes>
<parameter name="entity" value="Product with Family" />
<parameter name="entity_Element" value="Product" />
<parameter name="opeartion" value="contains the word(s)" />
<parameter name="searchFeild" value="Name" />
<parameter name="searchFeild_Element" value="Name" />
<parameter name="value" value="Cap" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testSearchRecordByString"/>
</methods>
</class>
</classes>
</test>
<test name="in Store view search a record by Store Id the opeartion is contains the word(s)" >
<classes>
<parameter name="entity" value="Store" />
<parameter name="entity_Element" value="Store" />
<parameter name="opeartion" value="contains the word(s)" />
<parameter name="searchFeild" value="Store Id" />
<parameter name="searchFeild_Element" value="Id" />
<parameter name="value" value="TalendJP" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testSearchRecordByString"/>
</methods>
</class>
</classes>
</test>
<test name="in Unavailable Products view search a record by Name the opeartion is contains the word(s)" >
<classes>
<parameter name="entity" value="Unavailable Products" />
<parameter name="entity_Element" value="Product" />
<parameter name="opeartion" value="contains the word(s)" />
<parameter name="searchFeild" value="Name" />
<parameter name="searchFeild_Element" value="Name" />
<parameter name="value" value="Cap" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testSearchRecordByString"/>
</methods>
</class>
</classes>
</test>
<test name=" delete a record" >
<classes>
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testDeleteRecord"/>
</methods>
</class>
</classes>
</test>
<test name=" delete the record to the recycle" >
<classes>
<parameter name="UniqueIdValue" value="557175934" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testDeleteToRecycleRecord"/>
</methods>
</class>
</classes>
</test>
<test name=" restore the record from the recycle" >
<classes>
<parameter name="UniqueIdValue" value="557175934" />
<class name="org.talend.mdm.cases.record.TestRecordProduct">
<methods>
<include name="testRestoreFromRecycleRecord"/>
</methods>
</class>
</classes>
</test>
</suite>

View File

@@ -0,0 +1,251 @@
<?xml version="1.0" encoding="UTF-8"?>
<suite name="Record" parallel="false">
<test name="create a record" preserve-order="true">
<classes>
<parameter name="entity" value="Product Family" />
<parameter name="feild2Name" value="Name" />
<parameter name="feild2Value" value="Books" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testCreateRecord"/>
<!-- <include name="testJournalOpenRecord"/> -->
</methods>
</class>
</classes>
</test>
<test name="export the record" >
<classes>
<parameter name="entity" value="Product Family" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testExportRecord"/>
</methods>
</class>
</classes>
</test>
<test name="update a record">
<classes>
<parameter name="entity" value="Product Family" />
<parameter name="feild2Name" value="Name" />
<parameter name="feild2Value_old" value="Books" />
<parameter name="feild2Value" value="Books_update" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testUpdateRecord"/>
</methods>
</class>
</classes>
</test>
<!--
<test name="duplicate a record">
<classes>
<parameter name="entity" value="Product Family" />
<parameter name="feild2Name" value="Name" />
<parameter name="feild2Value_old" value="Books_update" />
<parameter name="feild2Value" value="Books_dup" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testDuplicateRecord"/>
</methods>
</class>
</classes>
</test>
<test name="search records by date the opeartion equals">
<classes>
<parameter name="entity" value="Product Stores" />
<parameter name="searchFeild" value="date" />
<parameter name="opeartion" value="equals" />
<parameter name="value" value="2010-01-27" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testSearchRecordByDate"/>
</methods>
</class>
</classes>
</test>
<test name="search records by date the opeartion is after">
<classes>
<parameter name="entity" value="Customer" />
<parameter name="searchFeild" value="date" />
<parameter name="opeartion" value="is after" />
<parameter name="value" value="2010-03-07" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testSearchRecordByDate"/>
</methods>
</class>
</classes>
</test>
<test name="search records by date the opeartion is before">
<classes>
<parameter name="entity" value="Customer" />
<parameter name="searchFeild" value="date" />
<parameter name="opeartion" value="is before" />
<parameter name="value" value="2010-03-07" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testSearchRecordByDate"/>
</methods>
</class>
</classes>
</test> -->
<test name="search records by value the opeartion is greater than">
<classes>
<parameter name="entity" value="Product Stores" />
<parameter name="searchFeild" value="Price" />
<parameter name="opeartion" value="is greater than" />
<parameter name="value" value="10.99" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testSearchRecordByValue"/>
</methods>
</class>
</classes>
</test>
<test name="search records by value the opeartion is equal to">
<classes>
<parameter name="entity" value="Product Stores" />
<parameter name="searchFeild" value="Price" />
<parameter name="opeartion" value="is equal to" />
<parameter name="value" value="10.99" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testSearchRecordByValue"/>
</methods>
</class>
</classes>
</test>
<test name="search records by value the opeartion is greater or equals">
<classes>
<parameter name="entity" value="Product Stores" />
<parameter name="searchFeild" value="Price" />
<parameter name="opeartion" value="is greater or equals" />
<parameter name="value" value="10.99" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testSearchRecordByValue"/>
</methods>
</class>
</classes>
</test>
<test name="search records by value the opeartion is lower than">
<classes>
<parameter name="entity" value="Product Stores" />
<parameter name="searchFeild" value="Price" />
<parameter name="opeartion" value="is lower than" />
<parameter name="value" value="10.99" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testSearchRecordByValue"/>
</methods>
</class>
</classes>
</test>
<test name="search records by value the opeartion is lower or equals">
<classes>
<parameter name="entity" value="Product Stores" />
<parameter name="searchFeild" value="Price" />
<parameter name="opeartion" value="is lower or equals" />
<parameter name="value" value="10.99" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testSearchRecordByValue"/>
</methods>
</class>
</classes>
</test>
<test name="search records by value the opeartion is not equal to">
<classes>
<parameter name="entity" value="Product Stores" />
<parameter name="searchFeild" value="Price" />
<parameter name="opeartion" value="is not equal to" />
<parameter name="value" value="10.99" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testSearchRecordByValue"/>
</methods>
</class>
</classes>
</test>
<test name="search records by string the opeartion contains the word(s)">
<classes>
<parameter name="entity" value="Product" />
<parameter name="searchFeild" value="Name" />
<parameter name="opeartion" value="contains the word(s)" />
<parameter name="value" value="Dog" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testSearchRecordByString"/>
</methods>
</class>
</classes>
</test>
<test name="search records by string the opeartion contains a word starting with">
<classes>
<parameter name="entity" value="Product" />
<parameter name="searchFeild" value="Name" />
<parameter name="opeartion" value="contains a word starting with" />
<parameter name="value" value="Talend" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testSearchRecordByString"/>
</methods>
</class>
</classes>
</test>
<test name="search records by string the opeartion contains the sentence">
<classes>
<parameter name="entity" value="Product" />
<parameter name="searchFeild" value="Name" />
<parameter name="opeartion" value="contains the sentence" />
<parameter name="value" value="Golf Shirt" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testSearchRecordByString"/>
</methods>
</class>
</classes>
</test>
<!-- <test name="delete a record">
<classes>
<parameter name="entity" value="Product Family" />
<parameter name="feild1Name" value="Name" />
<parameter name="feild1Value" value="Books" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testDeleteRecord"/>
</methods>
</class>
</classes>
</test>
-->
<test name="delete a record to recycle and restore the record " preserve-order="true">
<classes>
<parameter name="entity" value="Product Family" />
<parameter name="feild1Name" value="Name" />
<parameter name="feild1Value" value="Books_update" />
<class name="org.talend.mdm.cases.record.TestRecord">
<methods>
<include name="testDeleteRecordToRecycle"/>
<include name="testRestoreFromRecycle"/>
</methods>
</class>
</classes>
</test>
</suite>

View File

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<suite name=" Product entity Record" parallel="false">
<parameter name="user.name" value="jennifer" />
<parameter name="user.password" value="jennifer" />
<parameter name="message" value="User 'jennifer' is already logged in another session!" />
<parameter name="entity" value="Store" />
<parameter name="storeId" value="Id" />
<parameter name="storeIdValue" value="t8129" />
<parameter name="address" value="Address" />
<test name=" create a record" >
<classes>
<parameter name="addressValue" value="22, Jianguomenwai Avenue, Chaoyang District, Beijing" />
<class name="org.talend.mdm.cases.record.TestRecordStore">
<methods>
<include name="testCreateRecord"/>
</methods>
</class>
</classes>
</test>
<test name=" update a record" >
<classes>
<parameter name="address" value="Address" />
<parameter name="addressValue" value="5-10-13, Minami Aoyama Minato-ku. Tokyo" />
<class name="org.talend.mdm.cases.record.TestRecordStore">
<methods>
<include name="testUpdateAddressRecord"/>
</methods>
</class>
</classes>
</test> -->
<test name=" Duplicate a record" >
<classes>
<parameter name="storeIdValueDup" value="t8" />
<class name="org.talend.mdm.cases.record.TestRecordStore">
<methods>
<include name="testDuplicateRecord"/>
</methods>
</class>
</classes>
</test>
<test name=" delete the created record" >
<classes>
<class name="org.talend.mdm.cases.record.TestRecordStore">
<methods>
<include name="testDeleteRecord"/>
</methods>
</class>
</classes>
</test>
<test name=" delete the duplicate record" >
<classes>
<parameter name="storeIdValue" value="t8" />
<class name="org.talend.mdm.cases.record.TestRecordStore">
<methods>
<include name="testDeleteRecord"/>
</methods>
</class>
</classes>
</test>
</suite>

View File

@@ -0,0 +1,292 @@
<?xml version="1.0" encoding="UTF-8"?>
<suite name="Suite" parallel="false">
<test name="Add users allowed admin">
<classes>
<parameter name="roles" value="System_Admin" />
<class name="org.talend.mdm.cases.user.TestUser">
<methods>
<include name="testAddUserAllowedAdmin"/>
</methods>
</class>
</classes>
</test>
<test name="test add admin user over license allowed">
<classes>
<parameter name="identifier" value="testUserAdminOverLicense" />
<parameter name="first.name" value="firstname2" />
<parameter name="last.name" value="lastname2" />
<parameter name="password" value="password2" />
<parameter name="confirm.password" value="password2" />
<parameter name="email" value="eamil@administrator2" />
<parameter name="company" value="company2" />
<parameter name="default.version" value="universe2" />
<parameter name="active" value="true" />
<parameter name="roles" value="System_Admin" />
<class name="org.talend.mdm.cases.user.TestUser">
<methods>
<include name="testAddUserAdminOverAllowed"/>
</methods>
</class>
</classes>
</test>
<test name="test add user with multiple roles one another">
<parameter name="identifier" value="testUserMultipleRolesOneAnother" />
<parameter name="first.name" value="firstname2" />
<parameter name="last.name" value="lastname2" />
<parameter name="password" value="password2" />
<parameter name="confirm.password" value="password2" />
<parameter name="email" value="eamil@administrator2" />
<parameter name="company" value="company2" />
<parameter name="default.version" value="universe2" />
<parameter name="active" value="true" />
<parameter name="roles" value="System_Web,System_Admin" />
<classes>
<class name="org.talend.mdm.cases.user.TestUser">
<methods>
<include name="testaddUserWithMultipleRolesOneAllowedAnotherNot"/>
</methods>
</class>
</classes>
</test>
<test name="Add users allowed web">
<classes>
<parameter name="roles" value="System_Web" />
<class name="org.talend.mdm.cases.user.TestUser">
<methods>
<include name="testAddUserAllowedWeb"/>
</methods>
</class>
</classes>
</test>
<test name="test add web user over license allowed">
<classes>
<parameter name="identifier" value="testUserWebOverLicense" />
<parameter name="first.name" value="firstname2" />
<parameter name="last.name" value="lastname2" />
<parameter name="password" value="password2" />
<parameter name="confirm.password" value="password2" />
<parameter name="email" value="eamil@administrator2" />
<parameter name="company" value="company2" />
<parameter name="default.version" value="universe2" />
<parameter name="active" value="true" />
<parameter name="roles" value="System_Web" />
<class name="org.talend.mdm.cases.user.TestUser">
<methods>
<include name="testAddUserWebOverAllowed"/>
</methods>
</class>
</classes>
</test>
<test name="test add web user over license allowed inactive">
<classes>
<parameter name="identifier" value="testWebUserOverInactive" />
<parameter name="first.name" value="firstname2" />
<parameter name="last.name" value="lastname2" />
<parameter name="password" value="password2" />
<parameter name="confirm.password" value="password2" />
<parameter name="email" value="eamil@administrator2" />
<parameter name="company" value="company2" />
<parameter name="default.version" value="universe2" />
<parameter name="active" value="false" />
<parameter name="roles" value="System_Web" />
<class name="org.talend.mdm.cases.user.TestUser">
<methods>
<include name="testAddUserWebOverAllowedInactive"/>
</methods>
</class>
</classes>
</test>
<test name="test add user with multiple roles">
<parameter name="identifier" value="testUserWithMultipleRoles" />
<parameter name="first.name" value="firstname2" />
<parameter name="last.name" value="lastname2" />
<parameter name="password" value="password2" />
<parameter name="confirm.password" value="password2" />
<parameter name="email" value="eamil@administrator2" />
<parameter name="company" value="company2" />
<parameter name="default.version" value="universe2" />
<parameter name="active" value="true" />
<parameter name="roles" value="System_Web,System_Interactive" />
<classes>
<class name="org.talend.mdm.cases.user.TestUser">
<methods>
<include name="testAddUserMultipleRoles"/>
</methods>
</class>
</classes>
</test>
<test name="test user selected after save successfully">
<parameter name="identifier" value="testUserSelectedSaved" />
<parameter name="first.name" value="firstname2" />
<parameter name="last.name" value="lastname2" />
<parameter name="password" value="password2" />
<parameter name="confirm.password" value="password2" />
<parameter name="email" value="eamil@administrator2" />
<parameter name="company" value="company2" />
<parameter name="default.version" value="universe2" />
<parameter name="active" value="true" />
<parameter name="roles" value="System_Web,System_Interactive" />
<classes>
<class name="org.talend.mdm.cases.user.TestUser">
<methods>
<include name="testUserSelectedAfterSave"/>
</methods>
</class>
</classes>
</test>
<test name="test add user with password not equals to confirm">
<parameter name="identifier" value="testUserPasswordNotEqaulConfirm" />
<parameter name="first.name" value="firstname2" />
<parameter name="last.name" value="lastname2" />
<parameter name="password" value="password" />
<parameter name="confirm.password" value="confirmpassword" />
<parameter name="email" value="eamil@administrator2" />
<parameter name="company" value="company2" />
<parameter name="default.version" value="universe2" />
<parameter name="active" value="true" />
<parameter name="roles" value="System_Web,System_Interactive" />
<classes>
<class name="org.talend.mdm.cases.user.TestUser">
<methods>
<include name="testAddUserWithPasswordNotEqualsConfirmPassword"/>
</methods>
</class>
</classes>
</test>
<test name="test add user without select roles">
<parameter name="identifier" value="testUserWithoutRoles" />
<parameter name="first.name" value="firstname2" />
<parameter name="last.name" value="lastname2" />
<parameter name="password" value="password" />
<parameter name="confirm.password" value="password" />
<parameter name="email" value="eamil@administrator2" />
<parameter name="company" value="company2" />
<parameter name="default.version" value="universe2" />
<parameter name="active" value="true" />
<classes>
<class name="org.talend.mdm.cases.user.TestUser">
<methods>
<include name="testAddUserWithoutSelectRoles"/>
</methods>
</class>
</classes>
</test>
<test name="test set user inactive as active check login">
<parameter name="identifier" value="testUserInactiveThenActive" />
<parameter name="first.name" value="firstname2" />
<parameter name="last.name" value="lastname2" />
<parameter name="password" value="password" />
<parameter name="confirm.password" value="password" />
<parameter name="email" value="eamil@administrator2" />
<parameter name="company" value="company2" />
<parameter name="default.version" value="" />
<parameter name="active" value="false" />
<parameter name="roles" value="System_Web" />
<classes>
<class name="org.talend.mdm.cases.user.TestUser">
<methods>
<include name="testAddUserInactiveCheckLoginThenActive"/>
</methods>
</class>
</classes>
</test>
<test name="test flush cache">
<classes>
<class name="org.talend.mdm.cases.user.TestUser">
<methods>
<include name="testFlushCache"/>
</methods>
</class>
</classes>
</test>
<test name="test add user with customize role">
<parameter name="identifier" value="testUserCustomize" />
<parameter name="first.name" value="customize" />
<parameter name="last.name" value="user" />
<parameter name="password" value="password" />
<parameter name="confirm.password" value="password" />
<parameter name="email" value="eamil@administrator2" />
<parameter name="company" value="company2" />
<parameter name="default.version" value="" />
<parameter name="active" value="true" />
<parameter name="roles.customize" value="Demo_User" />
<parameter name="roles" value="System_Web" />
<classes>
<class name="org.talend.mdm.cases.user.TestUser">
<methods>
<include name="testaddUserWithCustomizeRoles"/>
</methods>
</class>
</classes>
</test>
<test name="test login with new user created">
<parameter name="identifier" value="testNewUserLogin" />
<parameter name="first.name" value="NewUserLogin" />
<parameter name="last.name" value="user" />
<parameter name="password" value="password" />
<parameter name="confirm.password" value="password" />
<parameter name="email" value="eamil@administrator2" />
<parameter name="company" value="company2" />
<parameter name="default.version" value="" />
<parameter name="active" value="true" />
<parameter name="roles" value="System_Web" />
<classes>
<class name="org.talend.mdm.cases.user.TestUser">
<methods>
<include name="testUserLoginWithNewRole"/>
</methods>
</class>
</classes>
</test>
<test name="test read only access for viewer">
<parameter name="identifier" value="testViewerAccess" />
<parameter name="first.name" value="viewerReadOnly" />
<parameter name="last.name" value="user" />
<parameter name="password" value="password" />
<parameter name="confirm.password" value="password" />
<parameter name="email" value="eamil@administrator2" />
<parameter name="company" value="company2" />
<parameter name="default.version" value="" />
<parameter name="active" value="true" />
<parameter name="roles" value="System_View" />
<parameter name="entity" value="Product" />
<parameter name="UniqueId" value="Id" />
<parameter name="Name" value="Name" />
<parameter name="Description" value="Description" />
<parameter name="Price" value="Price" />
<classes>
<class name="org.talend.mdm.cases.user.TestUser">
<methods>
<include name="testUserViewerReadOnlyAccess"/>
</methods>
</class>
</classes>
</test>
</suite>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<suite name="Suite" parallel="false">
<test name="test welcome">
<classes>
<parameter name="testlink.id" value="TMDMQA-5185"/>
<class name="org.talend.mdm.cases.welcome.TestWelcomePage" />
<methods>
<include name="testWelcomLayoutResort"/>
</methods>
</classes>
</test>
</suite>

View File

@@ -0,0 +1,58 @@
package org.talend.mdm.impl;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.talend.mdm.modules.DataSteward;
import org.talend.mdm.modules.User;
import org.testng.Assert;
public class DataStewardImpl extends DataSteward{
public DataStewardImpl(WebDriver driver) {
this.driver = driver;
}
public void createTaskWithTypeDefined(String taskName,String taskType,String source,String filedName1){
this.openMenuGoven();
this.openMenuDSC();
this.sleepCertainTime(5000);
this.switchDriver(driver.switchTo().frame("TDSCFrame"));
this.clickTaskNavigatorAdministrationCreateTask();
this.typeTaskName(taskName);
this.typeTaskDefaultSourceName(source);
this.selectTaskType(taskType);
this.clickAddColumButton();
this.sleepCertainTime(2000);
this.typeColumFieldName(filedName1);
this.sleepCertainTime(2000);
this.clickSaveColumButton();
this.clickOKOnTaskSchemaCreatPanel();
this.sleepCertainTime(5000);
this.clickSaveOnTaskSchemaEditView();
this.checkTaskSchemaSaveSuccessAndClickOk();
this.clickTaskNavigatorCommonNewTasks();
Assert.assertTrue(this.getValue(this.waitfor(By.xpath(this.getString(locator, "xpath.datatewardshipconsole.tasks.list.byname.row.status", taskName)), WAIT_TIME_MIN)).equals("new"));
Assert.assertTrue(this.getValue(this.waitfor(By.xpath(this.getString(locator, "xpath.datatewardshipconsole.tasks.list.byname.row.tasktype", taskName)), WAIT_TIME_MIN)).equals(taskType));
}
public void taskAssign(String taskName,String taskType,String source,String filedName1,String userAssighTo,String userPass,String userAdministrator,String userAdminpass){
this.openMenuGoven();
this.openMenuDSC();
this.sleepCertainTime(5000);
this.switchDriver(driver.switchTo().frame("TDSCFrame"));
this.selectATaskByNameInCommonAlltasks(taskName);
this.taskAssignToUser("user");
this.driver.switchTo().defaultContent();
LogonImpl log = new LogonImpl(this.driver);
log.logout();
log.loginUserForce("user", "user");
this.openMenuGoven();
this.openMenuDSC();
this.sleepCertainTime(5000);
this.switchDriver(driver.switchTo().frame("TDSCFrame"));
this.selectATaskByNameInCommonAlltasks(taskName);
}
}

View File

@@ -0,0 +1,90 @@
package org.talend.mdm.impl;
import java.io.File;
import java.net.URISyntaxException;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.talend.mdm.Base;
import org.talend.mdm.modules.License;
import org.talend.mdm.modules.User;
import org.testng.Assert;
public class LicenseImpl extends License{
public LicenseImpl(WebDriver driver) {
super(driver);
this.driver = driver;
}
public void openLicense(){
this.openAdministration();
this.gotoLicensePage();
}
public void uploadValidLicense(String fileLicenseValid){
this.openLicense();
this.clickEditlicenseKey();
logger.info("the license file ready to upload is :"+fileLicenseValid);
logger.info(Base.class.getClassLoader());
logger.info(Base.class.getClassLoader().getResource(fileLicenseValid));
logger.info(Base.class.getClassLoader().getResource(fileLicenseValid));
File file = null;
try {
file = new File(LicenseImpl.class.getClassLoader().getResource(fileLicenseValid).toURI());
} catch (URISyntaxException e) {
e.printStackTrace();
}
System.out.println(file.getAbsolutePath());
this.typeInlicenseFile(file.getAbsolutePath());
this.clickUploadLicenseButton();
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.license.uploading.inprogressbar.wating")), WAIT_TIME_MID), "uploading license bar err");
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.license.upload.sending")), WAIT_TIME_MID), "uploading license bar err");
this.sleepCertainTime(5000);
}
public void uploadInValidLicense(String fileLicenseInValid){
this.openLicense();
this.clickEditlicenseKey();
logger.info("the license file ready to upload is :"+fileLicenseInValid);
logger.info(Base.class.getClassLoader());
logger.info(Base.class.getClassLoader().getResource(fileLicenseInValid));
logger.info(Base.class.getClassLoader().getResource(fileLicenseInValid));
File file = null;
try {
file = new File(LicenseImpl.class.getClassLoader().getResource(fileLicenseInValid).toURI());
} catch (URISyntaxException e) {
e.printStackTrace();
}
System.out.println(file.getAbsolutePath());
this.typeInlicenseFile(file.getAbsolutePath());
this.clickUploadLicenseButton();
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.license.invalidlicense.warning")), WAIT_TIME_MID), "uploading license bar err");
this.clickElementByXpath(locator.getString("xpath.license.invalidlicense.ok.button"));
}
public void uploadExpiredLicense(String fileLicenseInValid){
this.openLicense();
this.clickEditlicenseKey();
logger.info("the license file ready to upload is :"+fileLicenseInValid);
logger.info(Base.class.getClassLoader());
logger.info(Base.class.getClassLoader().getResource(fileLicenseInValid));
logger.info(Base.class.getClassLoader().getResource(fileLicenseInValid));
File file = null;
try {
file = new File(LicenseImpl.class.getClassLoader().getResource(fileLicenseInValid).toURI());
} catch (URISyntaxException e) {
e.printStackTrace();
}
System.out.println(file.getAbsolutePath());
this.typeInlicenseFile(file.getAbsolutePath());
this.clickUploadLicenseButton();
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.license.invalidlicense.warning")), WAIT_TIME_MID), "uploading license bar err");
this.clickElementByXpath(locator.getString("xpath.license.invalidlicense.ok.button"));
}
}

View File

@@ -0,0 +1,138 @@
package org.talend.mdm.impl;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.talend.mdm.modules.Logon;
import org.talend.mdm.modules.User;
import org.testng.Assert;
public class LogonImpl extends Logon{
public LogonImpl(WebDriver driver) {
super(driver);
this.driver = driver;
}
public void loginAdministrator(String userName,String userPassword ,String message){
Assert.assertTrue(this.isTextPresent(locator.getString("mdm.suit.name")));
Assert.assertTrue(this.isTextPresent(locator.getString("mdm.edition.name")));
this.configureLogin(userName, userPassword);
this.clickLogin();
if(this.isTextPresent(message)) {
this.getElementByLinkText("Force user to logout").click();
this.configureLogin(userName, userPassword);
this.clickLogin();
logger.info("Force Login MDM");
}
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.sheet.welcome")), WAIT_TIME_MAX));
}
public void loginUserForce(String userName,String userPassword){
Assert.assertTrue(this.isTextPresent(locator.getString("mdm.suit.name")));
Assert.assertTrue(this.isTextPresent(locator.getString("mdm.edition.name")));
this.configureLogin(userName, userPassword);
this.clickLogin();
if(this.isTextPresent(this.getString(locator, "login.user.forcelogin.message", userName))) {
this.getElementByLinkText("Force user to logout").click();
this.configureLogin(userName, userPassword);
this.clickLogin();
logger.info("Force Login MDM");
}
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.sheet.welcome")), WAIT_TIME_MAX));
}
public void loginAdministratorImpl(String userName,String userPassword ,String message){
Assert.assertTrue(this.isTextPresent(locator.getString("mdm.suit.name")));
Assert.assertTrue(this.isTextPresent(locator.getString("mdm.edition.name")));
this.configureLogin(userName, userPassword);
this.clickLogin();
if(this.isTextPresent(message)) {
this.getElementByLinkText("Force user to logout").click();
this.configureLogin(userName, userPassword);
this.clickLogin();
logger.info("Force Login MDM");
}
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.sheet.welcome")), WAIT_TIME_MAX));
this.logout();
this.killBroswer();
}
public void loginWithExistInactiveUserImpl(String inactiveName,String inactivePass,String wrongMessage){
logger.info("test login with wrong password .");
this.configureLogin(inactiveName, inactivePass);
this.clickLogin();
this.sleepCertainTime(5000);
this.logger.info(wrongMessage);
this.acceptAlert(wrongMessage);
this.sleepCertainTime(5000);
this.refreshBrowser();
}
public void loginWithWrongNamePassImpl(String wrongName,String wrongPass,String wrongMessage){
logger.info("test login with wrong password .");
this.configureLogin(wrongName, wrongPass);
this.clickLogin();
this.sleepCertainTime(5000);
this.logger.info(wrongMessage);
Assert.assertTrue(this.isTextPresent(wrongMessage));
this.configureLogin("", "");
this.clickLogin();
this.sleepCertainTime(5000);
Assert.assertTrue(this.isTextPresent(wrongMessage));
this.killBroswer();
}
public void loginAdministratorLogoutImpl(String userName,String userPassword ,String message){
Assert.assertTrue(this.isTextPresent(locator.getString("mdm.suit.name")));
Assert.assertTrue(this.isTextPresent(locator.getString("mdm.edition.name")));
this.configureLogin(userName, userPassword);
this.clickLogin();
if(this.isTextPresent(message)) {
this.getElementByLinkText("Force user to logout").click();
this.configureLogin(userName, userPassword);
} else {
logger.info("Force Login MDM");
}
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.sheet.welcome")), WAIT_TIME_MAX));
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.login.logout")), WAIT_TIME_MAX));
this.logout();
this.killBroswer();
}
public void loginAdministratorSessionTimeoutImpl(String userName,String userPassword ,String message,int sessionTimeout){
this.configureLogin(userName, userPassword);
this.sleepCertainTime(3000);
this.clickLogin();
if(this.isTextPresent(message)) {
this.getElementByLinkText("Force user to logout").click();
this.configureLogin(userName, userPassword);
} else {
logger.info("Force Login MDM");
}
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.sheet.welcome")), WAIT_TIME_MAX));
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.login.logout")), WAIT_TIME_MAX));
this.sleepCertainTime(sessionTimeout);
this.clickLogout();
this.sleepCertainTime(5000);
Assert.assertTrue(this.isTextPresent(locator.getString("session.timeout.info")));
this.clickElementByXpath(locator.getString("xpath.login.session.timeout.button.ok"));
this.sleepCertainTime(5000);
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.login.username")), WAIT_TIME_MAX));
this.killBroswer();
}
public void flushCache(WebDriver driver1 ,WebDriver driver2){
}
public void forceQuit(){
this.killBroswer();
}
}

View File

@@ -0,0 +1,223 @@
package org.talend.mdm.impl;
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.talend.mdm.modules.Record;
import org.testng.Assert;
public class RecordImpl extends Record{
public RecordImpl(WebDriver driver) {
super(driver);
this.driver = driver;
}
public void ExportRecordImpl(String container,String modle,String entity){
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
clickExport();
this.sleepCertainTime(8000);
}
public void restoreFromRecycleImpl(String container,String modle,String entity,String feild1Value,String feild1Name){
chooseContainer(container);
chooseModle(modle);
clickSave();
clickRecycle();
this.sleepCertainTime(5000);
this.clickElementByXpath(this.getString(locator, "xpath.record.recycle.click.record",feild1Value));
this.clickElementByXpath(this.getString(locator,"xpath.record.recycle.click.record.restore",feild1Value));
this.sleepCertainTime(5000);
this.clickElementByXpath(locator.getString("xpath.record.recycle.click.record.restore.yes"));
if (this.isElementPresent(By.xpath("//span[contains(text(),'Please input all necessary search ')]"),WAIT_TIME_MIN)){
this.clickElementByXpath("//button[text()='Ok']");}
//assert the record restore in the entity
this.clickElementByXpath(locator.getString("xpath.record.click.databrowser"));
this.clickElementByXpath(locator.getString("xpath.record.choose.entity.arrows"));
this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.entity",entity)), WAIT_TIME_MIN);
this.clickElementByXpath(this.getString(locator, "xpath.record.choose.entity",entity));
this.sleepCertainTime(5000);
entity=entity.replaceAll(" ","");
String[] parameters={entity,feild1Name,feild1Value};
//this.clickElementByXpath(this.getString(locator, "xpath.record.choose.delete.record",parameters));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.delete.record",parameters)), WAIT_TIME_MIN),"the record restore in the entity");
chooseRcord(entity,feild1Name,feild1Value);
this.sleepCertainTime(5000);
deleteTheRecord(entity);
}
public void deleteRecordImpl(String container,String modle,String entity,String feild1Value,String feild1Name){
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
entity=entity.replaceAll(" ","");
chooseRcord(entity,feild1Name,feild1Value);
this.sleepCertainTime(5000);
deleteTheRecord(entity);
}
public void JournalOpenRecordImpl(String entity,String feild1Value){
String[] parameters={entity,feild1Value};
//click the journal
clickJournal();
//input the search condition
this.typeTextByXpath(locator.getString("xpath.record.choose.journal.entity"), entity);
this.typeTextByXpath(locator.getString("xpath.record.choose.journal.key"), feild1Value);
this.clickElementByXpath(locator.getString("xpath.record.choose.journal.operation.arrows"));
this.clickElementByXpath(locator.getString("xpath.record.choose.journal.operation.choose"));
this.sleepCertainTime(2000);
try {
Robot bot = new Robot();
bot.keyPress(KeyEvent.VK_TAB);
bot.keyRelease(KeyEvent.VK_TAB);
bot.keyPress(KeyEvent.VK_TAB);
bot.keyRelease(KeyEvent.VK_TAB);
bot.keyPress(KeyEvent.VK_TAB);
bot.keyRelease(KeyEvent.VK_TAB);
bot.keyPress(KeyEvent.VK_ENTER);
} catch (AWTException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.journal.choose.record", feild1Value)), WAIT_TIME_MIN);
this.doubleClick(this.getElementByXpath(this.getString(locator, "xpath.record.choose.journal.choose.record", feild1Value)));
this.isElementPresent(By.xpath("//button[text()='Open Record']"), WAIT_TIME_MIN);
this.clickElementByXpath("//button[text()='Open Record']");
//assert can see the record detail
this.sleepCertainTime(5000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.journal.assert.open",parameters)), WAIT_TIME_MIN),"open detail");
}
public void deleteRecordToRecycleImpl(String container,String modle,String entity,String feild1Value,String feild1Name){
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
entity=entity.replaceAll(" ","");
String[] parameters_container={feild1Value,container};
String[] parameters_modle={feild1Value,modle};
String[] parameters_entity={feild1Value,entity};
chooseRcord(entity,feild1Name,feild1Value);
this.sleepCertainTime(5000);
logger.info(this.getString(locator, "xpath.record.delete.record",entity));
this.clickElementByXpath(this.getString(locator, "xpath.record.delete.record",entity));
this.clickElementByXpath(locator.getString("xpath.record.delete.record.to.recycle.choose"));
this.clickElementByXpath(locator.getString("xpath.record.delete.record.to.recycle.choose.ok"));
if (this.isElementPresent(By.xpath(locator.getString("xpath.record.delete.record.warn")),WAIT_TIME_MIN)){
this.clickElementByXpath("//button[text()='No']");
}
// assert the record which been deleted in the recycle
clickRecycle();
//this.clickElementByXpath(locator.getString("xpath.record.delete.record.to.recycle.assert.clickRefresh"));
logger.info(this.getString(locator, "xpath.record.delete.record.to.recycle.assert.container",parameters_container));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.delete.record.to.recycle.assert.container",parameters_container)), WAIT_TIME_MIN ),"container");
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.delete.record.to.recycle.assert.modle",parameters_modle)), WAIT_TIME_MIN ),"modle");
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.delete.record.to.recycle.assert.entity",parameters_entity)), WAIT_TIME_MIN ),"entity");
}
public void duplicateRecordImpl(String container,String modle,String entity,String feild2Value_old,String feild2Value,String feild2Name){
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
entity=entity.replaceAll(" ","");
String[] parametersFeild2Value={entity,feild2Value_old};
String[] parametersFeild2={entity,feild2Name};
String[] parametersFeild2Assert={entity,feild2Name,feild2Value};
chooseRcord(entity,feild2Name,feild2Value_old);
this.sleepCertainTime(5000);
this.clickElementByXpath(locator.getString("xpath.record.Duplicate.click"));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.Duplicate.input",parametersFeild2)), WAIT_TIME_MAX),"duplicateARecord");
this.sleepCertainTime(5000);
this.clickElementByXpath(this.getString(locator,"xpath.record.Duplicate.close.origin",parametersFeild2Value));
this.modifyText(this.getElementByXpath(this.getString(locator, "xpath.record.Duplicate.input",parametersFeild2)), feild2Value);
//this.modifyText(this.getElementByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersFeild2)), feild2Value);
//this.modifyText(this.getElementByXpath(this.getString(locator, "xpath.record.choose.create.input.feild3",parametersFeild3)), feild3Value);
this.clickElementByXpath(locator.getString("xpath.record.Duplicate.saveAndClose"));
this.clickElementByXpath(locator.getString("xpath.record.click.refresh"));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.record.assert.feild2",parametersFeild2Assert)), WAIT_TIME_MAX),"createARecord");
}
public void createRecordImpl(String container,String modle,String entity,String feild2Value,String feild2Name){
/* String feild1Value;*/
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
entity=entity.replaceAll(" ","");
String[] parametersFeild2={entity,feild2Name};
String[] parametersFeild2Assert={entity,feild2Name,feild2Value};
logger.info(feild2Name);
this.clickCreateRecord();
// this.clickElementByXpath(locator.getString("xpath.record.choose.create"));
this.waitforElementDisplayed(By.xpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersFeild2)), WAIT_TIME_MAX);
this.typeTextByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersFeild2), feild2Value);
this.clickElementByXpath(locator.getString("xpath.record.choose.create.input.save"));
//Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.record.assert.feild1",parametersFeild1Assert)), WAIT_TIME_MAX),"createARecord");
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.record.assert.feild2",parametersFeild2Assert)), WAIT_TIME_MAX),"createARecord");
this.sleepCertainTime(3000);
/* feild1Value=this.getText();*/
// JournalOpenRecordImpl(entity,feild1Value);
}
public void updateRecordImpl(String container,String modle,String entity,String feild2Value_old,String feild2Value,String feild2Name){
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
entity=entity.replaceAll(" ","");
String[] parametersFeild2={entity,feild2Name};
String[] parametersFeild2Assert={entity,feild2Name,feild2Value};
chooseRcord(entity,feild2Name,feild2Value_old);
this.sleepCertainTime(5000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersFeild2)), 3000));
this.modifyText(this.getElementByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersFeild2)), feild2Value);
this.sleepCertainTime(5000);
this.clickElementByXpath(locator.getString("xpath.record.choose.create.input.save"));
if (this.isTextPresent("No change since last save")){
this.clickElementByXpath("//button[text()='Ok']");
}
else
{
this.clickElementByXpath(locator.getString("xpath.record.click.refresh"));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.record.assert.feild2",parametersFeild2Assert)), WAIT_TIME_MAX),"updateARecord");
}
}
public void SearchRecordByValueImpl(String container,String modle,String entity,String searchFeild,String opeartion,String value){
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
searchCondition(searchFeild,opeartion,value);
searchValueAssert(searchFeild,opeartion,value,entity);
}
public void SearchRecordByStringImpl(String container,String modle,String entity,String searchFeild,String opeartion,String value){
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
searchCondition(searchFeild,opeartion,value);
searchStringAssert(searchFeild,opeartion,value,entity);
}
public void SearchRecordByDateImpl(String container,String modle,String entity,String searchFeild,String opeartion,String value){
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
searchCondition(searchFeild,opeartion,value);
searchDateAssert(searchFeild,opeartion,value,entity);
}
}

View File

@@ -0,0 +1,188 @@
package org.talend.mdm.impl;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.talend.mdm.modules.Record;
import org.testng.Assert;
public class RecordImplAgency extends Record{
String OperationType,key,source;
boolean result;
public RecordImplAgency(WebDriver driver) {
super(driver);
this.driver = driver;
}
public void deleteRecordImpl(String container,String modle,String entity,String Identifie,String IdentifieValue){
OperationType="PHYSICAL_DELETE";
source="genericUI";
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
this.sleepCertainTime(3000);
this.clickElementByXpath(locator.getString("xpath.record.click.lastpage"));
chooseRcord(entity,Identifie,IdentifieValue);
this.sleepCertainTime(5000);
deleteTheRecord(entity);
this.sleepCertainTime(5000);
openJournal(entity,IdentifieValue,OperationType,source);
JournalResultCount();
}
public void duplicateRecordImpl(String container,String modle,String entity,String Identifie,String IdentifieValue,String IdentifieValueDup ) {
String[] parametersID={entity,Identifie};
String[] parametersIDclose={entity,IdentifieValue};
String[] parametersIDAssert={entity,Identifie,IdentifieValueDup};
String[] parametersIDValueAssert={Identifie,IdentifieValueDup};
OperationType="CREATE";
source="genericUI";
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
this.clickElementByXpath(locator.getString("xpath.record.click.lastpage"));
this.sleepCertainTime(10000);
chooseRcord(entity,Identifie,IdentifieValue);
this.sleepCertainTime(5000);
this.clickElementByXpath(locator.getString("xpath.record.Duplicate.click"));
this.clickElementByXpath(this.getString(locator,"xpath.record.Duplicate.close.origin",parametersIDclose));
this.sleepCertainTime(10000);
this.modifyText(this.getElementByXpath(this.getString(locator, "xpath.record.Duplicate.input",parametersID)), IdentifieValueDup);
this.clickElementByXpath(locator.getString("xpath.record.choose.create.input.save"));
this.sleepCertainTime(10000);
// this.clickElementByXpath(locator.getString("xpath.record.click.refresh"));
this.sleepCertainTime(3000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.record.assert.feild2",parametersIDAssert)), WAIT_TIME_MAX),"duplicateARecord");
this.sleepCertainTime(3000);
openJournal(entity,IdentifieValueDup,OperationType,source);
this.sleepCertainTime(3000);
JournalCheckResult(IdentifieValueDup,OperationType);
this.sleepCertainTime(5000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",parametersIDValueAssert )), WAIT_TIME_MIN));
}
public void createRecordImpl(String container,String modle,String entity,String Name,String NameValue,String Identifie,String IdentifieValue ,String Zipcode,String ZipcodeValue) {
OperationType="CREATE";
source="genericUI";
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
String city,state,region,moreinfo;
String[] parametersName={entity,Name};
String[] parametersID={entity,Identifie};
String[] parametersZip={entity,Zipcode};
String[] parametersNameAssert={entity,Name,NameValue};
String[] parametersIDAssert={entity,Identifie,IdentifieValue};
String[] parametersZipAssert={entity,Zipcode,ZipcodeValue};
this.sleepCertainTime(3000);
this.clickCreateRecord();
// this.clickElementByXpath(locator.getString("xpath.record.choose.create"));
this.sleepCertainTime(3000);
this.typeTextByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersID), IdentifieValue);
this.typeTextByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersName), NameValue);
this.typeTextByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersZip), ZipcodeValue);
this.clickElementByXpath(locator.getString("xpath.record.choose.create.input.save"));
this.sleepCertainTime(5000);
//get the auto genatate value
this.clickElementByXpath(locator.getString("xpath.record.click.lastpage"));
this.sleepCertainTime(10000);
chooseRcord(entity,Identifie,IdentifieValue);
this.sleepCertainTime(10000);
city=this.getValueInput(By.xpath("//input[@name='Agency/City']"));
state=this.getValueInput(By.xpath("//input[@name='Agency/State']"));
region=this.getValueInput(By.xpath("//input[@name='Agency/Region']"));
this.sleepCertainTime(3000);
this.clickElementByXpath("//a[text()='Map']//following-sibling::img");
moreinfo=this.getValueInput(By.xpath("//label[text()='Url:']//following-sibling::div//div//input"));
this.clickElementByXpath("//button[text()='Cancel']");
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.record.assert.feild2",parametersNameAssert)), WAIT_TIME_MAX),"createARecord");
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.record.assert.feild2",parametersZipAssert)), WAIT_TIME_MAX),"createARecord");
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.record.assert.feild2",parametersIDAssert)), WAIT_TIME_MAX),"createARecord");
this.sleepCertainTime(3000);
String[] IdAssert={Identifie,IdentifieValue};
String[] NameAssert={Name,NameValue};
String[] ZipAssert={Zipcode,ZipcodeValue};
this.sleepCertainTime(3000);
openJournal(entity,IdentifieValue,OperationType,source);
this.sleepCertainTime(5000);
JournalCheckResult(IdentifieValue,OperationType);
this.sleepCertainTime(5000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",IdAssert )), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",NameAssert )), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",ZipAssert )), WAIT_TIME_MIN));
OperationType="UPDATE";
source="DStar_EnrichAgencyLocation";
this.clickElementByXpath("//span[@class='x-tab-strip-inner']//span[text()='Data Browser']");
this.sleepCertainTime(3000);
openJournal(entity,IdentifieValue,OperationType,source);
this.sleepCertainTime(5000);
JournalCheckResult(IdentifieValue,OperationType);
this.sleepCertainTime(5000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.city", city)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.State", state)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.Region",region)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.MoreInfo",moreinfo)), WAIT_TIME_MIN));
}
public void updateRecordImpl(String container,String modle,String entity,String Identifie,String IdentifieValue ,String Zipcode,String ZipcodeValue) {
String city,state,region,moreinfo;
String cityOld,stateOld,regionOld,moreinfoOld;
String[] parametersZip={entity,Zipcode};
OperationType="UPDATE";
source="DStar_EnrichAgencyLocation";
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
this.sleepCertainTime(3000);
this.clickElementByXpath(locator.getString("xpath.record.click.lastpage"));
//get the old value
chooseRcord(entity,Identifie,IdentifieValue);
this.sleepCertainTime(3000);
cityOld=this.getValueInput(By.xpath("//input[@name='Agency/City']"));
stateOld=this.getValueInput(By.xpath("//input[@name='Agency/State']"));
regionOld=this.getValueInput(By.xpath("//input[@name='Agency/Region']"));
this.sleepCertainTime(3000);
this.clickElementByXpath("//a[text()='Map']//following-sibling::img");
moreinfoOld=this.getValueInput(By.xpath("//label[text()='Url:']//following-sibling::div//div//input"));
this.clickElementByXpath("//button[text()='Cancel']");
this.sleepCertainTime(5000);
this.modifyText(this.getElementByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersZip)), ZipcodeValue);
this.sleepCertainTime(5000);
this.clickElementByXpath(locator.getString("xpath.record.choose.create.input.save"));
this.clickElementByXpath(locator.getString("xpath.record.click.refresh"));
//get the value after update
this.sleepCertainTime(5000);
chooseRcord(entity,Identifie,IdentifieValue);
this.sleepCertainTime(5000);
city=this.getValueInput(By.xpath("//input[@name='Agency/City']"));
state=this.getValueInput(By.xpath("//input[@name='Agency/State']"));
region=this.getValueInput(By.xpath("//input[@name='Agency/Region']"));
this.sleepCertainTime(3000);
this.clickElementByXpath("//a[text()='Map']//following-sibling::img");
this.sleepCertainTime(3000);
moreinfo=this.getValueInput(By.xpath("//label[text()='Url:']//following-sibling::div//div//input"));
this.clickElementByXpath("//button[text()='Cancel']");
//assert in the journal
this.sleepCertainTime(3000);
openJournal(entity,IdentifieValue,OperationType,source);
this.sleepCertainTime(5000);
JournalCheckResult(IdentifieValue,OperationType);
this.sleepCertainTime(5000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.city", cityOld)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.State", stateOld)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.Region",regionOld)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.MoreInfo",moreinfoOld)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.city", city)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.State", state)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.Region",region)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.MoreInfo",moreinfo)), WAIT_TIME_MIN));
}
}

View File

@@ -0,0 +1,576 @@
package org.talend.mdm.impl;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.talend.mdm.modules.Record;
import org.testng.Assert;
public class RecordImplAgent extends Record{
String OperationType,key,source;
boolean result;
public RecordImplAgent(WebDriver driver) {
super(driver);
this.driver = driver;
}
public void selectAgentRecordBySearch(String entity,String fieldName,String agentID){
this.searchCondition("Identifier", "is equal to", agentID);
this.chooseRcord(entity, fieldName, agentID);
}
public void deleteRecordImpl(String container,String modle,String entity,String Identifie,String IdentifieValue){
OperationType="PHYSICAL_DELETE";
source="genericUI";
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
this.sleepCertainTime(8000);
this.clickElementByXpath(locator.getString("xpath.record.click.lastpage"));
this.sleepCertainTime(8000);
chooseRcord(entity,Identifie,IdentifieValue);
this.sleepCertainTime(5000);
deleteTheRecord(entity);
this.sleepCertainTime(5000);
openJournal(entity,IdentifieValue,OperationType,source);
JournalResultCount();
}
public void createRecordImpl(String container,String modle,String entity,String Identifie,String IdentifieValue,String Firstname,String FirstnameValue,String Lastname,String LastnameValue,String CommissionCode,String CommissionCodeValue,String StartDate,String StartDateValue ) {
String[] parametersFirstname={entity,Firstname};
String[] parametersLastname={entity,Lastname};
String[] parametersID={entity,Identifie};
String[] parametersStartDate={entity,StartDate};
String[] IdAssert={Identifie,IdentifieValue};
String[] FirstnameAssert={Firstname,FirstnameValue};
String[] LastnameAssert={Lastname,LastnameValue};
String[] CommissionCodeAssert={CommissionCode,CommissionCodeValue};
String[] StartDateAssert={StartDate,StartDateValue};
OperationType="CREATE";
source="genericUI";
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
this.sleepCertainTime(3000);
this.clickCreateRecord();
// this.clickElementByXpath(locator.getString("xpath.record.choose.create"));
this.sleepCertainTime(3000);
this.typeTextByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersID), IdentifieValue);
this.typeTextByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersFirstname), FirstnameValue);
this.typeTextByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersLastname), LastnameValue);
this.clickElementByXpath("//input[@name='Agent/CommissionCode']//following-sibling::img");
this.clickElementByXpath(this.getString(locator, "xpath.record.click.CommissionCode", CommissionCodeValue));
this.sleepCertainTime(3000);
this.typeTextByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersStartDate), StartDateValue);
this.clickElementByXpath(locator.getString("xpath.record.choose.create.input.save"));
this.sleepCertainTime(10000);
this.clickElementByXpath(locator.getString("xpath.record.click.lastpage"));
this.sleepCertainTime(3000);
chooseRcord(entity,Identifie,IdentifieValue);
this.sleepCertainTime(5000);
openJournal(entity,IdentifieValue,OperationType,source);
this.sleepCertainTime(5000);
JournalCheckResult(IdentifieValue,OperationType);
this.sleepCertainTime(5000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",IdAssert )), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",FirstnameAssert)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",LastnameAssert)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",CommissionCodeAssert )), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",StartDateAssert)), WAIT_TIME_MIN));
}
public void DuplicateRecordImpl(String container,String modle,String entity,String Identifie,String IdentifieValue,String IdentifieValueDup,String Firstname,String FirstnameValue) {
String[] parametersIDclose={entity,IdentifieValue};
String[] parametersFirstname={entity,Firstname};
String[] parametersID={entity,Identifie};
String[] IdAssert={Identifie,IdentifieValueDup};
String[] FirstnameAssert={Firstname,FirstnameValue};
OperationType="CREATE";
source="genericUI";
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
this.clickElementByXpath(locator.getString("xpath.record.click.lastpage"));
chooseRcord(entity,Identifie,IdentifieValue);
this.sleepCertainTime(3000);
this.clickElementByXpath(locator.getString("xpath.record.Duplicate.click"));
this.clickElementByXpath(this.getString(locator,"xpath.record.Duplicate.close.origin",parametersIDclose));
this.sleepCertainTime(3000);
this.modifyText(this.getElementByXpath(this.getString(locator, "xpath.record.Duplicate.input",parametersID)), IdentifieValueDup);
this.modifyText(this.getElementByXpath(this.getString(locator, "xpath.record.Duplicate.input",parametersFirstname)), FirstnameValue);
this.clickElementByXpath(locator.getString("xpath.record.choose.create.input.save"));
//this.clickElementByXpath(locator.getString("xpath.record.click.lastpage"));
this.sleepCertainTime(10000);
chooseRcord(entity,Identifie,IdentifieValueDup);
this.sleepCertainTime(3000);
openJournal(entity,IdentifieValueDup,OperationType,source);
this.sleepCertainTime(5000);
JournalCheckResult(IdentifieValueDup,OperationType);
this.sleepCertainTime(5000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",IdAssert )), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",FirstnameAssert)), WAIT_TIME_MIN));
}
public void UpdateRecordImpl(String container,String modle,String entity,String Identifie,String IdentifieValue,String CommissionCode,String CommissionCodeValue,String CommissionCodeValueUpdate) {
String[] CommissionCodeAssert={CommissionCode,CommissionCodeValue};
String[] CommissionCodeUpdateAssert={CommissionCode,CommissionCodeValueUpdate};
OperationType="UPDATE";
source="genericUI";
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
this.sleepCertainTime(3000);
this.clickElementByXpath(locator.getString("xpath.record.click.lastpage"));
chooseRcord(entity,Identifie,IdentifieValue);
this.sleepCertainTime(3000);
//update the CommissionCodeValue
this.clickElementByXpath("//input[@name='Agent/CommissionCode']//following-sibling::img");
this.clickElementByXpath(this.getString(locator, "xpath.record.click.CommissionCode", CommissionCodeValueUpdate));
this.sleepCertainTime(3000);
this.clickElementByXpath(locator.getString("xpath.record.choose.create.input.save"));
this.clickElementByXpath(locator.getString("xpath.record.click.refresh"));
openJournal(entity,IdentifieValue,OperationType,source);
this.sleepCertainTime(5000);
JournalCheckResult(IdentifieValue,OperationType);
this.sleepCertainTime(5000);
//assert the old and new value
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",CommissionCodeAssert )), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",CommissionCodeUpdateAssert )), WAIT_TIME_MIN));
}
public void createRecordWrongRuleImpl(String container,String modle,String entity,String Identifie,String IdentifieValue,String Firstname,String FirstnameValue,String Lastname,String LastnameValue,String CommissionCode,String CommissionCodeValue,String StartDate,String StartDateValue ) {
String[] parametersFirstname={entity,Firstname};
String[] parametersLastname={entity,Lastname};
String[] parametersID={entity,Identifie};
String[] parametersStartDate={entity,StartDate};
OperationType="CREATE";
source="genericUI";
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
this.sleepCertainTime(3000);
this.clickCreateRecord();
// this.clickElementByXpath(locator.getString("xpath.record.choose.create"));
this.sleepCertainTime(3000);
this.typeTextByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersID), IdentifieValue);
this.typeTextByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersFirstname), FirstnameValue);
this.typeTextByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersLastname), LastnameValue);
this.clickElementByXpath("//input[@name='Agent/CommissionCode']//following-sibling::img");
this.clickElementByXpath(this.getString(locator, "xpath.record.click.CommissionCode", CommissionCodeValue));
this.sleepCertainTime(3000);
this.typeTextByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersStartDate), StartDateValue);
this.clickElementByXpath(locator.getString("xpath.record.choose.create.input.save"));
if (this.isElementPresent(By.xpath("//span[contains(text(),'Unable to save item Agent., validation rule')]"), WAIT_TIME_MIN))
{
Assert.assertTrue(true);
}
else
{
Assert.assertTrue(false);
}
}
public void changeCommissionCodeApprovedWorkflow(String userFrank,String frankPass,String userJennifer,String jenniferPass,String container,String model,String entity,String Identifie,String agentID,String Firstname,String FirstnameValue,String Lastname,String LastnameValue,String CommissionCode,String CommissionCodeValue,String StartDate,String StartDateValue){
LogonImpl log = new LogonImpl(this.driver);
log.logout();
log.loginUserForce(userFrank, frankPass);
String[] parametersID={entity,Identifie};
chooseContainer(container);
chooseModle(model);
clickSave();
chooseEntity(entity);
this.sleepCertainTime(3000);
this.maxDataBrowserBoard();
this.selectAgentRecordBySearch(entity,Identifie,agentID);
this.sleepCertainTime(3000);
//verify that frank can not modify agent properties directly
Assert.assertFalse(this.getElementByXpath(locator.getString("xpath.record.agent.commissioncode.input")).isEnabled(), "frank can not modify commission code test failed!");
//get the initial agent properties.commissionCode
String initialCode = this.getValueInput(By.xpath(locator.getString("xpath.record.agent.commissioncode.input")));
String initialStatus = this.getValueInput(By.xpath(locator.getString("xpath.record.agent.status.input")));
logger.info("for agent :"+agentID+"The initial commission code is:"+initialCode+",the initial status is:"+initialStatus);
this.maxARecordPanel();
//open journal to verify number of action entry for frank ,and update entry for administrator ,then close journal
this.openJournalFromDataBrowser();
this.sleepCertainTime(5000);
int beforeProcess = this.getElementsByXpath(locator.getString("xpath.journal.entry.action.frank")).size();
int beforeProcessUpdateAdministrator = this.getElementsByXpath(locator.getString("xpath.journal.entry.update.administrator")).size();
logger.info("beforeProcess action entry for frank is:"+beforeProcess);
logger.info("beforeProcess update entry for administrator is:"+beforeProcessUpdateAdministrator);
this.closeJournal();
//frank launch com code change request process
this.launchProcess("Com Change Request");
this.checkProcessDoneAndClickOK();
this.sleepCertainTime(3000);
//click the refresh button ,and check status change to pending
this.clickElementByXpath(locator.getString("xpath.record.panel.refresh.button"));
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.record.agent.comchange.processdone.clickrefresh.conform.info")), WAIT_TIME_MIN).isDisplayed());
this.clickElementByXpath(locator.getString("xpath.record.agent.comchange.processdone.clickrefresh.conform.yes.button"));
this.sleepCertainTime(5000);
String statusBeforeSubmitAfterProcess = this.getValueInput(By.xpath(locator.getString("xpath.record.agent.status.input"))).trim();
logger.info("after process done ,status expected is pending, infact it is :"+statusBeforeSubmitAfterProcess);
Assert.assertFalse(initialStatus.equals(statusBeforeSubmitAfterProcess));
Assert.assertTrue(statusBeforeSubmitAfterProcess.equals("pending"));
//open journal and verify number of action entry for frank +1, update entry for administrator +1 ,then close journal
this.openJournalFromDataBrowser();
this.sleepCertainTime(5000);
int afterProcess = this.getElementsByXpath(locator.getString("xpath.journal.entry.action.frank")).size();
int afterProcessUpdateAdministrator = this.getElementsByXpath(locator.getString("xpath.journal.entry.update.administrator")).size();
logger.info("afterProcess action entry for frank is :"+afterProcess);
logger.info("afterProcess update entry for administrator is :"+afterProcessUpdateAdministrator);
Assert.assertTrue(afterProcess-beforeProcess==1);
Assert.assertTrue(afterProcessUpdateAdministrator-beforeProcessUpdateAdministrator==1);
//check action entry in data changes viewer for frank
OperationType="ACTION";
source="genericUI";
this.JournalCheckResult(agentID, OperationType);
this.checkPropertiesBeforeAfterInDatachangesViewer("CommissionCode", initialCode, initialCode, true);
this.closeDatachangesViewer();
//check update ectry in data changes viewer for administrator
OperationType="UPDATE";
source="workflow";
this.JournalCheckResult(agentID, OperationType);
this.checkPropertiesBeforeAfterInDatachangesViewer("Status", initialStatus, statusBeforeSubmitAfterProcess, false);
this.closeDatachangesViewer();
this.closeJournal();
//for frank ,open workflow created and change the commission code ,then submit
WorkFlowTaskImpl flow = new WorkFlowTaskImpl(this.driver);
flow.openMenuGoven();
flow.openMenuWorkFlowTask();
this.sleepCertainTime(5000);
flow.sortWorkFlowTaskBydate();
flow.openAWorkTask();
this.sleepCertainTime(10000);
// Assert.assertFalse(this.getElementByXpath(locator.getString("xpath.record.agent.comchangeworkflow.taskopened.firstname.input")).isEnabled(), "frank can not modify first name in opened task test failed!");
// Assert.assertFalse(this.getElementByXpath(locator.getString("xpath.record.agent.comchangeworkflow.taskopened.lastname.input")).isEnabled(), "frank can not modify last name in opened task test failed!");
// Assert.assertFalse(this.getElementByXpath(locator.getString("xpath.record.agent.comchangeworkflow.taskopened.identifer.input")).isEnabled(), "frank can not modify identifer in opened task test failed!");
String codeSubmitted = flow.changeAgentCommissionCodeValidImpl(Integer.parseInt(initialCode), 2);
this.sleepCertainTime(10000);
//close data browser first,to check status and commission code is not changed
this.closeDataBrowser();
flow.uncheckHideFinishedTask();
flow.clickSearch();
flow.sortWorkFlowTaskBydate();
flow.openAWorkTask();
flow.openRelatedRecord();
this.sleepCertainTime(5000);
Assert.assertTrue(this.getValueInput(By.xpath(locator.getString("xpath.record.agent.commissioncode.input"))).equals(initialCode), "test frank can not change commission code directly failed");
Assert.assertTrue(this.getValueInput(By.xpath(locator.getString("xpath.record.agent.status.input"))).trim().equals("pending"));
flow.closeRelatedAgentRecord();
//reopen data browser from welcome page
this.switchtoTabWelcome();
this.openDataBrowserFromWelcome();
this.sleepCertainTime(5000);
this.switchtoTabDataBrowser();
this.chooseEntityDirectlyInDataBrowser(entity);
this.selectAgentRecordBySearch(entity,Identifie,agentID);
this.maxARecordPanel();
this.openJournalFromDataBrowser();
this.JournalCheckResult(agentID, OperationType);
this.checkPropertiesBeforeAfterInDatachangesViewer("CommissionCode", initialCode, initialCode, true);
//logout frank ,login jennifer
log.logout();
log.loginUserForce( userJennifer, jenniferPass);
chooseContainer(container);
chooseModle(model);
clickSave();
this.chooseEntity(entity);
this.selectAgentRecordBySearch(entity,Identifie,agentID);
this.openJournalFromDataBrowser();
this.sleepCertainTime(5000);
int beforeApprove = this.getElementsByXpath(locator.getString("xpath.journal.entry.update.administrator")).size();
logger.info("beforeApprove ,the update entry for administrator is :"+beforeApprove);
this.closeJournal();
//open work flow task page
flow.openMenuGoven();
flow.openMenuWorkFlowTask();
this.sleepCertainTime(10000);
//sort work flow task by date and open the first work
flow.sortWorkFlowTaskBydate();
flow.openAWorkTask();
//jennifer approved and submit
flow.approveCommissionCodeChange("yes");
flow.clickSubmit();
this.waitfor(By.xpath(locator.getString("xpath.workflowtask.open.produce.submited.success.info")), WAIT_TIME_MID);
this.clickElementByXpath(locator.getString("xpath.workflowtask.open.product.submited.success.ok.button"));
this.sleepCertainTime(5000);
flow.uncheckHideFinishedTask();
flow.clickSearch();
flow.sortWorkFlowTaskBydate();
this.sleepCertainTime(3000);
flow.openAWorkTask();
this.sleepCertainTime(10000);
flow.openRelatedRecord();
this.sleepCertainTime(10000);
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.workflowtask.agent.openrelatedrecord.open.closeTab")), WAIT_TIME_MIN)!=null);
//verify commission code is really changed.
//close the data browser first ,for xpath duplicated
this.closeDataBrowser();
this.sleepCertainTime(3000);
String codeApproved = this.getValueInput(By.xpath(locator.getString("xpath.record.agent.commissioncode.input")));
logger.info("afterapproved ,the commission code is:"+codeApproved);
// Assert.assertTrue(price.equals(priceSubmited));
Assert.assertTrue(codeApproved.equals(codeSubmitted));
Assert.assertFalse(codeApproved.equals(initialCode));
//reopen data browser
this.clickElementByXpath("//span[contains(@class,'x-panel-header-text') and text()='Home']");
this.clickElementByXpath("//div[contains(@id,'menu-browserecords')]");
this.chooseEntity(entity);
this.sleepCertainTime(5000);
//close the record opened
flow.closeRelatedAgentRecord();
//close the work task
flow.closeAWorkTask();
//verify in journal that an update entry for jennifer added
this.switchtoTabDataBrowser();
this.sleepCertainTime(3000);
this.maxDataBrowserBoard();
this.selectAgentRecordBySearch(entity,Identifie,agentID);
this.sleepCertainTime(5000) ;
this.openJournalFromDataBrowser();
this.sleepCertainTime(5000);
int afterApprove = this.getElementsByXpath(locator.getString("xpath.journal.entry.update.administrator")).size();
logger.info("afterApprove,the update entry for administrator is :"+afterApprove);
Assert.assertTrue(afterApprove-beforeApprove==1);
OperationType="UPDATE";
source="workflow";
this.JournalCheckResult(agentID, OperationType);
this.checkPropertiesBeforeAfterInDatachangesViewer("CommissionCode", initialCode, codeSubmitted, false);
this.checkPropertiesBeforeAfterInDatachangesViewer("Status", statusBeforeSubmitAfterProcess, initialStatus, false);
//close datachangesviewer page.
this.closeDatachangesViewer();
this.closeJournal();
}
public void changeCommissionCodeNotApprovedWorkflow(String userFrank,String frankPass,String userJennifer,String jenniferPass,String container,String model,String entity,String Identifie,String agentID,String Firstname,String FirstnameValue,String Lastname,String LastnameValue,String CommissionCode,String CommissionCodeValue,String StartDate,String StartDateValue){
LogonImpl log = new LogonImpl(this.driver);
log.logout();
log.loginUserForce(userFrank, frankPass);
String[] parametersID={entity,Identifie};
chooseContainer(container);
chooseModle(model);
clickSave();
chooseEntity(entity);
this.sleepCertainTime(3000);
this.maxDataBrowserBoard();
this.selectAgentRecordBySearch(entity,Identifie,agentID);
this.sleepCertainTime(3000);
//verify that frank can not modify agent properties directly
Assert.assertFalse(this.getElementByXpath(locator.getString("xpath.record.agent.commissioncode.input")).isEnabled(), "frank can not modify commission code test failed!");
//get the initial agent properties.commissionCode
String initialCode = this.getValueInput(By.xpath(locator.getString("xpath.record.agent.commissioncode.input")));
String initialStatus = this.getValueInput(By.xpath(locator.getString("xpath.record.agent.status.input")));
logger.info("for agent :"+agentID+"The initial commission code is:"+initialCode+",the initial status is:"+initialStatus);
this.maxARecordPanel();
//open journal to verify number of action entry for frank ,and update entry for administrator ,then close journal
this.openJournalFromDataBrowser();
this.sleepCertainTime(5000);
int beforeProcess = this.getElementsByXpath(locator.getString("xpath.journal.entry.action.frank")).size();
int beforeProcessUpdateAdministrator = this.getElementsByXpath(locator.getString("xpath.journal.entry.update.administrator")).size();
logger.info("beforeProcess action entry for frank is:"+beforeProcess);
logger.info("beforeProcess update entry for administrator is:"+beforeProcessUpdateAdministrator);
this.closeJournal();
//frank launch com code change request process
this.launchProcess("Com Change Request");
this.checkProcessDoneAndClickOK();
this.sleepCertainTime(3000);
//click the refresh button ,and check status change to pending
this.clickElementByXpath(locator.getString("xpath.record.panel.refresh.button"));
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.record.agent.comchange.processdone.clickrefresh.conform.info")), WAIT_TIME_MIN).isDisplayed());
this.clickElementByXpath(locator.getString("xpath.record.agent.comchange.processdone.clickrefresh.conform.yes.button"));
this.sleepCertainTime(5000);
String statusBeforeSubmitAfterProcess = this.getValueInput(By.xpath(locator.getString("xpath.record.agent.status.input"))).trim();
logger.info("after process done ,status expected is pending, infact it is :"+statusBeforeSubmitAfterProcess);
Assert.assertFalse(initialStatus.equals(statusBeforeSubmitAfterProcess));
Assert.assertTrue(statusBeforeSubmitAfterProcess.equals("pending"));
//open journal and verify number of action entry for frank +1, update entry for administrator +1 ,then close journal
this.openJournalFromDataBrowser();
this.sleepCertainTime(5000);
int afterProcess = this.getElementsByXpath(locator.getString("xpath.journal.entry.action.frank")).size();
int afterProcessUpdateAdministrator = this.getElementsByXpath(locator.getString("xpath.journal.entry.update.administrator")).size();
logger.info("afterProcess action entry for frank is :"+afterProcess);
logger.info("afterProcess update entry for administrator is :"+afterProcessUpdateAdministrator);
Assert.assertTrue(afterProcess-beforeProcess==1);
Assert.assertTrue(afterProcessUpdateAdministrator-beforeProcessUpdateAdministrator==1);
//check action entry in data changes viewer for frank
OperationType="ACTION";
source="genericUI";
this.JournalCheckResult(agentID, OperationType);
this.checkPropertiesBeforeAfterInDatachangesViewer("CommissionCode", initialCode, initialCode, true);
this.closeDatachangesViewer();
//check update ectry in data changes viewer for administrator
OperationType="UPDATE";
source="workflow";
this.JournalCheckResult(agentID, OperationType);
this.checkPropertiesBeforeAfterInDatachangesViewer("Status", initialStatus, statusBeforeSubmitAfterProcess, false);
this.closeDatachangesViewer();
this.closeJournal();
//for frank ,open workflow created and change the commission code ,then submit
WorkFlowTaskImpl flow = new WorkFlowTaskImpl(this.driver);
flow.openMenuGoven();
flow.openMenuWorkFlowTask();
this.sleepCertainTime(5000);
flow.sortWorkFlowTaskBydate();
flow.openAWorkTask();
this.sleepCertainTime(10000);
// Assert.assertFalse(this.getElementByXpath(locator.getString("xpath.record.agent.comchangeworkflow.taskopened.firstname.input")).isEnabled(), "frank can not modify first name in opened task test failed!");
// Assert.assertFalse(this.getElementByXpath(locator.getString("xpath.record.agent.comchangeworkflow.taskopened.lastname.input")).isEnabled(), "frank can not modify last name in opened task test failed!");
// Assert.assertFalse(this.getElementByXpath(locator.getString("xpath.record.agent.comchangeworkflow.taskopened.identifer.input")).isEnabled(), "frank can not modify identifer in opened task test failed!");
String codeSubmitted = flow.changeAgentCommissionCodeValidImpl(Integer.parseInt(initialCode), 2);
this.sleepCertainTime(10000);
//close data browser first,to check status and commission code is not changed
this.closeDataBrowser();
flow.uncheckHideFinishedTask();
flow.clickSearch();
flow.sortWorkFlowTaskBydate();
flow.openAWorkTask();
this.sleepCertainTime(10000);
flow.openRelatedRecord();
this.sleepCertainTime(5000);
Assert.assertTrue(this.getValueInput(By.xpath(locator.getString("xpath.record.agent.commissioncode.input"))).equals(initialCode), "test frank can not change commission code directly failed");
Assert.assertTrue(this.getValueInput(By.xpath(locator.getString("xpath.record.agent.status.input"))).trim().equals("pending"));
flow.closeRelatedAgentRecord();
//reopen data browser from welcome page
this.switchtoTabWelcome();
this.openDataBrowserFromWelcome();
this.sleepCertainTime(5000);
this.switchtoTabDataBrowser();
this.chooseEntityDirectlyInDataBrowser(entity);
this.selectAgentRecordBySearch(entity,Identifie,agentID);
this.maxARecordPanel();
this.openJournalFromDataBrowser();
this.JournalCheckResult(agentID, OperationType);
this.checkPropertiesBeforeAfterInDatachangesViewer("CommissionCode", initialCode, initialCode, true);
//logout frank ,login jennifer
log.logout();
log.loginUserForce( userJennifer, jenniferPass);
chooseContainer(container);
chooseModle(model);
clickSave();
this.chooseEntity(entity);
this.selectAgentRecordBySearch(entity,Identifie,agentID);
this.openJournalFromDataBrowser();
this.sleepCertainTime(5000);
int beforeApprove = this.getElementsByXpath(locator.getString("xpath.journal.entry.update.administrator")).size();
logger.info("beforeApprove ,the update entry for administrator is :"+beforeApprove);
this.closeJournal();
//open work flow task page
flow.openMenuGoven();
flow.openMenuWorkFlowTask();
this.sleepCertainTime(10000);
//sort work flow task by date and open the first work
flow.sortWorkFlowTaskBydate();
flow.openAWorkTask();
//jennifer not approved and submit
flow.approveCommissionCodeChange("no");
flow.clickSubmit();
this.waitfor(By.xpath(locator.getString("xpath.workflowtask.open.produce.submited.success.info")), WAIT_TIME_MID);
this.clickElementByXpath(locator.getString("xpath.workflowtask.open.product.submited.success.ok.button"));
this.sleepCertainTime(5000);
flow.uncheckHideFinishedTask();
flow.clickSearch();
flow.sortWorkFlowTaskBydate();
this.sleepCertainTime(3000);
flow.openAWorkTask();
this.sleepCertainTime(10000);
flow.openRelatedRecord();
this.sleepCertainTime(10000);
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.workflowtask.agent.openrelatedrecord.open.closeTab")), WAIT_TIME_MIN)!=null);
//verify commission code is really changed.
//close the data browser first ,for xpath duplicated
this.closeDataBrowser();
this.sleepCertainTime(3000);
String codeApproved = this.getValueInput(By.xpath(locator.getString("xpath.record.agent.commissioncode.input")));
logger.info("afterapproved ,the commission code is:"+codeApproved);
// Assert.assertTrue(price.equals(priceSubmited));
Assert.assertTrue(codeApproved.equals(initialCode));
Assert.assertFalse(codeApproved.equals(codeSubmitted));
//reopen data browser
this.clickElementByXpath("//span[contains(@class,'x-panel-header-text') and text()='Home']");
this.clickElementByXpath("//div[contains(@id,'menu-browserecords')]");
this.chooseEntity(entity);
this.sleepCertainTime(5000);
//close the record opened
flow.closeRelatedAgentRecord();
//close the work task
flow.closeAWorkTask();
//verify in journal that an update entry for jennifer added
this.switchtoTabDataBrowser();
this.sleepCertainTime(3000);
this.maxDataBrowserBoard();
this.selectAgentRecordBySearch(entity,Identifie,agentID);
this.sleepCertainTime(5000) ;
this.openJournalFromDataBrowser();
this.sleepCertainTime(5000);
int afterApprove = this.getElementsByXpath(locator.getString("xpath.journal.entry.update.administrator")).size();
logger.info("afterApprove,the update entry for administrator is :"+afterApprove);
Assert.assertTrue(afterApprove-beforeApprove==0);
OperationType="UPDATE";
source="workflow";
this.JournalCheckResult(agentID, OperationType);
this.checkPropertiesBeforeAfterInDatachangesViewer("CommissionCode", initialCode, initialCode, true);
this.checkPropertiesBeforeAfterInDatachangesViewer("Status", statusBeforeSubmitAfterProcess, "rejected", false);
//close datachangesviewer page.
this.closeDatachangesViewer();
this.closeJournal();
}
}

View File

@@ -0,0 +1,262 @@
package org.talend.mdm.impl;
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.talend.mdm.modules.Record;
import org.testng.Assert;
public class RecordImplProductFamily extends Record{
String OperationType,key,source;
boolean result;
public RecordImplProductFamily(WebDriver driver) {
super(driver);
this.driver = driver;
}
public void ExportRecordImpl(String container,String modle,String entity){
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
clickExport();
this.sleepCertainTime(8000);
}
public void restoreFromRecycleImpl(String container,String modle,String entity,String feild2Value,String feild2Name){
chooseContainer(container);
chooseModle(modle);
clickSave();
clickRecycle();
this.sleepCertainTime(5000);
this.clickElementByXpath(this.getString(locator, "xpath.record.recycle.click.record",feild2Value));
this.clickElementByXpath(this.getString(locator,"xpath.record.recycle.click.record.restore",feild2Value));
this.sleepCertainTime(5000);
this.clickElementByXpath(locator.getString("xpath.record.recycle.click.record.restore.yes"));
if (this.isElementPresent(By.xpath("//span[contains(text(),'Please input all necessary search ')]"),WAIT_TIME_MIN)){
this.clickElementByXpath("//button[text()='Ok']");}
//assert the record restore in the entity
this.clickElementByXpath(locator.getString("xpath.record.click.databrowser"));
this.clickElementByXpath(locator.getString("xpath.record.choose.entity.arrows"));
this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.entity",entity)), WAIT_TIME_MIN);
this.clickElementByXpath(this.getString(locator, "xpath.record.choose.entity",entity));
this.sleepCertainTime(5000);
entity=entity.replaceAll(" ","");
String[] parameters={entity,feild2Name,feild2Value};
//this.clickElementByXpath(this.getString(locator, "xpath.record.choose.delete.record",parameters));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.delete.record",parameters)), WAIT_TIME_MIN),"the record restore in the entity");
chooseRcord(entity,feild2Name,feild2Value);
this.sleepCertainTime(5000);
deleteTheRecord(entity);
}
public void deleteRecordImpl(String container,String modle,String entity,String feild2Value,String feild2Name,String feild1Name){
OperationType="PHYSICAL_DELETE";
source="genericUI";
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
entity=entity.replaceAll(" ","");
String[] parametersFeild1={entity,feild2Name,feild2Value,entity,feild1Name};
this.sleepCertainTime(10000);
chooseRcord(entity,feild2Name,feild2Value);
key=this.getValue(this.getElementByXpath(this.getString(locator,"xpath.record.get.uuid",parametersFeild1)));
logger.info(key);
this.sleepCertainTime(5000);
deleteTheRecord(entity);
this.sleepCertainTime(5000);
openJournal(entity,key,OperationType,source);
JournalResultCount();
}
public void deleteRecordToRecycleImpl(String container,String modle,String entity,String feild2Value,String feild2Name,String feild1Name){
OperationType="LOGIC_DELETE";
source="genericUI";
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
entity=entity.replaceAll(" ","");
String[] parameters_container={feild2Value,container};
String[] parameters_modle={feild2Value,modle};
String[] parameters_entity={feild2Value,entity};
String[] parametersFeild1={entity,feild2Name,feild2Value,entity,feild1Name};
this.sleepCertainTime(10000);
chooseRcord(entity,feild2Name,feild2Value);
key=this.getValue(this.getElementByXpath(this.getString(locator,"xpath.record.get.uuid",parametersFeild1)));
this.sleepCertainTime(5000);
logger.info(this.getString(locator, "xpath.record.delete.record",entity));
this.clickElementByXpath(this.getString(locator, "xpath.record.delete.record",entity));
this.clickElementByXpath(locator.getString("xpath.record.delete.record.to.recycle.choose"));
this.clickElementByXpath(locator.getString("xpath.record.delete.record.to.recycle.choose.ok"));
if (this.isElementPresent(By.xpath(locator.getString("xpath.record.delete.record.warn")),WAIT_TIME_MIN)){
this.clickElementByXpath("//button[text()='No']");
}
//go to journal to check
this.sleepCertainTime(3000);
openJournal(entity,key,OperationType,source);
// assert the record which been deleted in the recycle
clickRecycle();
//this.clickElementByXpath(locator.getString("xpath.record.delete.record.to.recycle.assert.clickRefresh"));
this.sleepCertainTime(3000);
logger.info(this.getString(locator, "xpath.record.delete.record.to.recycle.assert.container",parameters_container));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.delete.record.to.recycle.assert.container",parameters_container)), WAIT_TIME_MIN ),"container");
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.delete.record.to.recycle.assert.modle",parameters_modle)), WAIT_TIME_MIN ),"modle");
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.delete.record.to.recycle.assert.entity",parameters_entity)), WAIT_TIME_MIN ),"entity");
}
public void duplicateRecordImpl(String container,String modle,String entity,String feild2Value_old,String feild2Value,String feild2Name,String feild1Name){
OperationType="CREATE";
source="genericUI";
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
entity=entity.replaceAll(" ","");
String[] parametersFeild1={entity,feild2Name,feild2Value_old,entity,feild1Name};
String[] parametersFeild1_dup={entity,feild2Name,feild2Value,entity,feild1Name};
String[] parametersFeild2={entity,feild2Name};
String[] parametersFeild2Assert={entity,feild2Name,feild2Value};
String[] Feild2Value={feild2Name,feild2Value};
this.sleepCertainTime(10000);
chooseRcord(entity,feild2Name,feild2Value_old);
this.sleepCertainTime(5000);
this.clickElementByXpath(locator.getString("xpath.record.Duplicate.click"));
this.sleepCertainTime(5000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.Duplicate.input",parametersFeild2)), WAIT_TIME_MAX),"duplicateARecord");
this.sleepCertainTime(5000);
key=this.getValue(this.getElementByXpath(this.getString(locator,"xpath.record.get.uuid",parametersFeild1)));
logger.info(key);
String[] parametersFeild2Value={entity,key};
String[] parametersFeild2ValueAssert={feild2Name,feild2Value};
this.clickElementByXpath(this.getString(locator,"xpath.record.Duplicate.close.origin",parametersFeild2Value));
this.sleepCertainTime(5000);
this.modifyText(this.getElementByXpath(this.getString(locator, "xpath.record.Duplicate.input",parametersFeild2)), feild2Value);
this.clickElementByXpath(locator.getString("xpath.record.choose.create.input.save"));
// this.clickElementByXpath(locator.getString("xpath.record.click.refresh"));
this.sleepCertainTime(5000);
chooseRcord(entity,feild2Name,feild2Value);
this.sleepCertainTime(5000);
key=this.getValue(this.getElementByXpath(this.getString(locator,"xpath.record.get.uuid",parametersFeild1_dup)));
logger.info(key);
this.sleepCertainTime(3000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.record.assert.feild2",parametersFeild2Assert)), WAIT_TIME_MAX),"createARecord");
this.sleepCertainTime(3000);
openJournal(entity,key,OperationType,source);
this.sleepCertainTime(3000);
JournalCheckResult(key,OperationType);
this.sleepCertainTime(5000);
logger.info(this.getString(locator, "xpath.record.ceate.jouranl",Feild2Value ));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",parametersFeild2ValueAssert )), WAIT_TIME_MIN));
}
public void createRecordImpl(String container,String modle,String entity,String feild2Value,String feild2Name,String feild1Name){
OperationType="CREATE";
source="genericUI";
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
entity=entity.replaceAll(" ","");
String[] parametersFeild1={entity,feild2Name,feild2Value,entity,feild1Name};
String[] NameAssert={feild2Name,feild2Value};
String[] parametersFeild2={entity,feild2Name};
String[] parametersFeild2Assert={entity,feild2Name,feild2Value};
logger.info(feild2Name);
this.sleepCertainTime(3000);
this.clickCreateRecord();
// this.clickElementByXpath(locator.getString("xpath.record.choose.create"));
this.waitforElementDisplayed(By.xpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersFeild2)), WAIT_TIME_MAX);
this.sleepCertainTime(3000);
this.typeTextByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersFeild2), feild2Value);
this.clickElementByXpath(locator.getString("xpath.record.choose.create.input.save"));
this.sleepCertainTime(5000);
Assert.assertTrue(this.waitfor(By.xpath(this.getString(locator, "xpath.record.choose.record.assert.feild2",parametersFeild2Assert)), WAIT_TIME_MIN).isDisplayed(),"createARecord");
this.sleepCertainTime(3000);
key=this.getValue(this.getElementByXpath(this.getString(locator,"xpath.record.get.uuid",parametersFeild1)));
String[] IdAssert={feild1Name,key};
this.sleepCertainTime(3000);
openJournal(entity,key,OperationType,source);
this.sleepCertainTime(5000);
JournalCheckResult(key,OperationType);
this.sleepCertainTime(5000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",IdAssert )), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",NameAssert )), WAIT_TIME_MIN));
}
public void updateRecordImpl(String container,String modle,String entity,String feild2Value_old,String feild2Value,String feild2Name,String feild1Name){
OperationType="UPDATE";
source="genericUI";
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
entity=entity.replaceAll(" ","");
String[] parametersFeild2={entity,feild2Name};
String[] parametersFeild2Assert={entity,feild2Name,feild2Value};
String[] NameAssert={feild2Name,feild2Value};
chooseRcord(entity,feild2Name,feild2Value_old);
String[] parametersFeild1={entity,feild2Name,feild2Value,entity,feild1Name};
this.sleepCertainTime(5000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersFeild2)), 3000));
this.modifyText(this.getElementByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersFeild2)), feild2Value);
this.sleepCertainTime(5000);
this.clickElementByXpath(locator.getString("xpath.record.choose.create.input.save"));
if (this.isTextPresent("No change since last save")){
this.clickElementByXpath("//button[text()='Ok']");
}
else
{
this.clickElementByXpath(locator.getString("xpath.record.click.refresh"));
this.sleepCertainTime(3000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.record.assert.feild2",parametersFeild2Assert)), WAIT_TIME_MAX),"updateARecord");
this.sleepCertainTime(3000);
key=this.getValue(this.getElementByXpath(this.getString(locator,"xpath.record.get.uuid",parametersFeild1)));
this.sleepCertainTime(3000);
openJournal(entity,key,OperationType,source);
JournalCheckResult(key,OperationType);
this.sleepCertainTime(5000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.jouranl",NameAssert )), WAIT_TIME_MIN));
}
}
public void SearchRecordByValueImpl(String container,String modle,String entity,String searchFeild,String opeartion,String value){
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
searchCondition(searchFeild,opeartion,value);
this.sleepCertainTime(3000);
searchValueAssert(searchFeild,opeartion,value,entity);
}
public void SearchRecordByStringImpl(String container,String modle,String entity,String searchFeild,String opeartion,String value){
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
searchCondition(searchFeild,opeartion,value);
this.sleepCertainTime(3000);
searchStringAssert(searchFeild,opeartion,value,entity);
}
public void SearchRecordByDateImpl(String container,String modle,String entity,String searchFeild,String opeartion,String value){
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
searchCondition(searchFeild,opeartion,value);
this.sleepCertainTime(3000);
searchDateAssert(searchFeild,opeartion,value,entity);
}
}

View File

@@ -0,0 +1,195 @@
package org.talend.mdm.impl;
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.talend.mdm.modules.Record;
import org.testng.Assert;
public class RecordImplStore extends Record{
String OperationType,key,source;
public RecordImplStore(WebDriver driver) {
super(driver);
this.driver = driver;
}
public void ExportRecordImpl(String container,String modle,String entity){
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
clickExport();
this.sleepCertainTime(8000);
}
public void deleteRecordImpl(String container,String modle,String entity,String storeId,String storeIdValue){
OperationType="PHYSICAL_DELETE";
source="genericUI";
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
this.sleepCertainTime(3000);
chooseRcord(entity,storeId,storeIdValue);
this.sleepCertainTime(5000);
deleteTheRecord(entity);
this.sleepCertainTime(5000);
openJournal(entity,storeIdValue,OperationType,source);
JournalResultCount();
}
public void testDuplicateRecordImpl(String container,String modle,String entity,String storeId,String storeIdValue,String storeIdValueDup) {
String[] parametersStoreId={entity,storeId};
String[] parametersStoreIdAssert={entity,storeId,storeIdValueDup};
String[] parametersStoreIdValue={entity,storeIdValue};
OperationType="CREATE";
source="genericUI";
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
this.sleepCertainTime(3000);
chooseRcord(entity,storeId,storeIdValue);
this.sleepCertainTime(3000);
this.clickElementByXpath(locator.getString("xpath.record.Duplicate.click"));
this.sleepCertainTime(5000);
this.clickElementByXpath(this.getString(locator,"xpath.record.Duplicate.close.origin",parametersStoreIdValue));
this.sleepCertainTime(3000);
this.modifyText(this.getElementByXpath(this.getString(locator, "xpath.record.Duplicate.input",parametersStoreId)), storeIdValueDup);
this.sleepCertainTime(3000);
this.clickElementByXpath(locator.getString("xpath.record.choose.create.input.save"));
// this.clickElementByXpath(locator.getString("xpath.record.click.refresh"));
this.sleepCertainTime(10000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.record.assert.feild2",parametersStoreIdAssert)), WAIT_TIME_MAX),"duplicateARecord");
this.sleepCertainTime(3000);
openJournal(entity,storeIdValueDup,OperationType,source);
JournalCheckResult(storeIdValueDup,OperationType);
this.sleepCertainTime(5000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.storeId",storeIdValueDup )), WAIT_TIME_MIN));
}
public void createRecordImpl(String container,String modle,String entity,String storeId,String storeIdValue,String address,String addressValue) {
OperationType="CREATE";
source="genericUI";
String lat,longNew,map;
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
String[] parametersStoreId={entity,storeId};
String[] parametersAddress={entity,address};
String[] parametersStoreIdAssert={entity,storeId,storeIdValue};
this.sleepCertainTime(8000);
this.clickCreateRecord();
// this.clickElementByXpath(locator.getString("xpath.record.choose.create"));
this.sleepCertainTime(3000);
this.typeTextByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersStoreId),storeIdValue);
this.typeTextByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersAddress), addressValue);
this.sleepCertainTime(8000);
this.clickElementByXpath(locator.getString("xpath.record.choose.create.input.save"));
this.sleepCertainTime(8000);
chooseRcord(entity,storeId,storeIdValue);
lat=this.getValueInput(By.xpath("//input[@name='Store/Lat']"));
longNew=this.getValueInput(By.xpath("//input[@name='Store/Long']"));
this.sleepCertainTime(3000);
this.clickElementByXpath("//a[text()='Google Map']//following-sibling::img");
map=this.getValueInput(By.xpath("//label[text()='Url:']//following-sibling::div//div//input"));
this.clickElementByXpath("//button[text()='Cancel']");
this.sleepCertainTime(8000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.record.assert.feild2",parametersStoreIdAssert)), WAIT_TIME_MAX),"createARecord");
this.sleepCertainTime(3000);
openJournal(entity,storeIdValue,OperationType,source);
this.sleepCertainTime(5000);
JournalCheckResult(storeIdValue,OperationType);
this.sleepCertainTime(5000);
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.storeId",storeIdValue )), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.ceate.address",addressValue )), WAIT_TIME_MIN));
this.clickElementByXpath("//span[@class='x-tab-strip-inner']//span[text()='Data Browser']");
OperationType="UPDATE";
source="GoogleMap";
this.sleepCertainTime(5000);
openJournal(entity,storeIdValue,OperationType,source);
this.sleepCertainTime(5000);
JournalCheckResult(storeIdValue,OperationType);
this.sleepCertainTime(5000);
logger.info(this.getString(locator,"xpath.record.ceate.lat", lat));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.lat", lat)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.long", longNew)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.googleMap", map)), WAIT_TIME_MIN));
}
public void testUpdateAddressRecordImpl(String container,String modle,String entity,String storeId,String storeIdValue,String address,String addressValue) {
OperationType="UPDATE";
source="GoogleMap";
String latOld,longOld,mapOld,lat,longNew,map;
String[] parametersAddress={entity,address};
chooseContainer(container);
chooseModle(modle);
clickSave();
chooseEntity(entity);
chooseRcord(entity,storeId,storeIdValue);
this.sleepCertainTime(8000);
//get the old value
latOld=this.getValueInput(By.xpath("//input[@name='Store/Lat']"));
longOld=this.getValueInput(By.xpath("//input[@name='Store/Long']"));
this.clickElementByXpath("//a[text()='Google Map']//following-sibling::img");
mapOld=this.getValueInput(By.xpath("//label[text()='Url:']//following-sibling::div//div//input"));
this.clickElementByXpath("//button[text()='Cancel']");
this.sleepCertainTime(8000);
//modify the address
logger.info(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersAddress));
this.modifyText(this.getElementByXpath(this.getString(locator, "xpath.record.choose.update.input.address",parametersAddress)), addressValue);
this.sleepCertainTime(3000);
this.clickElementByXpath(locator.getString("xpath.record.choose.create.input.save"));
this.clickElementByXpath(locator.getString("xpath.record.click.refresh"));
//get the update value
chooseRcord(entity,storeId,storeIdValue);
lat=this.getValueInput(By.xpath("//input[@name='Store/Lat']"));
longNew=this.getValueInput(By.xpath("//input[@name='Store/Long']"));
this.clickElementByXpath("//a[text()='Google Map']//following-sibling::img");
map=this.getValueInput(By.xpath("//label[text()='Url:']//following-sibling::div//div//input"));
this.clickElementByXpath("//button[text()='Cancel']");
this.sleepCertainTime(8000);
this.sleepCertainTime(5000);
openJournal(entity,storeIdValue,OperationType,source);
this.sleepCertainTime(5000);
JournalCheckResult(storeIdValue,OperationType);
this.sleepCertainTime(5000);
//assert the old and new value
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.lat", latOld)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.long", longOld)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.googleMap", mapOld)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.lat", lat)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.long", longNew)), WAIT_TIME_MIN));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.ceate.googleMap", map)), WAIT_TIME_MIN));
}
public void openJournalFromDataBrowser(){
this.clickJournal();
}
public void closeJournal(){
this.clickElementByXpath(locator.getString("xpath.journal.tab.close"));
}
}

View File

@@ -0,0 +1,321 @@
package org.talend.mdm.impl;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.talend.mdm.modules.User;
import org.testng.Assert;
public class UserImpl extends User{
public LogonImpl log;
public UserImpl(WebDriver driver) {
super(driver);
this.driver = driver;
log = new LogonImpl(this.driver);
}
public void logoutThenloginAdministratorAndDeleteUser(String userName,String userPassword,String message,String userDelete){
log.logout();
log.loginAdministrator(userName, userPassword, message);
this.openMenuAdministrator();
this.gotoUserManagePage();
this.deleteUser(userDelete);
}
public void addUserImpl(String identifier,String firstName,String lastName,String password,String confirmPassword,
String email, String company, String defaultVersion, boolean active, String[] roles){
this.gotoUserManagePage();
this.addUser(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, roles);
}
protected void addUserWithinLicenseAllowed(String roles,int n) {
logger.info("Start to add N users: ");
for(int i=0;i<n;i++)
{
String identifier="testUser"+i;
String password="password"+i;
String confirmPassword=password;
String firstName="testfirstName"+i;
String lastName="testlastName"+i;
String email="test@email"+i+".com";
String company="testcompany"+i;
String defaultVersion="testdefaultVersion";
boolean active=true;
this.addUser(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, roles);
}
logger.info("N users added successfull! ");
}
public void addUserAllowed(String roles,int n){
if(n!=0){
this.gotoUserManagePage();
this.addUserWithinLicenseAllowed(roles, n);
}
}
public void addUserOverAllowedAdmin(String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion,boolean active,String roles,int n){
logger.info("click administration to display menu user manage");
logger.info("click menu user manage");
this.gotoUserManagePage();
logger.info("user manage page opened!");
logger.info("user manage page opened!");
this.clickAddNewUser();
logger.info("new user button clicked");
this.configureUser(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, splitParameter(roles));
this.clickSave();
logger.info("save new user button clicked");
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("user.add.admin.over")), WAIT_TIME_MAX));
}
public void addUserOverAllowedWeb(String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion,boolean active,String roles,int n){
logger.info("click administration to display menu user manage");
logger.info("click menu user manage");
this.gotoUserManagePage();
logger.info("user manage page opened!");
logger.info("user manage page opened!");
this.clickAddNewUser();
logger.info("new user button clicked");
this.configureUser(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, splitParameter(roles));
this.clickSave();
logger.info("save new user button clicked");
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("user.add.webuser.over")), WAIT_TIME_MAX));
}
public void addUserOverAllowedWebInactive(String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion,boolean active,String roles,int n){
logger.info("click administration to display menu user manage");
logger.info("click menu user manage");
Assert.assertTrue(n==0, "users within license!");
this.gotoUserManagePage();
logger.info("user manage page opened!");
logger.info("user manage page opened!");
this.clickAddNewUser();
logger.info("new user button clicked");
this.configureUser(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, splitParameter(roles));
this.clickSaveAndCheckExpectedTrue(identifier);
this.clickElementByXpath(this.getString(locator, "xpath.user.status", identifier));
Assert.assertTrue(this.getValue(this.getElementByXpath(this.getString(locator, "xpath.user.status", identifier))).equals("false"), "Inactive user "+identifier+" added failed!");
}
public void addUserWithMultipleRoles(String userTest,String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active,String[] roles){
this.openMenuAdministrator();
this.gotoUserManagePage();
this.deleteAllUsersStartWith(userTest);
this.addUser(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, roles);
this.deleteUser(identifier);
}
public void userSelectedAfterSave(String userNameAdministrator,String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active,String[] roles){
logger.info("Ready to test user selected after saved succefully.");
this.openMenuAdministrator();
this.gotoUserManagePage();
logger.info("expend administration and loged into user manage page ok.");
logger.info("select user administrator at first.");
this.selectAUser(userNameAdministrator);
logger.info("select user administrator first ok.");
logger.info("configure a new user and save.");
this.addUser(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, roles);
logger.info("configure a new user and saved ok.");
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.user.selecteduser.row", identifier)), WAIT_TIME_MAX));
logger.info("test user selected after saved ok ,with new user selected.");
this.deleteUser(identifier);
logger.info("the new add user delete ok.");
}
public void addUserWithMultipleRolesOneAllowedAnotherNot(String userNameAdministrator,String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active,String[] roles){
this.openMenuAdministrator();
this.gotoUserManagePage();
this.clickAddNewUser();
this.configureUser(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, roles);
this.clickSave();
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("user.add.admin.over")), WAIT_TIME_MAX));
}
public void addUserWithoutSelectRoles(String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active){
logger.info("Ready to test add user without select any roles");
this.openMenuAdministrator();
logger.info("open administration ok.");
this.gotoUserManagePage();
logger.info("click user manage and log into user manage ok.");
this.clickAddNewUser();
logger.info("click add new user button ok.");
this.confBaseUserInfo(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active);
logger.info("configure user's information without select roles ok.");
this.clickSave();
logger.info("save user button click ok.");
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.user.add.user.without.roles.warning")), WAIT_TIME_MAX));
logger.info("test add user without select any roles ok , warning message appeared.");
}
public void addUserWithPasswordNotEqualsConfirmPassword(String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active,String[] roles){
logger.info("Ready to test add user with confiugre user password not equals to confirm password.");
this.openMenuAdministrator();
this.gotoUserManagePage();
logger.info("expend administration and loged into user manage page ok.");
this.clickAddNewUser();
logger.info("click add new user button ok.");
this.configureUser(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, roles);
logger.info("configure user information with password not equals to confirm password ok");
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.user.add.password.confirm.alert.img")), WAIT_TIME_MID));
logger.info("test add user with configure user password not equals to confirm password ok ,alert img appeared .");
}
public void addUserInactive(String userNameAdministrator,String userPassAdministrator,String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active,String[] roles){
this.openMenuAdministrator();
this.gotoUserManagePage();
this.clickAddNewUser();
this.configureUser(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, false, roles);
this.clickSaveAndCheckExpectedTrue(identifier);
this.clickElementByXpath(this.getString(locator, "xpath.user.status", identifier));
Assert.assertTrue(this.getValue(this.getElementByXpath(this.getString(locator, "xpath.user.status", identifier))).equals("false"), "Inactive user "+identifier+" added failed!");
}
public void activeAnUserInactive(String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active,String[] roles){
this.openMenuAdministrator();
this.gotoUserManagePage();
this.clickElementByXpath(this.getString(locator, "xpath.user.status", identifier));
Assert.assertTrue(this.getValue(this.getElementByXpath(this.getString(locator, "xpath.user.status", identifier))).equals("false"), "Inactive user "+identifier+" added failed!");
this.clickActive();
this.clickSave();
this.clickFlushCacheOK();
this.selectAUser(identifier);
this.clickElementByXpath(this.getString(locator, "xpath.user.status", identifier));
Assert.assertTrue(this.getValue(this.getElementByXpath(this.getString(locator, "xpath.user.status", identifier))).equals("true"), "Active user "+identifier+" failed!");
}
public void AddUserInactiveCheckLoginThenActive(String administrator,String adminPass,String identifier,String firstName,String lastName,String password,String confirmPassword,String email,String company,String defaultVersion, boolean active,String roles) {
this.addUserInactive(administrator, adminPass, identifier,
firstName, lastName, password, confirmPassword, email, company,
defaultVersion, active, splitParameter(roles));
log.logout();
log.loginWithExistInactiveUserImpl(identifier, password, locator
.getString("login.exist.user.inactive.allert.message"));
log.loginAdministrator(administrator, adminPass, locator
.getString("login.administrator.forcelogin.message"));
this.activeAnUserInactive(identifier, firstName, lastName,
password, confirmPassword, email, company, defaultVersion,
active, splitParameter(roles));
log.logout();
log.loginAdministrator(identifier, password, locator
.getString("login.administrator.forcelogin.message"));
this.logoutThenloginAdministratorAndDeleteUser(administrator, adminPass, locator.getString("login.administrator.forcelogin.message"), identifier);
}
public void flushCache(String userName,String cacheUrl){
logger.info("Ready to test flush cache!");
this.openMenuAdministrator();
this.gotoUserManagePage();
logger.info("login ok and into user mange page ok.");
WebDriver driver2 = this.initNewDriver();
this.openURL(driver2, cacheUrl+locator.getString("flushcache.url"));
this.sleepCertainTime(5000);
logger.info("open url to check flush cache ok.");
logger.info("first time check without click flush cache button.");
this.typeString(this.findElementDefineDriver(driver2, By.xpath(locator.getString("xpath.user.flushcache.urlopen.parainput"))), locator.getString("flushcache.para"));
this.findElementDefineDriver(driver2, By.xpath(locator.getString("xpath.user.flushcache.urlopen.para.submit"))).click();
this.sleepCertainTime(5000);
Assert.assertTrue(driver2.findElement(By.tagName("body")).getText().contains(userName));
logger.info("first time checked ok ,with string administrator appear");
logger.info("second time ,select user adminisrator and click flush cache button");
this.selectAUser(userName);
this.sleepCertainTime(2000);
this.clickFlushCacheButton();
this.clickFlushCacheOK();
logger.info("second time click flush cache button ok.");
driver2.navigate().back();
logger.info("driver2 controls browser back again.");
this.typeString(this.findElementDefineDriver(driver2, By.xpath(locator.getString("xpath.user.flushcache.urlopen.parainput"))), locator.getString("flushcache.para"));
this.findElementDefineDriver(driver2, By.xpath(locator.getString("xpath.user.flushcache.urlopen.para.submit"))).click();
this.sleepCertainTime(5000);
Assert.assertFalse(driver2.findElement(By.tagName("body")).getText().contains(userName));
logger.info("second time check with click flush cache button ok,string administraor not appeared.");
driver2.quit();
logger.info("driver2 controls browser to quit.");
}
public void addUserWithCustomizeRoles(String administrator,String administratorPass,String identifier, String firstName, String lastName, String password, String confirmPassword, String email, String company,String defaultVersion,boolean active, String rolesCustomize,String rolesSystem){
logger.info("Ready to test add user with customized roles");
this.openMenuAdministrator();
this.gotoUserManagePage();
logger.info("login ok and into user mange page ok.");
this.clickAddNewUser();
logger.info("click add new user ok.");
logger.info("ready to configure new user's base infomation.");
this.confBaseUserInfo(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active);
logger.info(" user's base infomation configure ok.");
this.selectRoles(rolesCustomize);
logger.info("add demo roles only for user ok.");
this.clickSave();
logger.info("user save button click ok.");
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.user.add.user.without.system.roles.warning")), WAIT_TIME_MAX));
logger.info("warning information let you to add system roles appear ok.");
this.clickElementByXpath(locator.getString("xpath.user.add.user.without.system.roles.warning.ok"));
this.selectRoles(rolesSystem);
logger.info("click ok button and select a system role for user");
this.clickSaveAndCheckExpectedTrue(identifier);
logger.info("after select a system role for user and click save user button ,checked new user added ok.");
log.logout();
log.loginUserForce(identifier, password);
this.logoutThenloginAdministratorAndDeleteUser(administrator, administratorPass, locator.getString("login.administrator.forcelogin.message"), identifier);
}
public void userLoginWithNewRole(String userNameAdministrator,String adminPass,String identifier, String firstName,String lastName, String password, String confirmPassword, String email,String company, String defaultVersion, boolean active, String roles){
logger.info("Ready to test user login with new role.");
this.openMenuAdministrator();
this.gotoUserManagePage();
logger.info("expend administration and loged into user manage page ok.");
logger.info("configure a new user and save.");
this.addUser(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, roles);
logger.info("configure a new user and saved ok.");
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.user.selecteduser.row", identifier)), WAIT_TIME_MAX));
logger.info("new user added ok,ready to check new user login.");
log.logout();
log.loginUserForce(identifier, password);
logger.info("test login with new user ok.");
logger.info("login administrator and delete the new user added just now.");
this.logoutThenloginAdministratorAndDeleteUser(userNameAdministrator, adminPass, locator.getString("login.administrator.forcelogin.message"), identifier);
logger.info("delete the new user added ok.");
}
public void readOnlyAccessForViewer(String userNameAdministrator,String adminPass,String identifier, String firstName,String lastName, String password, String confirmPassword, String email,String company, String defaultVersion, boolean active, String roles,String container,String modle,String entity,String UniqueId,String Name,String Description,String Price){
RecordImplProduct rec = new RecordImplProduct(this.driver);
this.openMenuAdministrator();
this.gotoUserManagePage();
this.addUser(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active, roles);
log.logout();
log.loginUserForce(identifier, password);
rec.chooseContainer(container);
rec.chooseModle(modle);
rec.clickSave();
rec.chooseEntity(entity);
this.sleepCertainTime(5000);
rec.clickCreateRecord();
String[] parametersUniqueId={entity,UniqueId};
String[] parametersName={entity,Name};
String[] parametersDescription={entity,Description};
String[] parametersPrice={entity,Price};
Assert.assertFalse(this.getElementByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersUniqueId)).isEnabled());
Assert.assertFalse(this.getElementByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersName)).isEnabled());
Assert.assertFalse(this.getElementByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersDescription)).isEnabled());
Assert.assertFalse(this.getElementByXpath(this.getString(locator, "xpath.record.choose.create.input.feild2",parametersPrice)).isEnabled());
this.logoutThenloginAdministratorAndDeleteUser(userNameAdministrator, adminPass, locator.getString("login.administrator.forcelogin.message"), identifier);
}
}

View File

@@ -0,0 +1,31 @@
package org.talend.mdm.impl;
import org.openqa.selenium.WebDriver;
import org.talend.mdm.modules.Welcome;
public class WelcomeImpl extends Welcome{
public WelcomeImpl(WebDriver driver) {
super(driver);
this.driver = driver;
}
public void reSortWindows(){
this.checkGetStartedWindow();
this.reSortWindowLayout("xpath.ui.window.getstarted.title","xpath.ui.window.search.title",0,20);
this.checkAlertsWindow();
this.reSortWindowLayout("xpath.ui.window.processes.title","xpath.ui.window.alerts.title", 0, 20);
this.checkSearchWindow();
this.reSortWindowLayout("xpath.ui.window.search.title", "xpath.ui.window.alerts.title", 0, 20);
this.checkTasksWindow();
this.reSortWindowLayout("xpath.ui.window.alerts.title", "xpath.ui.window.getstarted.title", 0,20);
this.checkProcessWindow();
}
public void openWorkFlowTaskFromWelcome(){
this.checkTasksWindow();
this.openTasks();
}
}

View File

@@ -0,0 +1,47 @@
package org.talend.mdm.impl;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.talend.mdm.modules.DataSteward;
import org.talend.mdm.modules.User;
import org.talend.mdm.modules.WorkFlowTask;
import org.testng.Assert;
public class WorkFlowTaskImpl extends WorkFlowTask{
public WorkFlowTaskImpl(WebDriver driver) {
this.driver = driver;
}
public String changeProductPriceValidImpl(double d,double e){
double value = d*(1+e-0.05);
this.typeString(this.getElementByXpath("//label[text()='Price:']//ancestor::div[contains(@class,'x-form-item ')]//input"), value+"");
String submited = this.getValueInput(By.xpath("//label[text()='Price:']//ancestor::div[contains(@class,'x-form-item ')]//input"));
this.clickSubmit();
this.waitfor(By.xpath("//span[contains(text(),'Successfully submitted.')]"), WAIT_TIME_MID);
this.clickElementByXpath("//span[contains(text(),'Successfully submitted.')]//ancestor::div[contains(@class,'x-window-bwrap')]//button[text()='OK']");
return submited.substring(0,5);
}
public String changeAgentCommissionCodeValidImpl(int initialCode,int step){
int code = initialCode+step;
this.seletDropDownList(By.xpath(locator.getString("xpath.record.agent.comchangeworkflow.taskopened.commissioncode.dropdownlist.arrow")), code+"");
this.clickSubmit();
this.waitfor(By.xpath("//span[contains(text(),'Successfully submitted.')]"), WAIT_TIME_MID);
this.clickElementByXpath("//span[contains(text(),'Successfully submitted.')]//ancestor::div[contains(@class,'x-window-bwrap')]//button[text()='OK']");
return code+"";
}
public String changeProductPriceInvalidImpl(double d,double e){
double value = d*(1+e+0.15);
this.typeString(this.getElementByXpath("//label[text()='Price:']//ancestor::div[contains(@class,'x-form-item ')]//input"), value+"");
String submited = this.getValueInput(By.xpath("//label[text()='Price:']//ancestor::div[contains(@class,'x-form-item ')]//input"));
this.clickSubmit();
this.waitfor(By.xpath("//span[contains(text(),'Successfully submitted.')]"), WAIT_TIME_MID);
this.clickElementByXpath("//span[contains(text(),'Successfully submitted.')]//ancestor::div[contains(@class,'x-window-bwrap')]//button[text()='OK']");
return submited.substring(0,5);
}
}

View File

@@ -0,0 +1,182 @@
package org.talend.mdm.modules;
import java.awt.AWTException;
import java.awt.RenderingHints.Key;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverBackedSelenium;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.remote.ExecuteMethod;
import org.talend.mdm.Base;
import org.talend.mdm.impl.LogonImpl;
import org.testng.Assert;
import com.thoughtworks.selenium.Selenium;
public class DataSteward extends Base{
public void switchDriver(WebDriver dri){
this.driver=dri;
}
public void openMenuGoven() {
this.waitfor(By.xpath(locator.getString("xpath.menu.goven")), WAIT_TIME_MIN);
this.clickElementByXpath(locator.getString("xpath.menu.goven"));
}
public void openMenuDSC() {
this.waitfor(By.id(locator.getString("id.menu.datastewardship")), WAIT_TIME_MIN);
this.clickElementById(locator.getString("id.menu.datastewardship"));
}
public void selectATaskByNameInCommonAlltasks(String taskName){
this.clickTaskNavigatorCommonAllTasks();
this.clickElementByXpath(this.getString(locator,"xpath.datatewardshipconsole.tasks.list.byname.row",taskName));
}
public void taskAssignToUser(String userName){
this.clickTaskNavigatorAdministrationAssignTasks();
this.clickElementByXpath("//div[contains(@class,'x-view x-component')]//td[contains(text(),'user')]//ancestor::tr//input[contains(@class,'x-view-item-checkbox')]");
this.clickElementByXpath("//div[contains(@class,'x-view x-component')]//ancestor::div[contains(@class,'x-window-bwrap')]//button[contains(text(),'Ok')]");
}
public void clickTaskNavigatorAdministrationCreateTask() {
this.clickElementByXpath("//span[contains(text(),'Task Navigator')]//ancestor::div[contains(@class,'x-panel-noborder x-panel x-component')]//div[contains(@class,'x-icon-btn x-nodrag icon-reload x-component')]");
this.waitfor(By.xpath(locator.getString("xpath.datatewardship.administration.createtask")), WAIT_TIME_MIN);
logger.info("create task button xpath is :"+locator.getString("xpath.datatewardship.administration.createtask"));
this.sleepCertainTime(5000);
this.clickElementByXpath(locator.getString("xpath.datatewardship.administration.createtask"));
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.datatewardship.administration.createtask.panel.title")), WAIT_TIME_MIN)!=null,"open create task panel failed!");
}
public void clickTaskNavigatorAdministrationAssignTasks() {
this.clickElementByXpath(locator.getString("xpath.datatewardship.administration.assigntasks"));
logger.info("Task navigator Assigh tasks click ok.");
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.datatewardship.assigntasks.window.title")), WAIT_TIME_MIN).isDisplayed());
logger.info("Task navigator Assign tasks click ok ,and assign task pannel opened ok.");
}
public void clickTaskNavigatorCommonNewTasks() {
this.clickElementByXpath(locator
.getString("xpath.datatewardship.common.newtasks"));
logger.info("Task navigator New tasks click ok.");
}
public void clickTaskNavigatorCommonAllTasks() {
this.clickElementByXpath(locator
.getString("xpath.datatewardship.common.alltasks"));
logger.info("Task navigator All tasks click ok.");
}
public void typeTaskName(String taskName){
this.typeString(this.getElementByXpath(locator.getString("xpath.datatewardship.administration.createtask.panel.taskproperties.taskname.input")), taskName);
}
public void typeTaskDefaultSourceName(String source){
this.typeString(this.getElementByXpath(locator.getString("xpath.datatewardship.administration.createtask.panel.taskproperties.sourcename.input")), source);
}
public void selectTaskType(String taskType){
this.seletDropDownList(By.xpath(locator.getString("xpath.datatewardship.administration.createtask.panel.taskproperties.tasktype.arrow")), taskType);
}
public void clickAddColumButton(){
this.clickElementByXpath(locator.getString("xpath.datatewardship.administration.createtask.panel.add.button"));
}
public void clickSaveColumButton(){
this.clickElementByXpath(locator.getString("xpath.datatewardship.administration.createtask.panel.taskschemadata.save.button"));
}
public void keyBoardTypeString(int key){
Robot a;
try {
a = new Robot();
a.keyPress(key);
} catch (AWTException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
public void typeColumFieldName(String fieldName){
Assert.assertTrue(this.driver.findElement(By.xpath(locator.getString("xpath.datatewardship.administration.createtask.panel.taskschemadata.fieldname.input"))).isEnabled());
WebElement e = this.driver.findElement(By.xpath("//span[contains(@class,'x-fieldset-header-text') and text()='Task properties']//ancestor::fieldset[contains(@class,'x-fieldset x-component')]//label[contains(text(),'Task Name:')]//ancestor::div[contains(@class,'x-window-mr')]//div[contains(@class,'x-row-editor-body x-box-layout-ct')]//div[contains(@class,'x-form-field-wrap x-row-editor-field x-component x-box-item') and contains(@gxt-dindex,'name')]"));
(new Actions(driver)).click(e);
this.typeStringByRobot(fieldName);
logger.info("#########################################################################"+this.getElementsByXpath(locator.getString("xpath.datatewardship.administration.createtask.panel.taskschemadata.fieldname.input")).size());
logger.info(this.driver.findElement(By.xpath(locator.getString("xpath.datatewardship.administration.createtask.panel.taskschemadata.fieldname.input"))).getAttribute("value"));
}
public void clickOKOnTaskSchemaCreatPanel(){
this.clickElementByXpath(locator.getString("xpath.datatewardship.administration.createtask.panel.ok.button"));
logger.info("click task schema creation pannel Ok button");
}
public void clickCANCELOnTaskSchemaCreatPanel(){
this.clickElementByXpath(locator.getString("xpath.datatewardship.administration.createtask.panel.cancel.button"));
logger.info("click task schema creation pannel cancel button");
}
public void clickSaveOnTaskSchemaEditView(){
this.sleepCertainTime(5000);
this.clickElementByXpath(locator.getString("xpath.datatewardship.taskschemaeditview.save.button"));
logger.info("click save button on task schema edit view ok.");
}
public void checkTaskSchemaSaveSuccessAndClickOk(){
this.waitfor(By.xpath(locator.getString("xpath.datatewardship.taskschemaeditview.save.success.info")), WAIT_TIME_MIN).isDisplayed();
logger.info("task schema saved ok promt appeared");
this.clickElementByXpath(locator.getString("xpath.datatewardship.taskschemaeditview.save.success.ok.button"));
logger.info("task schema saved ok button clicked.");
}
public void typeStringByRobot(String value){
for(int i = 0; i < value.length(); i++){
char a =value.charAt(i);
int b = a-32;
try {
Robot r = new Robot();
r.keyPress(b);
r.keyRelease(b);
} catch (AWTException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}
}

View File

@@ -0,0 +1,157 @@
package org.talend.mdm.modules;
import java.net.MalformedURLException;
import java.net.URL;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.talend.mdm.Base;
import org.testng.Assert;
public class License extends Base{
public License(WebDriver driver) {
super.setDriver(driver);
this.driver = driver;
}
/****
* click menu license to jump to license page
*/
protected void openAdministration(){
this.logger.info("open Administration page");
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.Administration.menu")), WAIT_TIME_MAX));
this.clickElementByXpath(locator.getString("xpath.Administration.menu"));
}
/****
* click menu license to jump to license page
*/
protected void gotoLicensePage(){
this.clickElementByXpath("//span[text()='License']");
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.license.edit")), this.WAIT_TIME_MAX));
this.logger.info("go to license page ok");
}
protected void uploadLicense(){
}
protected void clickEditlicenseKey(){
logger.info("Read to click edit license key button.");
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.license.edit")), WAIT_TIME_MAX), "The button edit license key is not displayed right now.");
this.clickElementByXpath(locator.getString("xpath.license.edit"));
logger.info("click edit license key button ok");
}
protected void clickBrowseLicenseButton(){
logger.info("Read to click browse license button.");
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.license.edit.browse.input")), WAIT_TIME_MAX), "The button browse license is not displayed right now.");
this.clickElementByXpath(locator.getString("xpath.license.edit.browse.input"));
logger.info("click browse license button ok");
}
protected void clickUploadLicenseButton(){
logger.info("Read to click upload license button.");
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.license.ok")), WAIT_TIME_MAX), "The button browse license is not displayed right now.");
this.clickElementByXpath(locator.getString("xpath.license.ok"));
logger.info("click upload license button ok");
}
protected void typeInlicenseFile(String file){
logger.info("Read to type in license file.");
Assert.assertTrue(this.isElementPresent(By.id(locator.getString("id.license.edit.inputlicense.input")), WAIT_TIME_MAX), "The input filed for license is not displayed right now.");
this.typeTextByXpath("//button[contains(text(),'Browse')]/ancestor::table[1]/preceding-sibling::input[1]", file);
logger.info("type in license file ok.");
}
protected String getUsersAllowedCountAdmin(){
this.clickElementByXpath(locator.getString("xpath.license.refresh.button"));
this.waitforElementDisplayed(By.id(locator.getString("id.license.input.admincount")), WAIT_TIME_MAX);
return this.getValue(this.getElementById((locator.getString("id.license.input.admincount"))));
}
protected String getUsersExistCountAdmin(){
this.clickElementByXpath(locator.getString("xpath.license.refresh.button"));
this.waitforElementDisplayed(By.xpath(locator.getString("xpath.license.existadmin.user.count.text")), WAIT_TIME_MAX);
return this.getValue(this.getElementByXpath((locator.getString("xpath.license.existadmin.user.count.text"))));
}
protected String getUsersAllowedCountWeb(){
this.clickElementByXpath(locator.getString("xpath.license.refresh.button"));
this.waitforElementDisplayed(By.id(locator.getString("id.license.input.webuser")), WAIT_TIME_MAX);
return this.getValue(this.getElementById((locator.getString("id.license.input.webuser"))));
}
protected String getUsersExistCountWeb(){
this.clickElementByXpath(locator.getString("xpath.license.refresh.button"));
this.waitforElementDisplayed(By.xpath(locator.getString("xpath.license.existweb.user.count.text")), WAIT_TIME_MAX);
return this.getValue(this.getElementByXpath((locator.getString("xpath.license.existweb.user.count.text"))));
}
protected String getUsersAllowedCountInteractive(){
this.clickElementByXpath(locator.getString("xpath.license.refresh.button"));
this.waitforElementDisplayed(By.id(locator.getString("id.license.input.interactiveuser")), WAIT_TIME_MAX);
return this.getValue(this.getElementById((locator.getString("id.license.input.interactiveuser"))));
}
protected String getUsersExistCountInteractive(){
this.clickElementByXpath(locator.getString("xpath.license.refresh.button"));
this.waitforElementDisplayed(By.xpath(locator.getString("xpath.license.existinteractive.user.count.text")), WAIT_TIME_MAX);
return this.getValue(this.getElementByXpath((locator.getString("xpath.license.existinteractive.user.count.text"))));
}
protected int transformExistUserNum(String str){
System.err.println(str);
String s=(str.substring(str.indexOf("/")-1, str.length()));
return Integer.parseInt(s.split("/")[0]);
}
protected int transformTotalUserNum(String str){
System.err.println(str);
String s=(str.substring(str.indexOf("/")-1, str.length()));
return Integer.parseInt(s.split("/")[1]);
}
public int getExistInteractive(){
return (this.transformExistUserNum(this.getUsersExistCountInteractive()));
}
/****
* get already exist System_Admin users Num
* @return
*/
public int getExistAdmin(){
return (this.transformExistUserNum(this.getUsersExistCountAdmin()));
}
/****
* get System_Admin user within license
* @return
*/
public int getAvailableAdmin(){
return (this.transformTotalUserNum(this.getUsersExistCountAdmin())-this.transformExistUserNum(this.getUsersExistCountAdmin()));
}
/*****
* get System_Web user left within license
* @return
*/
public int getAvailableWeb(){
return (this.transformTotalUserNum(this.getUsersExistCountWeb())-this.transformExistUserNum(this.getUsersExistCountWeb()));
}
}

View File

@@ -0,0 +1,84 @@
package org.talend.mdm.modules;
import java.net.URL;
import org.apache.log4j.PropertyConfigurator;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.talend.mdm.Base;
import org.talend.mdm.Login;
import org.testng.Assert;
import org.testng.ITestContext;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
public class Logon extends Base{
public void initWebdriver(String url, String root, ITestContext context){
URL file = Login.class.getClassLoader().getResource("org/talend/mdm/resources");
PropertyConfigurator.configure( file.getPath() + "/log4j.properties" );
FirefoxProfile firefoxProfile = new FirefoxProfile();
firefoxProfile.setPreference("browser.download.folderList",2);
firefoxProfile.setPreference("browser.download.manager.showWhenStarting",false);
firefoxProfile.setPreference("browser.download.dir",Login.class.getClassLoader().getResource("org/talend/mdm/download").getPath());
firefoxProfile.setPreference("browser.helperApps.neverAsk.saveToDisk","text/csv");
driver = new FirefoxDriver(firefoxProfile);
logger.info("Set Firefox Driver with Profile");
logger.info("URL - " +url + root);
driver.get(url + root);
super.setDriver(driver);
windowMaximize();
onTestListener(context, Login.class.getClassLoader().getResource("org/talend/mdm/download").getPath());
}
public Logon(WebDriver driver) {
super.setDriver(driver);
this.driver = driver;
}
public void configureLogin(String userName, String userPassword) {
WebElement userE = this.getElementByName(locator.getString("id.login.username"));
userE.clear();
userE.sendKeys(userName);
WebElement passwordE = this.getElementByName(locator.getString("id.login.password"));
passwordE.clear();
passwordE.sendKeys(userPassword);
}
public void clickLogin(){
this.waitfor(By.name(locator.getString("name.login.login")), WAIT_TIME_MID);
Assert.assertTrue(this.isElementPresent(By.name(locator.getString("name.login.login")), WAIT_TIME_MID), "login button is not displayed right now.");
this.getElementByName(locator.getString("name.login.login")).click();
logger.info("Login MDM");
}
public void clickLogout(){
this.getElementByXpath(locator.getString("xpath.login.logout")).click();
}
public void logout() {
logger.info("Click MDM logout button");
this.clickLogout();
logger.info("Logout MDM");
Assert.assertTrue(this.isElementPresent(By.name(locator.getString("id.login.username")), WAIT_TIME_MAX));
}
public void killBroswer() {
driver.quit();
logger.info("WebDriver Quit");
}
}

View File

@@ -0,0 +1,506 @@
package org.talend.mdm.modules;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.openqa.selenium.By;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.interactions.Actions;
import org.talend.mdm.Base;
import org.testng.Assert;
public class Record extends Base{
public Record(WebDriver driver) {
super.setDriver(driver);
this.driver = driver;
}
public void deleteTheRecord(String entity){
this.clickElementByXpath(locator.getString("xpath.record.delete.record"));
this.clickElementByXpath(locator.getString("xpath.record.delete.record.choose"));
this.clickElementByXpath(locator.getString("xpath.record.delete.record.choose.yes"));
/* if (this.isElementPresent(By.xpath(locator.getString("xpath.record.delete.record.warn")),WAIT_TIME_MIN)){
this.clickElementByXpath("//button[text()='No']");
}*/
}
public void openJournal(String entity,String key,String OperationType,String source){
enterJournal(entity,key,OperationType,source);
//JournalResultCount();
}
public void launchProcess(String processOption){
this.seletDropDownList(By.xpath(locator.getString("xpath.record.launchprocess.select.img")), processOption);
this.clickElementByXpath(locator.getString("xpath.record.launchprocess.button"));
}
public void checkProcessDoneAndClickOK(){
this.waitfor(By.xpath(locator.getString("xpath.record.launchprocess.success.status.info")), WAIT_TIME_MID);
//click process ok button to verify can open bonita workflow console
this.clickElementByXpath(locator.getString("xpath.record.launchprocess.success.ok.button"));
}
public void enterJournal(String entity,String key,String OperationType,String source){
clickJournal();
this.sleepCertainTime(5000);
this.modifyText(this.getElementByXpath(locator.getString("xpath.record.choose.journal.entity")),entity);
this.modifyText(this.getElementByXpath(locator.getString("xpath.record.choose.journal.key")),key);
this.modifyText(this.getElementByXpath(locator.getString("xpath.record.choose.journal.source")),source);
this.clickElementByXpath(locator.getString("xpath.record.choose.journal.operation.arrows"));
this.sleepCertainTime(2000);
this.clickElementByXpath(this.getString(locator,"xpath.record.choose.journal.operation.choose",OperationType));
this.clickElementByXpath(locator.getString("xpath.record.click.journal.search"));
this.sleepCertainTime(5000);
}
public void JournalResultCount(){
int recordCount;
boolean result;
String recordSearchResult;
recordSearchResult=this.getElementByXpath(locator.getString("xpath.record.update.journal.price")).getText();
if (recordSearchResult.contains("No data to display"))
{ recordCount=0;
}
else
{
recordCount=Integer.parseInt(this.getElementByXpath(locator.getString("xpath.record.journal.count")).getText().split("of")[1].trim());}
if (recordCount>0)
{result=true;}
else
{ result=false;}
Assert.assertTrue(result);
}
public void JournalCheckResult(String key,String OperationType){
String[] parameters={key,OperationType};
this.moveToElement(driver.findElement(By.xpath("//div[text()='Operation Time']")));
this.sleepCertainTime(2000);
// this.clickVisibleElementByXpath("//div[contains(@class,'x-grid3-hd-inner x-grid3-hd-6')]//a[@class='x-grid3-hd-btn']");
this.clickVisibleElementByXpath("//span[text()='Journal']//ancestor::div[@class='extpj']//div[contains(@class,'x-grid3-hd-inner x-grid3-hd-6')]//a[@class='x-grid3-hd-btn']");
this.sleepCertainTime(2000);
this.clickVisibleElementByXpath("//a[text()='Sort Descending']");
this.sleepCertainTime(2000);
this.clickElementByXpath(this.getString(locator, "xpath.record.choose.journal.choose.record", parameters));
this.doubleClick(this.getElementByXpath(this.getString(locator, "xpath.record.choose.journal.choose.record", parameters)));
this.sleepCertainTime(5000);
this.clickElementByXpath(locator.getString("xpath.record.journal.click.info"));
this.sleepCertainTime(3000);
}
public void searchDateAssert(String searchFeild,String opeartion,String value,String entity_Element){
int recordCount;
Date[] dates;
Date searchDate = null;
boolean result = false;
String recordSearchResult;
String[] parametersSearch={entity_Element,searchFeild};
logger.info(this.getElementByXpath(locator.getString("xpath.record.search.record.count")).getText());
recordSearchResult=this.getElementByXpath(locator.getString("xpath.record.search.record.count")).getText();
if (recordSearchResult.contains("No data to display"))
{
recordCount=0;
logger.info("No data to display");
result = true;
}
else
{
recordCount=Integer.parseInt(this.getElementByXpath(locator.getString("xpath.record.search.record.count")).getText().split("of")[1].trim());
logger.info(recordCount);
dates = new Date[recordCount];
try {
searchDate=new SimpleDateFormat("yyyy-MM-dd").parse(value);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
for (int i=0; i<=recordCount-1; i++)
{ String dates_text=this.getElementsByXpath(this.getString(locator, "xpath.record.search.record.value",parametersSearch)).get(i).getText();
if( !dates_text.equals(" ")){
try {
dates[i]= (new SimpleDateFormat("yyyy-MM-dd")).parse(this.getElementsByXpath(this.getString(locator, "xpath.record.search.record.value",parametersSearch)).get(i).getText());
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (opeartion.contains("equals"))
{
if (dates[i].equals(searchDate))
{
result=true;
}
else
result=false;
}
if (opeartion.contains("is before"))
{
if (dates[i].before(searchDate) )
{
result=true;
}
else
result=false;
}
if (opeartion.contains("is after"))
{
if (dates[i].after(searchDate))
{
result=true;
}
else
result=false;
}
}
}
}
Assert.assertTrue(result);
}
public void searchStringAssert(String searchFeild,String opeartion,String value,String entity_Element){
int recordCount;
String[] names;
String[] parameters={entity_Element,searchFeild};
boolean result = false;
String recordSearchResult;
logger.info(this.getElementByXpath(locator.getString("xpath.record.search.record.count")).getText());
recordSearchResult=this.getElementByXpath(locator.getString("xpath.record.search.record.count")).getText();
if (recordSearchResult.contains("No data to display"))
{ recordCount=0;
logger.info("No data to display");
result = true;
}
else
{
recordCount=Integer.parseInt(this.getElementByXpath(locator.getString("xpath.record.search.record.count")).getText().split("of")[1].trim());
names = new String[recordCount];
for (int i=0; i<=recordCount-1; i++)
{
String names_text=this.getElementsByXpath(this.getString(locator, "xpath.record.search.record.value",parameters)).get(i).getText();
if( !names_text.equals(" ")){
names[i]=this.getElementsByXpath(this.getString(locator, "xpath.record.search.record.value",parameters)).get(i).getText();
if (opeartion.contains("contains the word(s)"))
{
if (names[i].contains(value) )
{
result=true;
}
else
result=false;
}
if (opeartion.contains("contains a word starting with"))
{
if (names[i].contains(value) && names[i].startsWith(value) )
{
result=true;
}
else
result=false;
}
if (opeartion.contains("contains the sentence"))
{
// value = value.replace(" ", "/ ");
if (names[i].contains(value))
{
result=true;
}
else
result=false;
}
}
}
}
Assert.assertTrue(result);
}
public void searchValueAssert(String searchFeild,String opeartion,String value,String entity_Element){
//String[] parametersSearch={entity,searchFeild};
int recordCount;
String recordSearchResult;
double[] ages;
boolean result = false;
String[] parameters={entity_Element,searchFeild};
logger.info(this.getElementByXpath(locator.getString("xpath.record.search.record.count")).getText());
recordSearchResult=this.getElementByXpath(locator.getString("xpath.record.search.record.count")).getText();
if (recordSearchResult.contains("No data to display"))
{
recordCount=0;
logger.info("No data to display");
result = true;
}
else
{
recordCount=Integer.parseInt(this.getElementByXpath(locator.getString("xpath.record.search.record.count")).getText().split("of")[1].trim());
logger.info(recordCount);
ages = new double[recordCount];
for (int i=0; i<=recordCount-1; i++)
{
String age_text=this.getElementsByXpath(this.getString(locator, "xpath.record.search.record.value",parameters)).get(i).getText();
if( !age_text.equals(" ")){
ages[i]=Double.parseDouble(this.getElementsByXpath(this.getString(locator, "xpath.record.search.record.value",parameters)).get(i).getText());
logger.info(ages[i]);
if (opeartion.contains("is greater than"))
{
if (Double.parseDouble(value) < ages[i])
{
result=true;
}
else
result=false;
}
if (opeartion.contains("is equal to"))
{
if (Double.parseDouble(value) == ages[i])
{
result=true;
}
else
result=false;
}
if (opeartion.contains("is greater or equals"))
{
if (Double.parseDouble(value) <= ages[i])
{
result=true;
}
else
result=false;
}
if (opeartion.contains("is lower than"))
{
if (Double.parseDouble(value) > ages[i])
{
result=true;
}
else
result=false;
}
if (opeartion.contains("is lower or equals"))
{
if ( ages[i] <= Double.parseDouble(value))
{
result=true;
}
else
result=false;
}
if (opeartion.contains("is not equal to"))
{
if ( ages[i] !=Double.parseDouble(value))
{
result=true;
}
else
result=false;
}
}
}}
Assert.assertTrue(result);
}
public void searchCondition(String searchFeild,String opeartion,String value) {
searchFeild(searchFeild);
searchOpeartion(opeartion);
searchValue(value);
//click the search button
this.clickElementByXpath(locator.getString("xpath.record.search.click"));
this.sleepCertainTime(3000);
}
public void searchFeild(String searchFeild){
//choose the search feild
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.record.search.feild.arrows")), 3000));
this.sleepCertainTime(5000);
this.clickElementByXpath(locator.getString("xpath.record.search.feild.arrows"));
this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.search.feild",searchFeild)), WAIT_TIME_MAX);
this.clickElementByXpath(this.getString(locator, "xpath.record.search.feild",searchFeild));
}
public void searchOpeartion(String opeartion){
//choose the search operator
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.record.search.operator.arrows")), 3000));
this.clickElementByXpath(locator.getString("xpath.record.search.operator.arrows"));
this.isElementPresent(By.xpath(this.getString(locator,"xpath.record.search.operator",opeartion)), WAIT_TIME_MAX);
this.clickElementByXpath(this.getString(locator,"xpath.record.search.operator",opeartion));
}
public void searchValue(String value){
//input the search value
this.modifyText(this.getElementByXpath(locator.getString("xpath.record.search.value")), value);
}
public void chooseContainer(String container) {
this.sleepCertainTime(3000);
this.clickElementByXpath(locator.getString("xpath.record.choose.containe.arrows"));
this.clickElementByXpath(this.getString(locator, "xpath.record.choose.container", container));
}
public void chooseModle(String modle) {
this.sleepCertainTime(3000);
this.clickElementByXpath(locator.getString("xpath.record.choose.modle.arrows"));
this.clickElementByXpath(this.getString(locator, "xpath.record.choose.modle",modle));
}
public void clickSave() {
this.clickElementByXpath(locator.getString("xpath.record.chooseCM.save"));
this.clickElementByXpath(locator.getString("xpath.record.chooseCM.save.ok"));
}
public void chooseEntity(String entity) {
this.sleepCertainTime(3000);
this.clickElementByXpath(locator.getString("xpath.record.click.DataBrowser"));
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.record.choose.entity.arrows")), WAIT_TIME_MIN).isDisplayed());
/* this.seletDropDownList(By.xpath(locator.getString("xpath.record.choose.entity.arrows")), entity);*/
this.clickElementByXpath(locator.getString("xpath.record.choose.entity.arrows"));
this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.entity",entity)), WAIT_TIME_MAX);
//this.sleepCertainTime(10000);
this.clickElementByXpath(this.getString(locator, "xpath.record.choose.entity",entity));
}
public void chooseEntityDirectlyInDataBrowser(String entity) {
this.sleepCertainTime(3000);
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.record.choose.entity.arrows")), WAIT_TIME_MIN).isDisplayed());
/* this.seletDropDownList(By.xpath(locator.getString("xpath.record.choose.entity.arrows")), entity);*/
this.clickElementByXpath(locator.getString("xpath.record.choose.entity.arrows"));
this.isElementPresent(By.xpath(this.getString(locator, "xpath.record.choose.entity",entity)), WAIT_TIME_MAX);
//this.sleepCertainTime(10000);
this.clickElementByXpath(this.getString(locator, "xpath.record.choose.entity",entity));
}
public void clickCreateRecord(){
this.sleepCertainTime(20000);
this.clickElementByXpath(locator.getString("xpath.record.choose.create"));
this.sleepCertainTime(20000);
}
public void closeDatachangesViewer(){
this.clickElementByXpath(locator.getString("xpath.datachangesviewer.tab.close"));
}
public void closeDataBrowser(){
this.clickElementByXpath(locator.getString("xpath.databrowser.tab.close"));
}
public void openDataBrowserFromWelcome(){
this.clickElementByXpath(locator.getString("xpath.welcome.tab"));
this.clickElementByXpath(locator.getString("xpath.ui.window.getstarted.item.link.databrowser"));
}
public void chooseRcord(String entity,String feild1Name, String feild1Value) {
String[] parameters={entity,feild1Name,feild1Value};
this.sleepCertainTime(5000);
this.clickElementByXpath(this.getString(locator, "xpath.record.choose.delete.record",parameters));
this.sleepCertainTime(5000);
}
public void clickRecycle() {
this.clickElementByXpath(locator.getString("xpath.record.recycle.click.brower"));
this.sleepCertainTime(3000);
this.clickElementByXpath(locator.getString("xpath.record.recycle.click.recycle"));
}
public void clickJournal() {
this.sleepCertainTime(3000);
this.clickElementByXpath(locator.getString("xpath.record.choose.journal"));
}
public void openJournalFromDataBrowser(){
this.clickJournal();
// this.clickElementByXpath("//div[contains(@class,'x-small-editor x-toolbar ItemDetailToolBar x-component x-toolbar-layout-ct')]//button[contains(text(),'Journal')]");
}
public void switchtoTabWelcome(){
this.clickElementByXpath(locator.getString("xpath.welcome.tab"));
}
public void switchtoTabDataBrowser(){
this.clickElementByXpath(locator.getString("xpath.datavrowser.tab"));
}
public void checkPropertiesBeforeAfterInDatachangesViewer(String properties,String valueBefore,String valueAfter,boolean compareType){
String before = this.getValue(this.getElementByXpath("//span[text()='Before']//ancestor::div[@id='documentHistoryPanel1']//span[contains(text(),'"+properties+"')]")).trim();
logger.info("in update detail panel,value before is :"+before);
logger.info("parameters for value before is :"+valueBefore);
Assert.assertTrue(before.contains(valueBefore));
String after = this.getValue(this.getElementByXpath("//span[text()='After']//ancestor::div[@id='documentHistoryPanel2']//span[contains(text(),'"+properties+"')]")).trim();
logger.info("in update detail panel,value after is :"+after);
logger.info("parameters for value after is :"+valueAfter);
//true ,means before = after.
if(compareType){
Assert.assertTrue(before.equals(after));
Assert.assertTrue(after.contains(valueAfter));
}
else{
Assert.assertFalse(after.equals(before));
}
}
public void closeJournal(){
this.clickElementByXpath(locator.getString("xpath.journal.tab.close"));
}
public void clickExport() {
this.clickElementByXpath(locator.getString("xpath.record.click.importAndExport"));
this.clickElementByXpath(locator.getString("xpath.record.choose.export"));
}
public void maxARecordPanel(){
Point b = this.findElementDefineDriver(this.driver, By.xpath(locator.getString("xpath.record.databrowser.bigger"))).getLocation();
Point a = this.findElementDefineDriver(this.driver, By.xpath(locator.getString("xpath.record.expend.record.pannel"))).getLocation();
logger.info("maxARecordPanel-" + b.x + " "+b.y);
logger.info("maxARecordPanel-" + a.x + " "+a.y);
logger.info("move to left by:"+(a.x-b.x-50));
Actions builder = new Actions(driver);
builder.clickAndHold(this.findElementDefineDriver(this.driver, By.xpath(locator.getString("xpath.record.expend.record.pannel"))))
.moveToElement(this.findElementDefineDriver(this.driver, By.xpath(locator.getString("xpath.record.choose.create"))), 2, -2).release().build().perform();
// this.dragAndDropBy(this.findElementDefineDriver(this.driver, By.xpath(locator.getString("xpath.record.expend.record.pannel"))), -a.x+b.x+50, 0);
}
public void maxDataBrowserBoard(){
Point b = this.findElementDefineDriver(this.driver, By.xpath(locator.getString("xpath.record.databrowser.bigger"))).getLocation();
logger.info("maxDataBrowserBoard Point " + b.x + "," + b.y);
logger.info("move to left by:"+(b.x-100));
Actions builder = new Actions(driver);
builder.clickAndHold(this.findElementDefineDriver(this.driver, By.xpath(locator.getString("xpath.record.databrowser.bigger"))))
.moveToElement(this.findElementDefineDriver(this.driver, By.xpath(locator.getString("xpath.menuboard.menu"))), 10, 0).release().build().perform();
// this.dragAndDropBy(this.findElementDefineDriver(this.driver, By.xpath(locator.getString("xpath.record.databrowser.bigger"))), -b.x+100, 0);
}
}

View File

@@ -0,0 +1,285 @@
package org.talend.mdm.modules;
import java.util.ArrayList;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.Select;
import org.talend.mdm.Base;
import org.testng.Assert;
public class User extends Base{
public User(WebDriver driver) {
super.setDriver(driver);
this.driver = driver;
// TODO Auto-generated constructor stub
}
/* public User(WebDriver driver) {
super.setDriver(driver);
this.driver = driver;
}*/
public void openMenuAdministrator(){
this.logger.info("open Administration page");
this.waitfor(By.xpath(locator.getString("xpath.Administration.menu")), WAIT_TIME_MAX);
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.Administration.menu")), WAIT_TIME_MAX));
this.clickElementByXpath(locator.getString("xpath.Administration.menu"));
}
public void gotoUserManagePage(){
this.clickElementByXpath(locator.getString("xpath.mangeuser.menu"));
Assert.assertTrue(this.isElementPresent(By.xpath(locator.getString("xpath.user.button.add")), this.WAIT_TIME_MAX));
}
public void selectRoles(String[] roles){
for(String role: roles) {
/*this.clickElementByXpath(locator.getString("xpath.user.add.role.img"));
this.waitfor(By.xpath(this.getString(locator, "xpath.user.add.role.select", role)), 30);
this.clickElementByXpath(this.getString(locator, "xpath.user.add.role.select", role));
*/
Select select = new Select(driver.findElement(By.xpath(locator.getString("xpath.user.roles.select"))));
select.selectByVisibleText(role);
this.clickElementByXpath(locator.getString("xpath.user.add.role.add"));
this.waitforElementDisplayed(By.xpath(this.getString(locator, "xpath.user.add.role.added.listview", roles)),WAIT_TIME_MAX);
}
}
public void selectRoles(String roles){
/*this.logger.info("click to open roles selection drop down list!");
this.clickElementByXpath(locator.getString("xpath.user.add.role.img"));
this.logger.info("roles selection drop down list opened ok!");
this.logger.info("select role to add");
this.waitforElementDisplayed(By.xpath(this.getString(locator, "xpath.user.add.role.select", roles)), WAIT_TIME_MAX);
this.clickElementByXpath(this.getString(locator, "xpath.user.add.role.select", roles));
*/
Select select = new Select(driver.findElement(By.xpath(locator.getString("xpath.user.roles.select"))));
select.selectByVisibleText(roles);
this.clickElementByXpath(locator.getString("xpath.user.add.role.add"));
this.waitforElementDisplayed(By.xpath(this.getString(locator, "xpath.user.add.role.added.listview", roles)),WAIT_TIME_MAX);
this.logger.info("select role to add");
}
public void confBaseUserInfo(String identifier,String firstName,String lastName,String password,String confirmPassword,
String email, String company, String defaultVersion, boolean active){
this.typeTextByName(locator.getString("name.user.add.name"), identifier);
this.typeTextByName(locator.getString("name.user.add.password"), password);
this.typeTextByXpath(locator.getString("xpath.user.add.password.confirm"), confirmPassword);
this.typeTextByName(locator.getString("name.user.add.givenName"), firstName);
this.typeTextByName(locator.getString("name.user.add.familyName"), lastName);
this.typeTextByName(locator.getString("name.user.add.realEmail"), email);
this.typeTextByName(locator.getString("name.user.add.company"), company);
this.typeTextByName(locator.getString("name.user.add.universe"), defaultVersion);
if(active) {
this.getElementByName(locator.getString("name.user.add.enabled")).click();
this.logger.info("click add user active button!");
}
}
public void configureUser(String identifier,String firstName,String lastName,String password,String confirmPassword,
String email, String company, String defaultVersion, boolean active, String[] roles) {
this.confBaseUserInfo(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active);
this.selectRoles(roles);
}
protected void addUser(String identifier,String firstName,String lastName,String password,String confirmPassword,
String email, String company, String defaultVersion, boolean active, String[] roles) {
this.clickAddNewUser();
this.confBaseUserInfo(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active);
this.selectRoles(roles);
this.minUserConfigPanel();
this.clickElementByXpath(locator.getString("xpath.user.add.role.save"));
this.getElementByXpath(locator.getString("xpath.user.add.role.flashcache.ok")).click();
Assert.assertTrue((this.isElementPresent(By.xpath(this.getString(locator, "xpath.user.identifier", identifier)), WAIT_TIME_MAX)));
this.logger.info("user "+identifier+" had been added succussfull!");
// Assert.assertNotNull("Haven't add the user " + identifier + "successfully!", getUserDeleteElement(identifier));
}
protected void addUser(String identifier,String firstName,String lastName,String password,String confirmPassword,
String email, String company, String defaultVersion, boolean active, String roles) {
this.clickAddNewUser();
this.confBaseUserInfo(identifier, firstName, lastName, password, confirmPassword, email, company, defaultVersion, active);
this.selectRoles(roles);
this.minUserConfigPanel();
this.clickElementByXpath(locator.getString("xpath.user.add.role.save"));
this.logger.info("click add user save button!");
this.getElementByXpath(locator.getString("xpath.user.add.role.flashcache.ok")).click();
this.logger.info("click add flush cache ok button!");
Assert.assertTrue((this.isElementPresent(By.xpath(this.getString(locator, "xpath.user.identifier", identifier)), WAIT_TIME_MAX)));
this.logger.info("user "+identifier+" had been added succussfull!");
}
public void deleteUser(String userName) {
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.user.delete", userName)), WAIT_TIME_MAX), "the user to delete not present right now.");
this.sleepCertainTime(1000);
this.selectAUser("administrator");
this.clickElementByXpath(this.getString(locator, "xpath.user.delete", userName));
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.user.delete.yes")),WAIT_TIME_MIN).isDisplayed());
this.sleepCertainTime(2000);
this.clickElementByXpath(locator.getString("xpath.user.delete.yes"));
this.sleepCertainTime(3000);
Assert.assertTrue(this.waitfor(By.xpath(this.getString(locator, "xpath.user.delete", userName)),3)==null);
logger.info("user "+userName +" deleted successful!");
}
protected void deleteAllUsersStartWith(String userExcept){
List a = this.getElementsByXpath(locator.getString("xpath.user.listdisplay.identiferlist"));
List b = new ArrayList<String>();
for(int i=0;i<a.size();i++){
String userName = this.getValue((WebElement)a.get(i));
logger.info(userName);
/* if(userName.equals(userExcept)){
continue;
}
else{
b.add(this.getValue((WebElement)a.get(i)));
logger.info("b+++++++++++++++++++++++++++++++++++++++++++++++++++++"+userName);
}*/
if(userName.startsWith(userExcept)){
b.add(this.getValue((WebElement)a.get(i)));
}
// System.err.println("total user number is :"+this.getElementsByXpath(locator.getString("xpath.user.listdisplay.identiferlist")).size());
}
for(int j=0;j <b.size();j++){
String userName = b.get(j).toString();
logger.info("The "+j+" time to delete user name is :"+userName);
this.deleteUser(userName);
}
this.sleepCertainTime(3000);
System.err.println("after delete,total user number is :"+this.getElementsByXpath(locator.getString("xpath.user.listdisplay.identiferlist")).size());
Assert.assertTrue(this.getElementsByXpath(locator.getString("xpath.user.listdisplay.identiferlist")).size()==4);
}
public void searchUser(String userName) {
this.modifyTextByXpath(locator.getString("xpath.user.search.input"), userName);
this.clickElementByXpath(locator.getString("xpath.user.search"));
}
public void clickAddNewUser(){
this.maxUserConfigPanel();
this.clickElementByXpath(locator.getString("xpath.user.button.add"));
}
public void maxUserConfigPanel(){
Actions builder = new Actions(driver);
builder.clickAndHold(this.findElementDefineDriver(this.driver, By.xpath(locator.getString("xpath.user.max.configure.panel.line"))))
.moveToElement(this.findElementDefineDriver(this.driver, By.xpath(this.getString(locator, "xpath.user.identifier", "administrator"))), 2, -2).release().build().perform();
}
public void minUserConfigPanel(){
Actions builder = new Actions(driver);
builder.clickAndHold(this.findElementDefineDriver(this.driver, By.xpath(locator.getString("xpath.user.max.configure.panel.line"))))
.moveToElement(this.findElementDefineDriver(this.driver, By.xpath(locator.getString("xpath.user.add.role.save"))), 0, -10).release().build().perform();
}
public WebElement getUserDeleteElement(String userName) {
return this.getElementByXpath(this.getString(locator, "xpath.user.delete", userName));
}
public void typeUserName(String userName) {
this.typeTextByName(locator.getString("name.user.add.name"), userName);
}
public void typePassword(String password) {
this.typeTextByName(locator.getString("name.user.add.password"), password);
}
public void typeConfirmPassword(String password) {
this.typeTextByXpath(locator.getString("xpath.user.add.password.confirm"), password);
}
public void typeFirstName(String firstName) {
this.typeTextByName(locator.getString("name.user.add.givenName"), firstName);
}
public void typeLastName(String lastName) {
this.typeTextByName(locator.getString("name.user.add.familyName"), lastName);
}
public void typeEmail(String email) {
this.typeTextByName(locator.getString("name.user.add.realEmail"), email);
}
public void typeCompany(String company) {
this.typeTextByName(locator.getString("name.user.add.company"), company);
}
public void typeUniVerse(String universe) {
this.typeTextByName(locator.getString("name.user.add.universe"), universe);
}
public void clickActive() {
this.getElementByName(locator.getString("name.user.add.enabled")).click();
}
public void clickFlushCacheButton(){
this.clickElementByXpath(locator.getString("xpath.user.add.role.flashcache.button"));
}
public void clickFlushCacheOK(){
this.clickElementByXpath(locator.getString("xpath.user.add.role.flashcache.ok"));
}
public boolean isActive(){
return this.getElementByXpath(locator.getString("xpath.user.add.enabled.true")) != null;
}
public void addRoles(String[] roles) {
for(String role: roles) {
this.clickElementByXpath(locator.getString("xpath.user.add.role.img"));
this.clickElementByXpath(this.getString(locator, "xpath.user.add.role.select", role));
this.clickElementByXpath(locator.getString("xpath.user.add.role.add"));
}
}
public void deleteRoles(String[] roles) {
for(String role: roles) {
this.clickElementByXpath(this.getString(locator, "xpath.user.delete.role.select", role));
this.clickElementByXpath(locator.getString("xpath.user.delete.role.delete"));
}
}
// unfinished
public List<String> getRoles(){
List<String> roles = new ArrayList<String>();
List<WebElement> elements = this.getElementsByXpath(locator.getString("xpath.user.added.roles"));
for(WebElement element : elements) {
roles.add(element.getText());
}
return roles;
}
public void clickSave(){
this.clickElementByXpath(locator.getString("xpath.user.add.role.save"));
}
public void clickSaveAndCheckExpectedTrue(String userName){
this.clickElementByXpath(locator.getString("xpath.user.add.role.save"));
this.clickElementByXpath(locator.getString("xpath.user.add.role.flashcache.ok"));
Assert.assertTrue(this.isElementPresent(By.xpath(this.getString(locator, "xpath.user.identifier", userName)), WAIT_TIME_MID), "user"+userName+"added failed!");
}
public void selectAUser(String userName) {
this.clickElementByXpath(this.getString(locator, "xpath.user.select", userName));
}
public boolean isUserSheetExist(){
return this.getElementsByXpath(locator.getString("xpath.user.sheet")) != null;
}
}

View File

@@ -0,0 +1,96 @@
package org.talend.mdm.modules;
import org.openqa.selenium.By;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import org.talend.mdm.Base;
import org.testng.Assert;
public class Welcome extends Base{
public Welcome(WebDriver driver) {
super.setDriver(driver);
this.driver = driver;
}
public void checkGetStartedWindow(){
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.ui.window.getstarted")), WAIT_TIME_MIN)!=null, "element getstarted window is not displayed right now");
logger.info("check welcome page UI getting started window ok");
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.ui.window.getstarted.item.labeltext")), WAIT_TIME_MIN)!=null, "element getstarted window is not displayed right now");
logger.info("check welcome page UI getting started window.label ok.");
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.ui.window.getstarted.item.link.databrowser")), WAIT_TIME_MIN)!=null, "element getstarted window is not displayed right now");
logger.info("check welcome page UI getting started window.item.databrowser ok.");
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.ui.window.getstarted.item.link.journal")), WAIT_TIME_MIN)!=null, "element getstarted window is not displayed right now");
logger.info("check welcome page UI getting started window.item.journal ok.");
}
public void checkProcessWindow(){
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.ui.window.processes")), WAIT_TIME_MIN)!=null, "element processess window is not displayed right now");
logger.info("check welcome page UI processes window ok");
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.ui.window.processes.title")), WAIT_TIME_MIN)!=null, "element processess window.title is not displayed right now");
logger.info("check welcome page UI processes window.title ok.");
}
public void checkAlertsWindow(){
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.ui.window.alerts")), WAIT_TIME_MIN)!=null, "element alerts window is not displayed right now");
logger.info("check welcome page UI processes window ok");
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.ui.window.alerts.title")), WAIT_TIME_MIN)!=null, "element alerts window.title is not displayed right now");
logger.info("check welcome page UI alerts window.title ok.");
}
public void checkTasksWindow(){
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.ui.window.tasks")), WAIT_TIME_MIN)!=null, "element tasks window is not displayed right now");
logger.info("check welcome page UI processes window ok");
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.ui.window.tasks.title")), WAIT_TIME_MIN)!=null, "element tasks window.title is not displayed right now");
logger.info("check welcome page UI tasks window.title ok.");
}
public void openTasks(){
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.ui.window.tasks.workflow.entry")), WAIT_TIME_MIN).isDisplayed());
this.clickElementByXpath(locator.getString("xpath.ui.window.tasks.workflow.entry"));
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.workflowtaskspage.search.button")),WAIT_TIME_MIN).isDisplayed());
}
public void checkSearchWindow(){
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.ui.window.search")), WAIT_TIME_MIN)!=null, "element search window is not displayed right now");
logger.info("check welcome page UI processes window ok");
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.ui.window.search.title")), WAIT_TIME_MIN)!=null, "element search window.title is not displayed right now");
logger.info("check welcome page UI search window.title ok.");
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.ui.window.search.item.search.input")), WAIT_TIME_MIN)!=null, "element search window.item.search.input is not displayed right now");
logger.info("check welcome page UI processes window ok");
Assert.assertTrue(this.waitfor(By.xpath(locator.getString("xpath.ui.window.search.item.search.button")), WAIT_TIME_MIN)!=null, "element search window.item.search.button is not displayed right now");
logger.info("check welcome page UI search window.item.search.button ok.");
}
public Point getWindowPosition(WebElement ele){
return ele.getLocation();
}
public void reSortWindowLayout(String srcXpathLocatorKey, String destXpathLocatorKey, int xP,int yP){
WebElement srcElementOld = (this.getElementByXpath(locator.getString(srcXpathLocatorKey)));
Point pointOld = this.getWindowPosition(srcElementOld);
Actions builder = new Actions(driver);
builder.clickAndHold(this.getElementByXpath(locator.getString(srcXpathLocatorKey)))
.moveToElement(this.getElementByXpath(locator.getString(destXpathLocatorKey)), xP, yP).release().build().perform();
this.sleepCertainTime(5000);
WebElement srcElementNew = (this.getElementByXpath(locator.getString(srcXpathLocatorKey)));
Point pointNew = this.getWindowPosition(srcElementNew);
Assert.assertFalse(pointNew.equals(pointOld), "lay out resort failed");
}
}

Some files were not shown because too many files have changed in this diff Show More