Ejemplo n.º 1
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_22'

    if window('Record Editor'):
        select_menu('Utilities>>Cobol Copybook Analysis')
        select('Copybook_Txt',
               commonBits.CobolCopybookDir() + 'Master_Record.cbl')
        select('Cobol Dialect_Txt', 'Open Cobol Little Endian (Intel)')
        click('Display')
        assert_p(
            'LineTree.FileDisplay_JTbl', 'Content',
            '[[, , , , Master_Record.cbl, , , , ], [, , 01, MAST-RECORD, 1, 39, 39, , ], [, , 05, M-SOC-SEC-NUMBER, 1, 9, 9, X(9), ], [, , 05, M-NAME, 10, 17, 17, , ], [, , 10, M-LAST-NAME, 10, 15, 15, X(15), ], [, , 10, M-INITIALS, 25, 2, 2, XX, ], [, , 05, M-LOCATION-CODE, 27, 3, 3, X(3), ], [, , 05, M-COMMISSION-RATE, 30, 2, 2, 99, ], [, , 05, M-YEAR-TO-DATE-SALES, 32, 8, 8, 9(8), ]]'
        )
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        select('Copybook_Txt',
               commonBits.CobolCopybookDir() + 'Rental_Record.cbl')
        click('Display')
        assert_p(
            'LineTree.FileDisplay_JTbl', 'Content',
            '[[, , , , Rental_Record.cbl, , , , ], [, , 01, RENTAL-RECORD, 1, 56, 56, , ], [, , 05, REN-CONTRACT-NO, 1, 6, 6, 9(6), ], [, , 05, REN-NAME, 7, 26, 26, , ], [, , 10, REN-LAST-NAME, 7, 15, 15, X(15), ], [, , 10, REN-FIRST-NAME, 22, 10, 10, X(10), ], [, , 10, REN-INITIAL, 32, 1, 1, X, ], [, , 05, REN-RETURNED-DATE, 33, 6, 6, , ], [, , 10, REN-RETURNED-YEAR, 33, 2, 2, 9(2), ], [, , 10, REN-RETURNED-MONTH, 35, 2, 2, 9(2), ], [, , , , VALID-MONTHS, , , , ], [, , , , , 12, 1, , ], [, , , , FEBRUARY, , , , ], [, , , , , , 2, , ], [, , , , D30-DAY-MONTH, , , , ], [, , , , , , 4, , ], [, , , , , , 6, , ], [, , , , , , 9, , ], [, , , , , , 11, , ], [, , , , D31-DAY-MONTH, , , , ], [, , , , , , 1, , ], [, , , , , , 3, , ], [, , , , , , 5, , ], [, , , , , , 7, , ], [, , , , , , 8, , ], [, , , , , , 10, , ], [, , , , , , 12, , ], [, , 10, REN-RETURNED-DAY, 37, 2, 2, 9(2), ], [, , 05, REN-CAR-TYPE, 39, 1, 1, X, ], [, , , , VALID-CAR-TYPES, , , , ], [, , , , , , E, , ], [, , , , , , C, , ], [, , , , , , M, , ], [, , , , , , F, , ], [, , , , , , L, , ], [, , 05, REN-DAYS-RENTED, 40, 2, 2, 99, ], [, , , , ZERO-DAYS-RENTED, , , , ], [, , , , , , 0, , ], [, , , , VALID-DAYS-RENTED, , , , ], [, , , , , 35, 1, , ], [, , 05, REN-MILEAGE, 42, 14, 14, , ], [, , 10, REN-MILES-IN, 42, 6, 6, 9(6), ], [, , 10, REN-MILES-OUT, 48, 6, 6, 9(6), ], [, , 10, REN-MILEAGE-RATE, 54, 2, 2, 99, ], [, , , , VALID-MILEAGE-RATES, , , , ], [, , , , , 50, 00, , ], [, , 05, REN-INSURANCE, 56, 1, 1, X, ], [, , , , VALID-INSURANCE, , , , ], [, , , , , , Y, , ], [, , , , , , N, , ]]'
        )
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        select('Copybook_Txt',
               commonBits.CobolCopybookDir() + 'Transaction_Record.cbl')
        click('Display')
        assert_p(
            'LineTree.FileDisplay_JTbl', 'Content',
            '[[, , , , Transaction_Record.cbl, , , , ], [, , 01, WS-TRANSACTION-RECORD, 1, 37, 37, , ], [, , 05, TR-SOC-SEC-NUMBER, 1, 9, 9, X(9), ], [, , 05, TR-NAME, 10, 17, 17, , ], [, , 10, TR-LAST-NAME, 10, 15, 15, X(15), ], [, , 10, TR-INITIALS, 25, 2, 2, XX, ], [, , 05, TR-LOCATION-CODE, 27, 3, 3, X(3), ], [, , 05, TR-COMMISSION-RATE, 30, 2, 2, 99, ], [, , 05, TR-SALES-AMOUNT, 32, 5, 5, 9(5), ], [, , 05, TR-TRANSACTION-CODE, 37, 1, 1, X, ], [, , , , ADDITION, , , , ], [, , , , , A, , , ], [, , , , CORRECTION, , , , ], [, , , , , C, , , ], [, , , , DELETION, , , , ], [, , , , , D, , , ], [, , , , VALID-CODES, , , , ], [, , , , , A, , , ], [, , , , , C, , , ], [, , , , , D, , , ]]'
        )
        click('BasicInternalFrameTitlePane$NoFocusButton2')
    close()
Ejemplo n.º 2
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_22'

    if window('Record Editor'):
        select_menu('Record Layouts>>Load Cobol Copybook')
        select('Cobol Copybook_Txt',
               commonBits.CobolCopybookDir() + 'ZZ_Tst1.cbl')
        select('System_Txt', 'Other')
        select('Binary Format_Txt', 'Open Cobol Little Endian (Intel)')
        click('Go')
        assert_p(
            'TextArea', 'Text', r'''

-->> ''' + commonBits.CobolCopybookDir() + r'''ZZ_Tst1.cbl processed

      Copybook: ZZ_Tst1''')
        select_menu('Record Layouts>>Edit Layout')
        select('RecordList.Record Name_Txt', 'ZZ_Tst1')
        ##		select('TabbedPane', 'Extras')
        ##		select('TabbedPane', 'Extras')
        ##		select('TabbedPane', 'Fields')
        select('RecordList.Description_Txt', '%%')
        ##		select('TabbedPane', 'Extras')
        ##		select('TabbedPane', 'Extras')
        ##		select('TabbedPane', 'Fields')
        assert_p('RecordFieldsJTbl', 'Text', '', 'Description,6')
        assert_p(
            'RecordFieldsJTbl', 'Content',
            '[[1, 7, f01, , 7, 2, 0, , , f01], [8, 7, f02, , 25, 2, 0, , , f02], [15, 7, f03, , 24, 2, 0, , , f03], [22, 6, f05, , 7, 2, 0, , , f05], [28, 6, f06, , 25, 2, 0, , , f06], [34, 6, f07, , 24, 2, 0, , , f07], [40, 6, f08, , 25, 2, 0, , , f08], [46, 6, f21, , 6, 2, 0, , , f21], [52, 7, f23, , 29, 2, 0, , , f23], [59, 6, f25, , 6, 2, 0, , , f25], [65, 6, f26, , 29, 2, 0, , , f26], [71, 8, f31, , 6, 2, 0, , , f31], [79, 8, f31, , 6, 2, 0, , , f31], [87, 8, f33, , 6, 2, 0, , , f33], [95, 9, f34, , 6, 2, 0, , , f34], [104, 9, f35, , 6, 2, 0, , , f35], [113, 9, f36, , 6, 2, 0, , , f36], [122, 6, f37, , 41, 2, 0, , , f37], [128, 6, f38, , 22, 2, 0, , , f38], [134, 8, f41, , 0, 0, 0, , , f41], [142, 8, f42, , 0, 0, 0, , , f42], [150, 8, f43, , 0, 0, 0, , , f43], [158, 8, f44, , 0, 0, 0, , , f44]]'
        )
    close()
Ejemplo n.º 3
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_22'

    if window('Record Editor'):
        select_menu('Utilities>>Cobol Copybook Analysis')
        select('Copybook_Txt', commonBits.CobolCopybookDir() + 'DTAR020.cbl')
        select('Cobol Dialect_Txt', 'Open Cobol Little Endian (Intel)')
        click('Display')
        assert_p(
            'LineTree.FileDisplay_JTbl', 'Content',
            '[[, , , , DTAR020.cbl, , , , , , ], [, , 03, DTAR020-KCODE-STORE-KEY, 1, 10, 10, , , , ], [, , 05, DTAR020-KEYCODE-NO, 1, 8, 8, X(08), , , ], [, , 05, DTAR020-STORE-NO, 9, 2, 3, S9(03), computational-3, true, ], [, , 03, DTAR020-DATE, 11, 4, 7, S9(07), computational-3, true, ], [, , 03, DTAR020-DEPT-NO, 15, 2, 3, S9(03), computational-3, true, ], [, , 03, DTAR020-QTY-SOLD, 17, 5, 9, S9(9), computational-3, true, ], [, , 03, DTAR020-SALE-PRICE, 22, 6, 11, S9(9)V99, computational-3, true, 2]]'
        )
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        select('Cobol Dialect_Txt', 'Mainframe')
        click('Display')
        assert_p(
            'LineTree.FileDisplay_JTbl', 'Content',
            '[[, , , , DTAR020.cbl, , , , , , ], [, , 03, DTAR020-KCODE-STORE-KEY, 1, 10, 10, , , , ], [, , 05, DTAR020-KEYCODE-NO, 1, 8, 8, X(08), , , ], [, , 05, DTAR020-STORE-NO, 9, 2, 3, S9(03), computational-3, true, ], [, , 03, DTAR020-DATE, 11, 4, 7, S9(07), computational-3, true, ], [, , 03, DTAR020-DEPT-NO, 15, 2, 3, S9(03), computational-3, true, ], [, , 03, DTAR020-QTY-SOLD, 17, 5, 9, S9(9), computational-3, true, ], [, , 03, DTAR020-SALE-PRICE, 22, 6, 11, S9(9)V99, computational-3, true, 2]]'
        )
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        select('Cobol Dialect_Txt', 'Open Cobol bs2000 Little Endian (Intel)')
        click('Display')
        assert_p(
            'LineTree.FileDisplay_JTbl', 'Content',
            '[[, , , , DTAR020.cbl, , , , , , ], [, , 03, DTAR020-KCODE-STORE-KEY, 1, 10, 10, , , , ], [, , 05, DTAR020-KEYCODE-NO, 1, 8, 8, X(08), , , ], [, , 05, DTAR020-STORE-NO, 9, 2, 3, S9(03), computational-3, true, ], [, , 03, DTAR020-DATE, 11, 4, 7, S9(07), computational-3, true, ], [, , 03, DTAR020-DEPT-NO, 15, 2, 3, S9(03), computational-3, true, ], [, , 03, DTAR020-QTY-SOLD, 17, 5, 9, S9(9), computational-3, true, ], [, , 03, DTAR020-SALE-PRICE, 22, 6, 11, S9(9)V99, computational-3, true, 2]]'
        )
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        select('Copybook_Txt', commonBits.CobolCopybookDir() + 'DTAR1000.cbl')
        click('Display')
        assert_p(
            'LineTree.FileDisplay_JTbl', 'Content',
            '[[, , , , DTAR1000.cbl, , , , , ], [, , 03, DTAR1000-REC, 1, 60, 60, , , ], [, , 10, DTAR1000-STORE-NO, 1, 2, 4, S9(4), computational, true], [, , 10, DTAR1000-REGION-NO, 3, 2, 4, S9(4), computational, true], [, , 10, DTAR1000-STORE-NAME, 5, 50, 50, X(50), , ], [, , 10, DTAR1000-NEW-STORE, 55, 1, 1, X(1), , ], [, , 10, DTAR1000-ACTIVE-STORE, 56, 1, 1, X(1), , ], [, , 10, DTAR1000-CLOSED-STORE, 57, 1, 1, X(1), , ], [, , 10, DTAR1000-DC-TYPE, 58, 1, 1, X(1), , ], [, , 10, DTAR1000-SRC-TYPE, 59, 1, 1, X(1), , ], [, , 10, DTAR1000-HO-TYPE, 60, 1, 1, X(1), , ]]'
        )
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        select('Cobol Dialect_Txt', 'Open Cobol Micro Focus (Intel)')
        click('Display')
        assert_p(
            'LineTree.FileDisplay_JTbl', 'Content',
            '[[, , , , DTAR1000.cbl, , , , , ], [, , 03, DTAR1000-REC, 1, 60, 60, , , ], [, , 10, DTAR1000-STORE-NO, 1, 2, 4, S9(4), computational, true], [, , 10, DTAR1000-REGION-NO, 3, 2, 4, S9(4), computational, true], [, , 10, DTAR1000-STORE-NAME, 5, 50, 50, X(50), , ], [, , 10, DTAR1000-NEW-STORE, 55, 1, 1, X(1), , ], [, , 10, DTAR1000-ACTIVE-STORE, 56, 1, 1, X(1), , ], [, , 10, DTAR1000-CLOSED-STORE, 57, 1, 1, X(1), , ], [, , 10, DTAR1000-DC-TYPE, 58, 1, 1, X(1), , ], [, , 10, DTAR1000-SRC-TYPE, 59, 1, 1, X(1), , ], [, , 10, DTAR1000-HO-TYPE, 60, 1, 1, X(1), , ]]'
        )
        click('BasicInternalFrameTitlePane$NoFocusButton2')
    close()
Ejemplo n.º 4
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_22'

    if window('Record Editor'):
        select_menu('Utilities>>Cobol Copybook Analysis')
        select('Copybook_Txt',
               commonBits.CobolCopybookDir() + 'AmsLocation.cbl')
        select('Cobol Dialect_Txt', 'Open Cobol Little Endian (Intel)')
        click('Display')
        assert_p(
            'LineTree.FileDisplay_JTbl', 'Content',
            '[[, , , , AmsLocation.cbl, , , , ], [, , 01, Ams-Vendor, 1, 173, 173, , ], [, , 03, Brand, 1, 3, 3, x(3), ], [, , 03, Location-Number, 4, 4, 4, 9(4), ], [, , 03, Location-Type, 8, 2, 2, XX, ], [, , 03, Location-Name, 10, 35, 35, X(35), ], [, , 03, Address-1, 45, 40, 40, X(40), ], [, , 03, Address-2, 85, 40, 40, X(40), ], [, , 03, Address-3, 125, 35, 35, X(35), ], [, , 03, Postcode, 160, 10, 10, 9(10), ], [, , 03, State, 170, 3, 3, XXX, ], [, , 03, Location-Active, 173, 1, 1, X, ]]'
        )
        click('BasicInternalFrameTitlePane$NoFocusButton2')
        select('Copybook_Txt', commonBits.CobolCopybookDir() + 'AmsVendor.cbl')
        click('Display')
        assert_p(
            'LineTree.FileDisplay_JTbl', 'Content',
            '[[, , , , AmsVendor.cbl, , , , ], [, , 01, Ams-Vendor, 1, 76, 76, , ], [, , 03, Brand, 1, 3, 3, x(3), ], [, , 03, Vendor-Number, 4, 8, 8, 9(8), ], [, , 03, Vendor-Name, 12, 40, 40, X(40), ], [, , 03, Filler-1, 52, 15, 15, X(15), ], [, , 03, Code-850, 67, 3, 3, 999, ], [, , 03, Value-P, 70, 1, 1, X, ], [, , 03, Filler, 71, 3, 3, X(3), ], [, , 03, Zero-Value, 74, 3, 3, 999, ]]'
        )
        click('BasicInternalFrameTitlePane$NoFocusButton2')
    close()
Ejemplo n.º 5
0
def test():
    from Modules import commonBits
    java_recorded_version = '1.6.0_17'

    if window('Record Editor'):
        select('FileChooser',
               commonBits.sampleDir() + 'Ams_PODownload_20041231.txt')
        commonBits.doEdit(click)
        select_menu(
            commonBits.fl('Edit') + '>>' + commonBits.fl('Show / Hide Fields'))
        select('Table', 'cell:' + commonBits.fl('Show') + ',3(true)')
        select('Table', 'cell:' + commonBits.fl('Show') + ',4(true)')
        select('Table', 'cell:' + commonBits.fl('Show') + ',7(true)')
        select('Table', 'cell:' + commonBits.fl('Show') + ',8(true)')
        click(commonBits.fl('Go'))
        select('LayoutCombo', 'ams PO Download: Detail')
        ##		select('Table', '')
        rightclick('Table', '38 - 1|Filler,2')
        select_menu(commonBits.fl('Hide Column'))
        ##		select('Table', '')
        rightclick('Table', '72 - 15|pmg dtl tech key,2')
        select_menu(commonBits.fl('Hide Column'))
        ##		select('Table', '')
        rightclick('Table', '3 - 9|Pack Qty,0')
        select_menu(commonBits.fl('Edit Record'))
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        select_menu(
            commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' +
            commonBits.fl('Table:'))
        select_menu(
            commonBits.fl('Edit') + '>>' + commonBits.fl('Show / Hide Fields'))
        commonBits.save(click)
        ##select('FileChooser', commonBits.CobolCopybookDir() + 't1Hide.xml')
        commonBits.selectFileName(select, keystroke,
                                  commonBits.CobolCopybookDir() + 't1Hide.xml')
        commonBits.save1(click)
        ##		select_menu(commonBits.fl('Window') + '>>Menu')
        ##		click('MetalInternalFrameTitlePane', 215, 10)
        ##commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
        ##		click('MetalInternalFrameTitlePane', 458, 5)
        select_menu(
            commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' +
            commonBits.fl('Table:'))
        ##		select('Table', '')
        rightclick('Table', '1 - 2|Record Type,0')
        select_menu(commonBits.fl('Edit Record'))
        assert_p(
            'Table', 'Content',
            '[[Record Type, 1, 2, H1, H1], [Sequence Number, 3, 5, 45.349, 45349], [Vendor, 8, 10, 6060, 0000006060], [PO, 18, 12, 286225, 286225], [Entry Date, 30, 6, 040909, 040909], [Filler, 36, 8, , ], [beg01 code, 44, 2, 00, 00], [beg02 code, 46, 2, , ], [Department, 48, 4, 200, 200], [Expected Reciept Date, 52, 6, 050102, 050102], [Cancel by date, 58, 6, 050107, 050107], [EDI Type, 68, 1, , ], [Add Date, 69, 6, , ], [Filler, 75, 1, , ], [Department Name, 76, 10, LADIES KNI, LADIES KNI], [Prcoess Type, 86, 1, C, C], [Order Type, 87, 2, FT, FT]]'
        )
        select_menu(
            commonBits.fl('View') + '>>' +
            commonBits.fl('Load Saved Hidden Fields'))
        ##select('FileChooser', commonBits.CobolCopybookDir() + 't1Hide.xml')

        commonBits.selectFileName(select, keystroke,
                                  commonBits.CobolCopybookDir() + 't1Hide.xml')
        click(commonBits.fl('Run'))
        select('Table', 'cell:' + commonBits.fl('Data') + ',3(286225)')
        select_menu(
            commonBits.fl('Window') + '>>Ams_PODownload_20041231.txt>>' +
            commonBits.fl('Record:'))
        select('Table', 'cell:' + commonBits.fl('Data') + ',2(6060)')
        assert_p(
            'Table', 'Content',
            '[[Record Type, 1, 2, H1, H1], [Sequence Number, 3, 5, 45.349, 45349], [Vendor, 8, 10, 6060, 0000006060], [PO, 18, 12, 286225, 286225], [Entry Date, 30, 6, 040909, 040909], [Filler, 36, 8, , ], [beg01 code, 44, 2, 00, 00], [beg02 code, 46, 2, , ], [Department, 48, 4, 200, 200], [Expected Reciept Date, 52, 6, 050102, 050102], [Cancel by date, 58, 6, 050107, 050107], [EDI Type, 68, 1, , ], [Add Date, 69, 6, , ], [Filler, 75, 1, , ], [Department Name, 76, 10, LADIES KNI, LADIES KNI], [Prcoess Type, 86, 1, C, C], [Order Type, 87, 2, FT, FT]]'
        )
        select('Table', 'cell:' + commonBits.fl('Data') + ',2(6060)')
        click('Right')
        assert_p(
            'Table', 'Content',
            '[[Record Type, 1, 2, D1, D1], [Pack Qty, 3, 9, 7.0000, 000070000], [Pack Cost, 12, 13, 0.0002, 0000000000002], [APN, 25, 13, 2222500000000, 2222500000000], [Product, 39, 8, 43314531, 43314531], [Case Pack id, 87, 15, 45614531, 45614531], [Product Name, 101, 50,  DONKEY 24-006607 SHWL WRAP CARD,  DONKEY 24-006607 SHWL WRAP CARD]]'
        )
        click('Right')
        assert_p(
            'Table', 'Content',
            '[[Record Type, 1, 2, S1, S1], [DC Number 1, 3, 4, 5043, 5043], [Pack Quantity 1, 7, 8, 1, 00000001], [DC Number 4, 39, 4, 5076, 5076], [Pack Quantity 4, 43, 8, 1, 00000001], [DC Number 6, 63, 4, 5151, 5151], [Pack Quantity 6, 67, 8, 1, 00000001], [DC Number 7, 75, 4, 5072, 5072], [Pack Quantity 7, 79, 8, 1, 00000001], [DC Number 8, 87, 4, , ], [Pack Quantity 8, 91, 8, 0, 00000000], [DC Number 9, 99, 4, , ], [Pack Quantity 9, 103, 8, 0, 00000000], [DC Number 10, 111, 4, , ], [Pack Quantity 10, 115, 8, 0, 00000000]]'
        )
        commonBits.closeWindow(click)
        ##click('BasicInternalFrameTitlePane$NoFocusButton2')
    close()