Skip to content

Input Page

TestInputPage

Bases: UccTester

Source code in tests/ui/test_input_page.py
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
class TestInputPage(UccTester):
    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_displayed_columns(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies headers of input table"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        header_list = ["Name", "Account", "Interval", "Index", "Status", "Actions"]
        self.assert_util(input_page.table.get_headers, header_list)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_pagination_list(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies pagination list"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        self.assert_util(
            input_page.pagination.get_pagination_list,
            ["10 Per Page", "25 Per Page", "50 Per Page"],
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_pagination(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_multiple_inputs
    ):
        """Verifies pagination functionality by creating 100 accounts"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.open()
        self.assert_util(
            input_page.pagination.select_page_option,
            True,
            left_args={"value": "50 Per Page"},
        )
        self.assert_util(input_page.table.switch_to_page, True, left_args={"value": 2})
        self.assert_util(input_page.table.switch_to_prev, True)
        self.assert_util(input_page.table.switch_to_next, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_sort_functionality(
        self,
        ucc_smartx_selenium_helper,
        ucc_smartx_rest_helper,
        _add_input_one,
        _add_input_two,
    ):
        """Verifies sorting functionality for name column"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.pagination.select_page_option("50 Per Page")
        input_page.table.sort_column("Name")
        sort_order = input_page.table.get_sort_order()
        column_values = list(input_page.table.get_column_values("Name"))
        column_values = list(str(item) for item in column_values)
        sorted_values = sorted(column_values, key=str.lower)
        self.assert_util(sort_order["header"].lower(), "name")
        self.assert_util(column_values, sorted_values)
        self.assert_util(sort_order["ascending"], True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_filter_functionality_negative(
        self,
        ucc_smartx_selenium_helper,
        ucc_smartx_rest_helper,
        _add_input_one,
        _add_input_two,
    ):
        """Verifies the filter functionality (Negative)"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.set_filter("hello")
        self.assert_util(input_page.table.get_row_count, 0)
        self.assert_util(
            input_page.table.get_count_title,
            f"{input_page.table.get_row_count()} Input",
        )
        input_page.table.clean_filter()

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_filter_functionality_positive(
        self,
        ucc_smartx_selenium_helper,
        ucc_smartx_rest_helper,
        _add_input_one,
        _add_input_two,
    ):
        """Verifies the filter functionality (Positive)"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.set_filter("dummy")
        self.assert_util(input_page.table.get_row_count, 2)
        self.assert_util(
            input_page.table.get_count_title,
            f"{input_page.table.get_row_count()} Inputs",
        )
        input_page.table.clean_filter()

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_default_rows_in_table(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies the default number of rows in the table"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        self.assert_util(input_page.table.get_row_count, 0)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_create_new_input_list_values(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies input list dropdown"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        create_new_input_list = [
            "Example Input One",
            "Example Input Two",
            "Example Input Three",
            "Example Input Four",
            "Service hidden for cloud",
        ]
        self.assert_util(
            input_page.create_new_input.get_inputs_list, create_new_input_list
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_input_type_list_values(
        self,
        ucc_smartx_selenium_helper,
        ucc_smartx_rest_helper,
        _add_input_one,
        _add_input_two,
    ):
        """Verifies input type filter list"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        type_filter_list = [
            "All",
            "Example Input One",
            "Example Input Two",
            "Example Input Three",
            "Example Input Four",
            "Service hidden for cloud",
            "Service hidden for enterprise",
        ]
        self.assert_util(input_page.type_filter.get_input_type_list, type_filter_list)
        input_page.type_filter.select_input_type(
            "Example Input One", open_dropdown=False
        )
        self.assert_util(input_page.table.get_row_count, 1)
        input_page.type_filter.select_input_type("Example Input Two")
        self.assert_util(input_page.table.get_row_count, 1)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_more_info(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies the expand functionality of the inputs table"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        interval = "90"
        self.assert_util(
            input_page.table.get_more_info,
            {
                "Name": "dummy_input_one",
                "Interval": f"{interval} sec",
                "Index": "default",
                "Status": "Active",
                "Example Account": "test_input",
                "Object": "test_object",
                "Object Fields": "test_field",
                "Order By": "LastModifiedDate",
                "Query Start Date": "2020-12-11T20:00:32.000z",
                "Limit": "1000",
            },
            left_args={"name": "dummy_input_one"},
        )
        backend_stanza = input_page.backend_conf.get_stanza(
            "example_input_one://dummy_input_one"
        )
        # we verify that the conf value is `interval` and only the UI has changed
        assert backend_stanza.get("interval") == interval

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_enable_disable(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies enable and disable functionality of the input"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        self.assert_util(
            input_page.table.input_status_toggle,
            True,
            left_args={"name": "dummy_input_one", "enable": False},
        )
        self.assert_util(
            input_page.table.get_cell_value,
            "Inactive",
            left_args={"name": "dummy_input_one", "column": "Status"},
        )
        self.assert_util(
            input_page.table.input_status_toggle,
            True,
            left_args={"name": "dummy_input_one", "enable": True},
        )
        self.assert_util(
            input_page.table.get_cell_value,
            "Active",
            left_args={"name": "dummy_input_one", "column": "Status"},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_count(
        self,
        ucc_smartx_selenium_helper,
        ucc_smartx_rest_helper,
        _add_input_one,
        _add_input_two,
    ):
        """Verifies count on table"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        self.assert_util(
            input_page.table.get_count_title,
            f"{input_page.table.get_row_count()} Inputs",
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_title_and_description(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies the title and description of the page"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        self.assert_util(input_page.title.wait_to_display, "Inputs")
        self.assert_util(
            input_page.description.wait_to_display, "Manage your data inputs"
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_required_field_name(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies required field name in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.example_radio.select("Yes")
        input_page.entity1.single_select_group_test.select("two")
        input_page.entity1.interval.set_value("90")
        input_page.entity1.example_account.select("test_input")
        input_page.entity1.object.set_value("test_object")
        input_page.entity1.object_fields.set_value("test_field")
        input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
        input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
        self.assert_util(
            input_page.entity1.save,
            r"Field Name is required",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_valid_length_name(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies the name field should not be more than 100 characters"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        name_value = "a" * 101
        input_page.entity1.name.set_value(name_value)
        self.assert_util(
            input_page.entity1.save,
            r"Length of input name should be between 1 and 100",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_valid_input_name(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies whether adding special characters, name field displays validation error"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.name.set_value("$$test_name")
        self.assert_util(
            input_page.entity1.save,
            r"Input Name must begin with a letter and consist exclusively of alphanumeric characters and underscores.",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_list_single_select_group_test(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies values Single Select Group Test dropdown in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        single_select_group_test_list = ["One", "Two", "Three", "Four"]
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        self.assert_util(
            input_page.entity1.single_select_group_test.list_of_values(),
            single_select_group_test_list,
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_select_value_single_select_group_test(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies selected value of Single Select Group Test dropdown in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        selected_value = "Two"
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.single_select_group_test.select(selected_value)
        self.assert_util(
            input_page.entity1.single_select_group_test.get_value, selected_value
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_search_value_single_select_group_test(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies singleSelect search functionality"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        self.assert_util(
            input_page.entity1.single_select_group_test.search_get_list,
            ["one", "One"],
            left_args={"value": "one"},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_default_value_multiple_select_test(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies default values of Multiple Select Test dropdown in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        default_values = ["A", "B"]
        self.assert_util(
            input_page.entity1.multiple_select_test.get_values, default_values
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_list_multiple_select_test(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies values of Multiple Select Test dropdown in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.multiple_select_test.deselect_all()
        multiple_select_test = ["A", "B"]
        self.assert_util(
            input_page.entity1.multiple_select_test.list_of_values(),
            multiple_select_test,
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_select_value_multiple_select_test(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies selected single value of Multiple Select Test dropdown in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        selected_value = ["A"]
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.multiple_select_test.deselect_all()
        for each in selected_value:
            input_page.entity1.multiple_select_test.select(each)
        self.assert_util(
            input_page.entity1.multiple_select_test.get_values, selected_value
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_select_multiple_values_multiple_select_test(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies selected multiple values of Multiple Select Test dropdown in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        selected_values = ["A", "B"]
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.multiple_select_test.deselect_all()
        for each in selected_values:
            input_page.entity1.multiple_select_test.select(each)
        self.assert_util(
            input_page.entity1.multiple_select_test.get_values, selected_values
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_deselect_multiple_select_test(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies deselect in Multiple Select Test dropdown in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        selected_values = ["A", "B"]
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.multiple_select_test.deselect_all()
        for each in selected_values:
            input_page.entity1.multiple_select_test.select(each)
        input_page.entity1.multiple_select_test.deselect("A")
        self.assert_util(input_page.entity1.multiple_select_test.get_values, ["B"])

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_search_value_multiple_select_test(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies multiple select search functionality properly"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.multiple_select_test.deselect_all()
        self.assert_util(
            input_page.entity1.multiple_select_test.search_get_list,
            ["A"],
            left_args={"value": "A"},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_default_value_example_checkbox(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies default value of example checkbox in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        self.assert_util(input_page.entity1.example_checkbox.is_checked, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_unchecked_example_checkbox(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies Uncheck in example checkbox in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.example_checkbox.check()
        self.assert_util(input_page.entity1.example_checkbox.uncheck, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_checked_example_checkbox(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies checked in example checkbox in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.example_checkbox.uncheck()
        self.assert_util(input_page.entity1.example_checkbox.check, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_default_value_example_radio(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies default value of example radio in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        self.assert_util(input_page.entity1.example_radio.get_value, "Yes")

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_select_value_example_radio(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies selected value of example radio in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.example_radio.select("No")
        self.assert_util(input_page.entity1.example_radio.get_value, "No")

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_required_field_interval(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies required field interval in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.name.set_value("dummy_input")
        input_page.entity1.example_radio.select("Yes")
        input_page.entity1.single_select_group_test.select("Two")
        input_page.entity1.example_account.select("test_input")
        input_page.entity1.object.set_value("test_object")
        input_page.entity1.object_fields.set_value("test_field")
        input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
        input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
        self.assert_util(
            input_page.entity1.save,
            r"Field Interval is required",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_valid_input_interval(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies whether adding non numeric values, interval field displays validation error"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.example_account.select("test_input")
        input_page.entity1.object.set_value("test_object")
        input_page.entity1.name.set_value("test_name")
        input_page.entity1.object_fields.set_value("test_field")
        input_page.entity1.interval.set_value("abc")
        self.assert_util(
            input_page.entity1.save,
            r"Interval must be either a non-negative number, CRON interval or -1.",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_required_field_index(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies required field index in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.name.set_value("dummy_input")
        input_page.entity1.example_radio.select("Yes")
        input_page.entity1.single_select_group_test.select("Two")
        input_page.entity1.interval.set_value("90")
        input_page.entity1.example_account.select("test_input")
        input_page.entity1.object.set_value("test_object")
        input_page.entity1.object_fields.set_value("test_field")
        input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
        input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
        input_page.entity1.index.cancel_selected_value()
        self.assert_util(
            input_page.entity1.save,
            r"Field Index is required",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_default_value_index(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies default value of field index in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        default_index = "default"
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        self.assert_util(input_page.entity1.index.get_value, default_index)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_required_field_example_account(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies required field Example Account in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.name.set_value("dummy_input")
        input_page.entity1.example_radio.select("Yes")
        input_page.entity1.single_select_group_test.select("Two")
        input_page.entity1.interval.set_value("90")
        input_page.entity1.object.set_value("test_object")
        input_page.entity1.object_fields.set_value("test_field")
        input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
        input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
        self.assert_util(
            input_page.entity1.save,
            r"Field Example Account is required",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_required_field_object(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies required field Object in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.name.set_value("dummy_input")
        input_page.entity1.example_radio.select("Yes")
        input_page.entity1.single_select_group_test.select("Two")
        input_page.entity1.interval.set_value("90")
        input_page.entity1.example_account.select("test_input")
        input_page.entity1.object_fields.set_value("test_field")
        input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
        input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
        self.assert_util(
            input_page.entity1.save,
            r"Field Object is required",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_required_field_object_fields(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies required field Object Fields in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.name.set_value("dummy_input")
        input_page.entity1.example_radio.select("Yes")
        input_page.entity1.single_select_group_test.select("Two")
        input_page.entity1.interval.set_value("90")
        input_page.entity1.example_account.select("test_input")
        input_page.entity1.object.set_value("test_object")
        input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
        input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
        self.assert_util(
            input_page.entity1.save,
            r"Field Object Fields is required",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_required_field_order_by(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies required field Order By in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.name.set_value("dummy_input")
        input_page.entity1.example_radio.select("Yes")
        input_page.entity1.interval.set_value("90")
        input_page.entity1.example_account.select("test_input")
        input_page.entity1.single_select_group_test.select("Two")
        input_page.entity1.object.set_value("test_object")
        input_page.entity1.object_fields.set_value("test_field")
        input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
        input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
        input_page.entity1.order_by.set_value("")
        self.assert_util(
            input_page.entity1.save,
            r"Field Order By is required",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_default_value_order_by(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies default value of field Order By in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        default_order_by = "LastModifiedDate"
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        self.assert_util(input_page.entity1.order_by.get_value, default_order_by)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_required_field_textarea(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies required field textarea in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.name.set_value("dummy_input")
        input_page.entity1.example_radio.select("Yes")
        input_page.entity1.single_select_group_test.select("Two")
        input_page.entity1.interval.set_value("90")
        input_page.entity1.example_account.select("test_input")
        input_page.entity1.object.set_value("test_object")
        input_page.entity1.object_fields.set_value("test_field")
        input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
        input_page.entity1.text_area.set_value("")
        self.assert_util(
            input_page.entity1.save,
            r"Field Example Textarea Field is required",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_fields_label_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies example input one field label"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        self.assert_util(input_page.entity1.name.get_input_label, "Name")
        self.assert_util(
            input_page.entity1.example_checkbox.get_input_label, "Example Checkbox"
        )
        self.assert_util(
            input_page.entity1.example_radio.get_input_label, "Example Radio"
        )
        self.assert_util(
            input_page.entity1.single_select_group_test.get_input_label,
            "Single Select Group Test",
        )
        self.assert_util(
            input_page.entity1.multiple_select_test.get_input_label,
            "Multiple Select Test",
        )
        self.assert_util(input_page.entity1.interval.get_input_label, "Interval")
        self.assert_util(input_page.entity1.index.get_input_label, "Index")
        self.assert_util(
            input_page.entity1.example_account.get_input_label, "Example Account"
        )
        self.assert_util(input_page.entity1.object.get_input_label, "Object")
        self.assert_util(
            input_page.entity1.object_fields.get_input_label, "Object Fields"
        )
        self.assert_util(input_page.entity1.order_by.get_input_label, "Order By")
        self.assert_util(
            input_page.entity1.query_start_date.get_input_label, "Query Start Date"
        )
        self.assert_util(input_page.entity1.limit.get_input_label, "Limit")
        self.assert_util(
            input_page.entity1.text_area.get_input_label, "Example Textarea Field"
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_fields_label_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies example input two field label"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        self.assert_util(input_page.entity2.name.get_input_label, "Name")
        self.assert_util(input_page.entity2.interval.get_input_label, "Interval")
        self.assert_util(input_page.entity2.index.get_input_label, "Index")
        self.assert_util(
            input_page.entity2.example_account.get_input_label, "Example Account"
        )
        self.assert_util(
            input_page.entity2.example_multiple_select.get_input_label,
            "Example Multiple Select",
        )
        self.assert_util(
            input_page.entity2.example_checkbox.get_input_label, "Example Checkbox"
        )
        self.assert_util(
            input_page.entity2.example_radio.get_input_label, "Example Radio"
        )
        self.assert_util(
            input_page.entity2.query_start_date.get_input_label, "Query Start Date"
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_help_text_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies help text for the field name"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        self.assert_util(
            input_page.entity1.name.get_help_text, "A unique name for the data input."
        )
        self.assert_util(
            input_page.entity1.example_checkbox.get_help_text,
            "This is an example checkbox for the input one entity",
        )
        self.assert_util(
            input_page.entity1.example_radio.get_help_text,
            "This is an example radio button for the input one entity",
        )
        self.assert_util(
            input_page.entity1.interval.get_help_text,
            "Time interval of the data input, in seconds.",
        )
        self.assert_util(
            input_page.entity1.object.get_help_text,
            "The name of the object to query for.",
        )
        self.assert_util(
            input_page.entity1.object_fields.get_help_text,
            "Object fields from which to collect data. Delimit multiple fields using a comma.",
        )
        self.assert_util(
            input_page.entity1.query_start_date.get_help_text,
            "The datetime after which to query and index records, "
            'in this format: "YYYY-MM-DDThh:mm:ss.000z". Defaults to 90 days '
            "earlier from now.",
        )
        self.assert_util(
            input_page.entity1.limit.get_help_text,
            "The maximum number of results returned by the query.",
        )
        self.assert_util(
            input_page.entity1.order_by.get_help_text,
            "The datetime field by which to query results in ascending order for indexing.",
        )
        self.assert_util(input_page.entity1.text_area.get_help_text, "Help message")

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_valid_input_query_start_date(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies whether adding wrong format, Query Start Date field displays validation error"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.name.set_value("test_name")
        input_page.entity1.interval.set_value("120")
        input_page.entity1.example_account.select("test_input")
        input_page.entity1.object.set_value("test_object")
        input_page.entity1.object_fields.set_value("test_object_field")
        input_page.entity1.query_start_date.set_value("2020/01/01")
        input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
        self.assert_util(
            input_page.entity1.save,
            r"Invalid date and time format",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_default_value_limit(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies default value of field limit in example input one"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        default_limit = "1000"
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        self.assert_util(input_page.entity1.limit.get_value, default_limit)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_help_link(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies whether the help link redirects to the correct URL"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        go_to_link = "https://docs.splunk.com/Documentation"
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        with input_page.entity1.help_link.open_link():
            self.assert_util(input_page.entity1.help_link.get_current_url, go_to_link)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    @pytest.mark.sanity_test
    def test_example_input_one_add_frontend_backend_validation(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies the frontend and backend after adding an Example Input One"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.name.set_value("dummy_input")
        input_page.entity1.example_radio.select("Yes")
        input_page.entity1.single_select_group_test.select("Two")
        input_page.entity1.interval.set_value("90")
        input_page.entity1.example_account.select("test_input")
        input_page.entity1.object.set_value("test_object")
        input_page.entity1.object_fields.set_value("test_field")
        input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
        input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
        self.assert_util(input_page.entity1.save, True)
        input_page.table.wait_for_rows_to_appear(1)
        self.assert_util(
            input_page.table.get_table()["dummy_input"],
            {
                "name": "dummy_input",
                "account": "test_input",
                "interval": "90",
                "index": "default",
                "status": "Active",
                "actions": "Edit | Clone | Search | Delete",
            },
        )
        value_to_test = {
            "account": "test_input",
            "input_one_checkbox": "1",
            "input_one_radio": "1",
            "interval": "90",
            "limit": "1000",
            "multipleSelectTest": "a|b",
            "object": "test_object",
            "object_fields": "test_field",
            "order_by": "LastModifiedDate",
            "singleSelectTest": "two",
            "start_date": "2020-12-11T20:00:32.000z",
            "disabled": 0,
            "example_textarea_field": "line1\nline2\nline3\nline4\nline5",
        }
        backend_stanza = input_page.backend_conf.get_stanza(
            "example_input_one://dummy_input"
        )
        for each_key, each_value in value_to_test.items():
            assert each_key in backend_stanza
            self.assert_util(
                each_value,
                backend_stanza[each_key],
            )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_edit_uneditable_field_name(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies the frontend uneditable fields at time of edit of the example input one entity"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.edit_row("dummy_input_one")
        self.assert_util(input_page.entity1.name.is_editable, False)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    @pytest.mark.sanity_test
    def test_example_input_one_edit_frontend_backend_validation(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies the frontend and backend edit functionality of the example input one entity"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.edit_row("dummy_input_one")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.example_checkbox.uncheck()
        input_page.entity1.example_radio.select("No")
        input_page.entity1.single_select_group_test.select("four")
        input_page.entity1.multiple_select_test.deselect("b")
        input_page.entity1.interval.set_value("3600")
        input_page.entity1.index.select("main")
        input_page.entity1.example_account.select("test_input")
        input_page.entity1.object.set_value("edit_object")
        input_page.entity1.object_fields.set_value("edit_field")
        input_page.entity1.order_by.set_value("LastDate")
        input_page.entity1.limit.set_value("2000")
        input_page.entity1.query_start_date.set_value("2020-20-20T20:20:20.000z")
        input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
        self.assert_util(input_page.entity1.save, True)
        input_page.table.wait_for_rows_to_appear(1)
        self.assert_util(
            input_page.table.get_table()["dummy_input_one"],
            {
                "name": "dummy_input_one",
                "account": "test_input",
                "interval": "3600",
                "index": "main",
                "status": "Active",
                "actions": "Edit | Clone | Search | Delete",
            },
        )
        value_to_test = {
            "account": "test_input",
            "input_one_checkbox": "0",
            "input_one_radio": "0",
            "interval": "3600",
            "index": "main",
            "limit": "2000",
            "multipleSelectTest": "a",
            "object": "edit_object",
            "object_fields": "edit_field",
            "order_by": "LastDate",
            "singleSelectTest": "four",
            "start_date": "2020-20-20T20:20:20.000z",
            "example_textarea_field": "line1\nline2\nline3\nline4\nline5",
            "disabled": 0,
        }
        backend_stanza = input_page.backend_conf.get_stanza(
            "example_input_one://dummy_input_one"
        )
        for each_key, each_value in value_to_test.items():
            self.assert_util(each_key, backend_stanza, operator="in")
            self.assert_util(each_value, backend_stanza[each_key])

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_clone_default_values(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies the frontend default fields at time of clone for example input one entity"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.clone_row("dummy_input_one")
        input_page.entity1.example_account.wait_for_values()
        self.assert_util(input_page.entity1.name.get_value, "")
        self.assert_util(input_page.entity1.example_checkbox.is_checked, True)
        self.assert_util(input_page.entity1.example_radio.get_value, "Yes")
        self.assert_util(input_page.entity1.single_select_group_test.get_value, "Two")
        self.assert_util(input_page.entity1.multiple_select_test.get_values, ["A", "B"])
        self.assert_util(input_page.entity1.interval.get_value, "90")
        self.assert_util(input_page.entity1.index.get_value, "default")
        self.assert_util(input_page.entity1.example_account.get_value, "test_input")
        self.assert_util(input_page.entity1.object.get_value, "test_object")
        self.assert_util(input_page.entity1.object_fields.get_value, "test_field")
        self.assert_util(input_page.entity1.order_by.get_value, "LastModifiedDate")
        self.assert_util(
            input_page.entity1.query_start_date.get_value, "2020-12-11T20:00:32.000z"
        )
        self.assert_util(input_page.entity1.limit.get_value, "1000")
        self.assert_util(input_page.entity1.text_area.get_value, "line1\nline2")

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    @pytest.mark.sanity_test
    def test_example_input_one_clone_frontend_backend_validation(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies the frontend and backend clone functionality of the example input one entity"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.wait_for_rows_to_appear(1)
        input_page.table.clone_row("dummy_input_one")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.name.set_value("dummy_input_one_Clone_Test")
        input_page.entity1.interval.set_value("180")
        input_page.entity1.limit.set_value("500")
        input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
        self.assert_util(input_page.entity1.save, True)
        input_page.table.wait_for_rows_to_appear(2)
        self.assert_util(
            input_page.table.get_table()["dummy_input_one_Clone_Test"],
            {
                "name": "dummy_input_one_Clone_Test",
                "account": "test_input",
                "interval": "180",
                "index": "default",
                "status": "Active",
                "actions": "Edit | Clone | Search | Delete",
            },
        )
        value_to_test = {
            "account": "test_input",
            "input_one_checkbox": "1",
            "input_one_radio": "1",
            "interval": "180",
            "index": "default",
            "limit": "500",
            "multipleSelectTest": "a|b",
            "object": "test_object",
            "object_fields": "test_field",
            "order_by": "LastModifiedDate",
            "singleSelectTest": "two",
            "start_date": "2020-12-11T20:00:32.000z",
            "example_textarea_field": "line1\nline2\nline3\nline4\nline5",
            "disabled": 0,
        }
        backend_stanza = input_page.backend_conf.get_stanza(
            "example_input_one://dummy_input_one_Clone_Test"
        )
        for each_key, each_value in value_to_test.items():
            self.assert_util(each_key, backend_stanza, operator="in")
            self.assert_util(each_value, backend_stanza[each_key])

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    @pytest.mark.sanity_test
    def test_example_input_one_delete_row_frontend_backend_validation(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies the frontend and backend delete functionality"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.input_status_toggle("dummy_input_one", enable=False)
        input_page.table.delete_row("dummy_input_one")
        input_page.table.wait_for_rows_to_appear(0)
        self.assert_util("dummy_input_one", input_page.table.get_table, "not in")
        self.assert_util(
            "example_input_one://dummy_input_one",
            input_page.backend_conf.get_all_stanzas().keys(),
            "not in",
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_add_close_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies close functionality at time of add"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        self.assert_util(input_page.entity1.close, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_edit_close_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies close functionality at time of edit"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.edit_row("dummy_input_one")
        self.assert_util(input_page.entity1.close, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_clone_close_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies close functionality at time of clone"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.clone_row("dummy_input_one")
        self.assert_util(input_page.entity1.close, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_clone_save_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies required field name in example input one at time of clone"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.clone_row("dummy_input_one")
        self.assert_util(
            input_page.entity1.save,
            "Field Name is required",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_delete_close_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies close functionality at time of delete"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        self.assert_util(
            input_page.table.delete_row,
            True,
            left_args={"name": "dummy_input_one", "close": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_add_cancel_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies cancel functionality at time of add"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        self.assert_util(input_page.entity1.cancel, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_edit_cancel_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies cancel functionality at time of edit"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.edit_row("dummy_input_one")
        self.assert_util(input_page.entity1.cancel, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_clone_cancel_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies cancel functionality at time of clone"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.clone_row("dummy_input_one")
        self.assert_util(input_page.entity1.cancel, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_delete_cancel_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies cancel functionality at time of delete"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        self.assert_util(
            input_page.table.delete_row,
            True,
            left_args={"name": "dummy_input_one", "cancel": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_add_duplicate_names(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies by saving an entity with duplicate name it displays and error"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_name = "dummy_input_one"
        input_page.entity1.name.set_value(input_name)
        self.assert_util(
            input_page.entity1.save,
            f"Name {input_name} is already in use",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_clone_duplicate_names(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies by saving an entity with duplicate name at time of clone it displays and error"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.clone_row("dummy_input_one")
        input_page.entity1.example_account.wait_for_values()
        input_name = "dummy_input_one"
        input_page.entity1.name.set_value(input_name)
        self.assert_util(
            input_page.entity1.save,
            f"Name {input_name} is already in use",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_add_valid_title(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies the title of the 'Add Entity'"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        self.assert_util(
            input_page.entity1.title.container.get_attribute("textContent").strip(),
            "Add Example Input One",
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_edit_valid_title(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies the title of the 'Edit Entity'"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.edit_row("dummy_input_one")
        self.assert_util(
            input_page.entity1.title.container.get_attribute("textContent").strip(),
            "Update Example Input One",
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_clone_valid_title(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies the title of the 'Clone Entity'"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.clone_row("dummy_input_one")
        self.assert_util(
            input_page.entity1.title.container.get_attribute("textContent").strip(),
            "Clone Example Input One",
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_delete_valid_title(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies the title of the 'Delete Entity'"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.delete_row("dummy_input_one", prompt_msg=True)
        self.assert_util(
            input_page.entity1.title.container.get_attribute("textContent").strip(),
            "Delete Confirmation",
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_one_delete_valid_prompt_message(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies the prompt message of the 'Delete Entity'"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_name = "dummy_input_one"
        prompt_message = input_page.table.delete_row("dummy_input_one", prompt_msg=True)
        self.assert_util(
            prompt_message, f'Are you sure you want to delete "{input_name}" ?'
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_required_field_name(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies required field name in Example Input Two"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.example_checkbox.check()
        input_page.entity2.example_radio.select("No")
        input_page.entity2.example_multiple_select.select("Option One")
        input_page.entity2.index.select("main")
        input_page.entity2.interval.set_value("90")
        input_page.entity2.example_account.select("test_input")
        input_page.entity2.query_start_date.set_value("2020-12-11T20:00:32.000z")
        self.assert_util(
            input_page.entity2.save,
            r"Field Name is required",
            left_args={"expect_error": True},
        )
        input_page.entity2.name.set_value("test_name_two")
        self.assert_util(input_page.entity2.is_error_closed, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_valid_length_name(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies the name field should not be more than 100 characters"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        name_value = "a" * 101
        input_page.entity2.name.set_value(name_value)
        self.assert_util(
            input_page.entity2.save,
            r"Length of input name should be between 1 and 100",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_valid_input_name(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies whether adding special characters, name field displays validation error"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.name.set_value("$$test_name_two")
        self.assert_util(
            input_page.entity2.save,
            r"Input Name must begin with a letter and consist exclusively of alphanumeric characters and underscores.",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_clone_valid_input_name(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies whether adding special characters, name field displays validation error while cloning a row"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.clone_row("dummy_input_two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.name.set_value("$$test_name_two")
        self.assert_util(
            input_page.entity2.save,
            r"Input Name must begin with a letter and consist exclusively of alphanumeric characters and underscores.",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_required_field_interval(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies required field interval in Example Input Two"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.name.set_value("dummy_input")
        input_page.entity2.example_checkbox.check()
        input_page.entity2.example_radio.select("No")
        input_page.entity2.example_multiple_select.select("Option One")
        input_page.entity2.index.select("main")
        input_page.entity2.example_account.select("test_input")
        input_page.entity2.query_start_date.set_value("2020-12-11T20:00:32.000z")
        self.assert_util(
            input_page.entity2.save,
            r"Field Interval is required",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_valid_input_interval(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies whether adding non numeric values, interval field displays validation error"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.name.set_value("test_name_two")
        input_page.entity2.interval.set_value("abc")
        self.assert_util(
            input_page.entity2.save,
            r"Interval must be either a non-negative number, CRON interval or -1.",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_required_field_index(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies required field index in Example Input Two"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.name.set_value("dummy_input")
        input_page.entity2.example_checkbox.check()
        input_page.entity2.example_account.select("test_input")
        input_page.entity2.example_radio.select("No")
        input_page.entity2.example_multiple_select.select("Option One")
        input_page.entity2.interval.set_value("90")
        input_page.entity2.query_start_date.set_value("2020-12-11T20:00:32.000z")
        input_page.entity2.index.cancel_selected_value()
        self.assert_util(
            input_page.entity2.save,
            r"Field Index is required",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_default_value_index(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies default value of field index in Example Input Two"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        default_index = "default"
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        self.assert_util(input_page.entity2.index.get_value, default_index)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_required_field_example_example_account(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies required field Account in Example Input Two"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.name.set_value("dummy_input")
        input_page.entity2.example_checkbox.check()
        input_page.entity2.example_radio.select("No")
        input_page.entity2.example_multiple_select.select("Option One")
        input_page.entity2.index.select("main")
        input_page.entity2.interval.set_value("90")
        input_page.entity2.query_start_date.set_value("2020-12-11T20:00:32.000z")
        self.assert_util(
            input_page.entity2.save,
            r"Field Example Account is required",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_required_field_example_multiple_select(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies required field Example Multiple Select in Example Input Two"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.name.set_value("dummy_input")
        input_page.entity2.example_checkbox.check()
        input_page.entity2.example_radio.select("No")
        input_page.entity2.index.select("main")
        input_page.entity2.interval.set_value("90")
        input_page.entity2.example_account.select("test_input")
        input_page.entity2.query_start_date.set_value("2020-12-11T20:00:32.000z")
        self.assert_util(
            input_page.entity2.save,
            r"Field Example Multiple Select is required",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_list_example_multiple_select(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies values of Multiple Select Test dropdown in Example Input Two"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        example_multiple_select_list = ["Option One", "Option Two"]
        self.assert_util(
            input_page.entity2.example_multiple_select.list_of_values(),
            example_multiple_select_list,
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_select_select_value_example_multiple_select(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies selected single value of Multiple Select Test dropdown in Example Input Two"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        selected_value = ["Option One"]
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.index.select("main")
        for each in selected_value:
            input_page.entity2.example_multiple_select.select(each)
        self.assert_util(
            input_page.entity2.example_multiple_select.get_values, selected_value
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_select_multiple_values_example_multiple_select(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies selected multiple values of Multiple Select Test dropdown in Example Input Two"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        selected_values = ["Option One", "Option Two"]
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.index.select("main")
        for each in selected_values:
            input_page.entity2.example_multiple_select.select(each)
        self.assert_util(
            input_page.entity2.example_multiple_select.get_values, selected_values
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_help_text_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies help text for the field name"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        self.assert_util(
            input_page.entity2.example_multiple_select.get_help_text,
            "This is an example multipleSelect for input two entity",
        )
        self.assert_util(
            input_page.entity2.name.get_help_text, "A unique name for the data input."
        )
        self.assert_util(
            input_page.entity2.interval.get_help_text,
            "Time interval of the data input, in seconds.",
        )
        self.assert_util(
            input_page.entity2.example_checkbox.get_help_text,
            "This is an example checkbox for the input two entity",
        )
        self.assert_util(
            input_page.entity2.example_radio.get_help_text,
            "This is an example radio button for the input two entity",
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_checked_example_checkbox(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies Check in example checkbox in Example Input Two"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        self.assert_util(input_page.entity2.example_checkbox.check, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_unchecked_example_checkbox(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies Uncheck in example checkbox in Example Input Two"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.example_checkbox.check()
        self.assert_util(input_page.entity2.example_checkbox.uncheck, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_required_field_example_radio(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies default value of example radio in Example Input Two"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.name.set_value("dummy_input")
        input_page.entity2.example_checkbox.check()
        input_page.entity2.example_multiple_select.select("Option One")
        input_page.entity2.index.select("main")
        input_page.entity2.interval.set_value("90")
        input_page.entity2.example_account.select("test_input")
        input_page.entity2.query_start_date.set_value("2020-12-11T20:00:32.000z")
        self.assert_util(
            input_page.entity2.save,
            r"Field Example Radio is required",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_select_value_example_radio(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies default value of example radio in Example Input Two"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.example_radio.select("No")
        self.assert_util(input_page.entity2.example_radio.get_value, "No")

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_valid_input_query_start_date(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies whether adding wrong format, Query Start Date field displays validation error"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.name.set_value("test_name_two")
        input_page.entity2.interval.set_value("120")
        input_page.entity2.example_account.select("test_input")
        input_page.entity2.example_multiple_select.select("Option One")
        input_page.entity2.example_radio.select("Yes")
        input_page.entity2.query_start_date.set_value("2020/01/01")
        self.assert_util(
            input_page.entity2.save,
            r"Invalid date and time format",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    @pytest.mark.sanity_test
    def test_example_input_two_add_frontend_backend_validation(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies the frontend and backend after adding an Example Input Two"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.name.set_value("dummy_input")
        input_page.entity2.example_checkbox.check()
        input_page.entity2.example_radio.select("No")
        input_page.entity2.example_multiple_select.select("Option One")
        input_page.entity2.example_multiple_select.select("Option Two")
        input_page.entity2.index.select("main")
        input_page.entity2.interval.set_value("90")
        input_page.entity2.example_account.select("test_input")
        input_page.entity2.query_start_date.set_value("2020-12-11T20:00:32.000z")
        self.assert_util(input_page.entity2.save, True)
        input_page.table.wait_for_rows_to_appear(1)
        self.assert_util(
            input_page.table.get_table()["dummy_input"],
            {
                "name": "dummy_input",
                "account": "test_input",
                "interval": "90",
                "index": "main",
                "status": "Active",
                "actions": "Edit | Clone | Search | Delete",
            },
        )
        value_to_test = {
            "account": "test_input",
            "index": "main",
            "input_two_checkbox": "1",
            "input_two_radio": "0",
            "interval": "90",
            "input_two_multiple_select": "one,two",
            "start_date": "2020-12-11T20:00:32.000z",
            "disabled": 0,
        }
        backend_stanza = input_page.backend_conf.get_stanza(
            "example_input_two://dummy_input"
        )
        for each_key, each_value in value_to_test.items():
            self.assert_util(each_key, backend_stanza, operator="in")
            self.assert_util(each_value, backend_stanza[each_key])

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_edit_uneditable_field_name(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies the frontend uneditable fields at time of edit of the Example Input Two entity"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.edit_row("dummy_input_two")
        input_page.entity2.example_account.wait_for_values()
        self.assert_util(input_page.entity2.name.is_editable, False)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    @pytest.mark.sanity_test
    def test_example_input_two_edit_frontend_backend_validation(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies the frontend and backend edit functionality of the Example Input Two entity"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.edit_row("dummy_input_two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.example_checkbox.uncheck()
        input_page.entity2.example_radio.select("Yes")
        input_page.entity2.example_account.select("test_input")
        input_page.entity2.example_multiple_select.deselect("Option One")
        input_page.entity2.interval.set_value("3600")
        input_page.entity2.query_start_date.set_value("2020-20-20T20:20:20.000z")
        self.assert_util(input_page.entity2.save, True)
        input_page.table.wait_for_rows_to_appear(1)
        self.assert_util(
            input_page.table.get_table()["dummy_input_two"],
            {
                "name": "dummy_input_two",
                "account": "test_input",
                "interval": "3600",
                "index": "main",
                "status": "Active",
                "actions": "Edit | Clone | Search | Delete",
            },
        )
        value_to_test = {
            "account": "test_input",
            "input_two_checkbox": "0",
            "input_two_radio": "1",
            "interval": "3600",
            "index": "main",
            "input_two_multiple_select": "two",
            "start_date": "2020-20-20T20:20:20.000z",
            "disabled": 0,
        }
        backend_stanza = input_page.backend_conf.get_stanza(
            "example_input_two://dummy_input_two"
        )
        for each_key, each_value in value_to_test.items():
            self.assert_util(each_key, backend_stanza, operator="in")
            self.assert_util(each_value, backend_stanza[each_key])

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_clone_default_values(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies the frontend default fields at time of clone for Example Input Two entity"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.clone_row("dummy_input_two")
        input_page.entity2.example_account.wait_for_values()
        self.assert_util(input_page.entity2.name.get_value, "")
        self.assert_util(input_page.entity2.example_checkbox.is_checked, True)
        self.assert_util(input_page.entity2.example_radio.get_value, "No")
        self.assert_util(
            input_page.entity2.example_multiple_select.get_values,
            ["Option One", "Option Two"],
        )
        self.assert_util(input_page.entity2.interval.get_value, "100")
        self.assert_util(input_page.entity2.index.get_value, "main")
        self.assert_util(input_page.entity2.example_account.get_value, "test_input")
        self.assert_util(
            input_page.entity2.query_start_date.get_value, "2016-10-10T12:10:15.000z"
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    @pytest.mark.sanity_test
    def test_example_input_two_clone_frontend_backend_validation(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies the frontend and backend clone functionality of the Example Input Two entity"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.wait_for_rows_to_appear(1)
        input_page.table.clone_row("dummy_input_two")
        input_page.entity2.example_account.wait_for_values()
        input_page.entity2.name.set_value("dummy_input_two_Clone_Test")
        input_page.entity2.interval.set_value("180")
        self.assert_util(input_page.entity2.save, True)
        input_page.table.wait_for_rows_to_appear(2)
        self.assert_util(
            input_page.table.get_table()["dummy_input_two_Clone_Test"],
            {
                "name": "dummy_input_two_Clone_Test",
                "account": "test_input",
                "interval": "180",
                "index": "main",
                "status": "Active",
                "actions": "Edit | Clone | Search | Delete",
            },
        )
        value_to_test = {
            "account": "test_input",
            "input_two_checkbox": "1",
            "input_two_radio": "0",
            "interval": "180",
            "index": "main",
            "input_two_multiple_select": "one,two",
            "start_date": "2016-10-10T12:10:15.000z",
            "disabled": 0,
        }
        backend_stanza = input_page.backend_conf.get_stanza(
            "example_input_two://dummy_input_two_Clone_Test"
        )
        for each_key, each_value in value_to_test.items():
            self.assert_util(each_key, backend_stanza, operator="in")
            self.assert_util(each_value, backend_stanza[each_key])

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    @pytest.mark.sanity_test
    def test_example_input_two_delete_row_frontend_backend_validation(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies the frontend and backend delete functionality"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.input_status_toggle("dummy_input_two", enable=False)
        input_page.table.delete_row("dummy_input_two")
        input_page.table.wait_for_rows_to_appear(0)
        self.assert_util("dummy_input_two", input_page.table.get_table, "not in")
        self.assert_util(
            "example_input_two://dummy_input_two",
            input_page.backend_conf.get_all_stanzas().keys(),
            "not in",
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_add_close_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies close functionality at time of add"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        self.assert_util(input_page.entity2.close, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_edit_close_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies close functionality at time of edit"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.edit_row("dummy_input_two")
        self.assert_util(input_page.entity2.close, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_clone_close_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies close functionality at time of clone"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.clone_row("dummy_input_two")
        self.assert_util(input_page.entity2.close, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_delete_close_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies close functionality at time of delete"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        self.assert_util(
            input_page.table.delete_row,
            True,
            left_args={"name": "dummy_input_two", "close": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_add_cancel_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies cancel functionality at time of add"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        self.assert_util(input_page.entity2.cancel, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_edit_cancel_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies cancel functionality at time of edit"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.edit_row("dummy_input_two")
        self.assert_util(input_page.entity2.cancel, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_clone_cancel_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies cancel functionality at time of clone"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.clone_row("dummy_input_two")
        self.assert_util(input_page.entity2.cancel, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_delete_cancel_entity(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies cancel functionality at time of delete"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        self.assert_util(
            input_page.table.delete_row,
            True,
            left_args={"name": "dummy_input_two", "cancel": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_add_duplicate_names(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies by saving an entity with duplicate name it displays and error"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        input_name = "dummy_input_two"
        input_page.entity2.name.set_value(input_name)
        self.assert_util(
            input_page.entity2.save,
            f"Name {input_name} is already in use",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_clone_duplicate_names(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies by saving an entity with duplicate name at time of clone it displays and error"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.clone_row("dummy_input_two")
        input_page.entity2.example_account.wait_for_values()
        input_name = "dummy_input_two"
        input_page.entity2.name.set_value(input_name)
        self.assert_util(
            input_page.entity2.save,
            f"Name {input_name} is already in use",
            left_args={"expect_error": True},
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_add_valid_title(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies the title of the 'Add Entity'"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.create_new_input.select("Example Input Two")
        input_page.entity2.example_account.wait_for_values()
        self.assert_util(
            input_page.entity2.title.container.get_attribute("textContent").strip(),
            "Add Example Input Two",
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_edit_valid_title(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies the title of the 'Edit Entity'"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.edit_row("dummy_input_two")
        input_page.entity2.example_account.wait_for_values()
        self.assert_util(
            input_page.entity2.title.container.get_attribute("textContent").strip(),
            "Update Example Input Two",
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_clone_valid_title(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies the title of the 'Clone Entity'"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.clone_row("dummy_input_two")
        input_page.entity2.example_account.wait_for_values()
        self.assert_util(
            input_page.entity2.title.container.get_attribute("textContent").strip(),
            "Clone Example Input Two",
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_delete_valid_title(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies the title of the 'Delete Entity'"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.delete_row("dummy_input_two", prompt_msg=True)
        self.assert_util(
            input_page.entity2.title.container.get_attribute("textContent").strip(),
            "Delete Confirmation",
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_example_input_two_delete_valid_prompt_message(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
    ):
        """Verifies the prompt message of the 'Delete Entity'"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_name = "dummy_input_two"
        prompt_message = input_page.table.delete_row("dummy_input_two", prompt_msg=True)
        self.assert_util(
            prompt_message, f'Are you sure you want to delete "{input_name}" ?'
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_enable_all_title_message(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies title and message of enable all prompt"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.enable_all_inputs()
        self.assert_util(
            input_page.interact_all_prompt_entity.prompt_title.container.get_attribute(
                "textContent"
            ).strip(),
            "Activate all",
        )
        self.assert_util(
            input_page.interact_all_prompt_entity.prompt_message.container.get_attribute(
                "textContent"
            ).strip(),
            "Do you want to activate all? It may take a while.",
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_disable_all_title_message(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """Verifies title and message of disable all prompt"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.disable_all_inputs()
        self.assert_util(
            input_page.interact_all_prompt_entity.prompt_title.container.get_attribute(
                "textContent"
            ).strip(),
            "Deactivate all",
        )
        self.assert_util(
            input_page.interact_all_prompt_entity.prompt_message.container.get_attribute(
                "textContent"
            ).strip(),
            "Do you want to deactivate all? It may take a while.",
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_enable_all_close(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """
        Verifies that closing the 'Activate All' prompt behaves correctly.
        """
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.enable_all_inputs()
        self.assert_util(input_page.interact_all_prompt_entity.close, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_disable_all_close(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """
        Verifies that closing the 'Deactivate All' prompt behaves correctly.
        """
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.disable_all_inputs()
        self.assert_util(input_page.interact_all_prompt_entity.close, True)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_enable_all_deny(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """
        Verifies that when 'Activate All' is followed by 'Deny,' inputs remain disabled.
        """
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        inputs_enabled_table = input_page.table.get_table()
        inputs_disabled_table = copy.deepcopy(inputs_enabled_table)
        for i in inputs_disabled_table:
            inputs_disabled_table[i]["status"] = "Inactive"
        input_page.disable_all_inputs()
        input_page.interact_all_prompt_entity.confirm()
        input_page.enable_all_inputs()
        input_page.interact_all_prompt_entity.deny()
        self.assert_util(input_page.table.get_table(), inputs_disabled_table)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_disable_all_deny(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """
        Verifies that when 'Deactivate All' is followed by 'Deny,' inputs remain enabled.
        """
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        inputs_enabled_table = input_page.table.get_table()
        input_page.disable_all_inputs()
        input_page.interact_all_prompt_entity.deny()
        self.assert_util(input_page.table.get_table(), inputs_enabled_table)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_disable_enable_all(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_multiple_inputs
    ):
        """Verifies that all inputs are disabled after clicking 'Deactivate all'"""
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        inputs_enabled_table = input_page.table.get_table()
        inputs_disabled_table = copy.deepcopy(inputs_enabled_table)
        for i in inputs_disabled_table:
            inputs_disabled_table[i]["status"] = "Inactive"
        input_page.disable_all_inputs()
        input_page.interact_all_prompt_entity.confirm()
        time.sleep(10)
        self.assert_util(input_page.table.get_table(), inputs_disabled_table)
        input_page.enable_all_inputs()
        input_page.interact_all_prompt_entity.confirm()
        time.sleep(10)
        self.assert_util(input_page.table.get_table(), inputs_enabled_table)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_disable_all_enable_all_input_one_input_two(
        self,
        ucc_smartx_selenium_helper,
        ucc_smartx_rest_helper,
        _add_input_one,
        _add_input_two,
    ):
        """
        Verifies that various types of inputs are correctly disabled and enabled
        when using the 'Deactivate All' and 'Activate All' buttons.
        This test covers scenarios with both Input One and Input Two added.
        """
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        inputs_enabled_table = input_page.table.get_table()
        inputs_disabled_table = copy.deepcopy(inputs_enabled_table)
        for i in inputs_disabled_table:
            inputs_disabled_table[i]["status"] = "Inactive"
        input_page.disable_all_inputs()
        input_page.interact_all_prompt_entity.confirm()
        time.sleep(1)
        self.assert_util(input_page.table.get_table(), inputs_disabled_table)
        input_page.enable_all_inputs()
        input_page.interact_all_prompt_entity.confirm()
        time.sleep(1)
        self.assert_util(input_page.table.get_table(), inputs_enabled_table)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_enable_all_some_already_enabled(
        self,
        ucc_smartx_selenium_helper,
        ucc_smartx_rest_helper,
        _add_input_one,
        _add_input_two,
    ):
        """
        Verifies that all inputs are enabled correctly.
        This test covers scenario where one input is already enabled.
        """
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        inputs_enabled_table = input_page.table.get_table()
        self.assert_util(
            input_page.table.input_status_toggle,
            True,
            left_args={"name": "dummy_input_one", "enable": False},
        )
        input_page.enable_all_inputs()
        input_page.interact_all_prompt_entity.confirm()
        time.sleep(1)
        self.assert_util(input_page.table.get_table(), inputs_enabled_table)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_disable_all_some_already_disabled(
        self,
        ucc_smartx_selenium_helper,
        ucc_smartx_rest_helper,
        _add_input_one,
        _add_input_two,
    ):
        """
        Verifies that all inputs are disabled correctly.
        This test covers scenario where one input is already disabled.
        """
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        inputs_enabled_table = input_page.table.get_table()
        inputs_disabled_table = copy.deepcopy(inputs_enabled_table)
        for i in inputs_disabled_table:
            inputs_disabled_table[i]["status"] = "Inactive"
        self.assert_util(
            input_page.table.input_status_toggle,
            True,
            left_args={"name": "dummy_input_one", "enable": False},
        )
        input_page.disable_all_inputs()
        input_page.interact_all_prompt_entity.confirm()
        time.sleep(1)
        self.assert_util(input_page.table.get_table(), inputs_disabled_table)

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_textarea_height(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """
        Verifies that textarea height values.
        """
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.edit_row("dummy_input_one")
        min_textarea_height = 66
        max_textarea_height = 306
        tolerance = 5
        long_input = ""
        self.assert_util(
            min_textarea_height - tolerance
            <= input_page.entity1.text_area.get_textarea_height()
            <= min_textarea_height + tolerance,
            True,
        )

        for i in range(1, 50):
            long_input += f"{str(i)}\n"
        input_page.entity1.text_area.append_value(long_input)
        self.assert_util(
            max_textarea_height - tolerance
            <= input_page.entity1.text_area.get_textarea_height()
            <= max_textarea_height + tolerance,
            True,
        )

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_textarea_big_input(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """
        Verifies that textarea can handle big inputs
        """
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.edit_row("dummy_input_one")
        big_input = ""
        for i in range(1, 100):
            big_input += f"{str(i)}\n"
        input_page.entity1.text_area.set_value(big_input)
        self.assert_util(big_input, input_page.entity1.text_area.get_value())
        self.assert_util(input_page.entity1.save, True)
        input_page.table.edit_row("dummy_input_one")
        self.assert_util(big_input.strip(), input_page.entity1.text_area.get_value())

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    def test_inputs_textarea_scroll(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
    ):
        """
        Verifies that textarea height values
        """
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        input_page.table.edit_row("dummy_input_one")
        long_input = ""
        screnshot_before = input_page.entity1.text_area.screenshot()
        for i in range(1, 50):
            long_input += f"{str(i)}\n"
        input_page.entity1.text_area.append_value(long_input)
        input_page.entity1.text_area.scroll("UP", 40)
        screenshot_after = input_page.entity1.text_area.screenshot()
        self.assert_util(screnshot_before, screenshot_after, operator="!=")

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    @pytest.mark.parametrize(
        "interval",
        [
            "-1",
            "1",
            "0 0,11 2 */2 *",
            "* * * * *",
        ],
    )
    def test_example_inputs_with_valid_interval(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, interval
    ):
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        # for input_pos, interval in enumerate(intervals, 1):
        name = "dummy_input"
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.example_account.select("test_input")
        input_page.entity1.object.set_value("test_object")
        input_page.entity1.name.set_value(name)
        input_page.entity1.object_fields.set_value("test_field")
        input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")

        input_page.entity1.interval.set_value(interval)

        input_page.entity1.save_btn.click()
        input_page.table.wait_for_rows_to_appear(1)

        self.assert_util(
            input_page.table.get_table()[name],
            {
                "name": name,
                "account": "test_input",
                "interval": interval,
                "index": "default",
                "status": "Active",
                "actions": "Edit | Clone | Search | Delete",
            },
        )

        backend_stanza = input_page.backend_conf.get_stanza(
            f"example_input_one://{name}"
        )
        assert backend_stanza.get("interval") == interval

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.input
    @pytest.mark.parametrize(
        "interval",
        [
            "-2",
            "0a 0,11 2 */2 *",
            "a b * * *",
        ],
    )
    def test_example_inputs_with_not_valid_interval(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, interval
    ):
        input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
        name = "dummy_input"
        input_page.create_new_input.select("Example Input One")
        input_page.entity1.example_account.wait_for_values()
        input_page.entity1.example_account.select("test_input")
        input_page.entity1.object.set_value("test_object")
        input_page.entity1.name.set_value(name)
        input_page.entity1.object_fields.set_value("test_field")
        input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")

        input_page.entity1.interval.set_value(interval)

        self.assert_util(
            input_page.entity2.save,
            "Interval must be either a non-negative number, CRON interval or -1.",
            left_args={"expect_error": True},
        )

test_example_input_one_add_cancel_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies cancel functionality at time of add

Source code in tests/ui/test_input_page.py
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_add_cancel_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies cancel functionality at time of add"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    self.assert_util(input_page.entity1.cancel, True)

test_example_input_one_add_close_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies close functionality at time of add

Source code in tests/ui/test_input_page.py
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_add_close_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies close functionality at time of add"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    self.assert_util(input_page.entity1.close, True)

test_example_input_one_add_duplicate_names(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies by saving an entity with duplicate name it displays and error

Source code in tests/ui/test_input_page.py
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_add_duplicate_names(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies by saving an entity with duplicate name it displays and error"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_name = "dummy_input_one"
    input_page.entity1.name.set_value(input_name)
    self.assert_util(
        input_page.entity1.save,
        f"Name {input_name} is already in use",
        left_args={"expect_error": True},
    )

test_example_input_one_add_frontend_backend_validation(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies the frontend and backend after adding an Example Input One

Source code in tests/ui/test_input_page.py
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
@pytest.mark.sanity_test
def test_example_input_one_add_frontend_backend_validation(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies the frontend and backend after adding an Example Input One"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.name.set_value("dummy_input")
    input_page.entity1.example_radio.select("Yes")
    input_page.entity1.single_select_group_test.select("Two")
    input_page.entity1.interval.set_value("90")
    input_page.entity1.example_account.select("test_input")
    input_page.entity1.object.set_value("test_object")
    input_page.entity1.object_fields.set_value("test_field")
    input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
    input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
    self.assert_util(input_page.entity1.save, True)
    input_page.table.wait_for_rows_to_appear(1)
    self.assert_util(
        input_page.table.get_table()["dummy_input"],
        {
            "name": "dummy_input",
            "account": "test_input",
            "interval": "90",
            "index": "default",
            "status": "Active",
            "actions": "Edit | Clone | Search | Delete",
        },
    )
    value_to_test = {
        "account": "test_input",
        "input_one_checkbox": "1",
        "input_one_radio": "1",
        "interval": "90",
        "limit": "1000",
        "multipleSelectTest": "a|b",
        "object": "test_object",
        "object_fields": "test_field",
        "order_by": "LastModifiedDate",
        "singleSelectTest": "two",
        "start_date": "2020-12-11T20:00:32.000z",
        "disabled": 0,
        "example_textarea_field": "line1\nline2\nline3\nline4\nline5",
    }
    backend_stanza = input_page.backend_conf.get_stanza(
        "example_input_one://dummy_input"
    )
    for each_key, each_value in value_to_test.items():
        assert each_key in backend_stanza
        self.assert_util(
            each_value,
            backend_stanza[each_key],
        )

test_example_input_one_add_valid_title(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies the title of the ‘Add Entity’

Source code in tests/ui/test_input_page.py
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_add_valid_title(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies the title of the 'Add Entity'"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    self.assert_util(
        input_page.entity1.title.container.get_attribute("textContent").strip(),
        "Add Example Input One",
    )

test_example_input_one_checked_example_checkbox(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies checked in example checkbox in example input one

Source code in tests/ui/test_input_page.py
615
616
617
618
619
620
621
622
623
624
625
626
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_checked_example_checkbox(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies checked in example checkbox in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.example_checkbox.uncheck()
    self.assert_util(input_page.entity1.example_checkbox.check, True)

test_example_input_one_clone_cancel_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies cancel functionality at time of clone

Source code in tests/ui/test_input_page.py
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_clone_cancel_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies cancel functionality at time of clone"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.clone_row("dummy_input_one")
    self.assert_util(input_page.entity1.cancel, True)

test_example_input_one_clone_close_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies close functionality at time of clone

Source code in tests/ui/test_input_page.py
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_clone_close_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies close functionality at time of clone"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.clone_row("dummy_input_one")
    self.assert_util(input_page.entity1.close, True)

test_example_input_one_clone_default_values(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies the frontend default fields at time of clone for example input one entity

Source code in tests/ui/test_input_page.py
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_clone_default_values(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies the frontend default fields at time of clone for example input one entity"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.clone_row("dummy_input_one")
    input_page.entity1.example_account.wait_for_values()
    self.assert_util(input_page.entity1.name.get_value, "")
    self.assert_util(input_page.entity1.example_checkbox.is_checked, True)
    self.assert_util(input_page.entity1.example_radio.get_value, "Yes")
    self.assert_util(input_page.entity1.single_select_group_test.get_value, "Two")
    self.assert_util(input_page.entity1.multiple_select_test.get_values, ["A", "B"])
    self.assert_util(input_page.entity1.interval.get_value, "90")
    self.assert_util(input_page.entity1.index.get_value, "default")
    self.assert_util(input_page.entity1.example_account.get_value, "test_input")
    self.assert_util(input_page.entity1.object.get_value, "test_object")
    self.assert_util(input_page.entity1.object_fields.get_value, "test_field")
    self.assert_util(input_page.entity1.order_by.get_value, "LastModifiedDate")
    self.assert_util(
        input_page.entity1.query_start_date.get_value, "2020-12-11T20:00:32.000z"
    )
    self.assert_util(input_page.entity1.limit.get_value, "1000")
    self.assert_util(input_page.entity1.text_area.get_value, "line1\nline2")

test_example_input_one_clone_duplicate_names(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies by saving an entity with duplicate name at time of clone it displays and error

Source code in tests/ui/test_input_page.py
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_clone_duplicate_names(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies by saving an entity with duplicate name at time of clone it displays and error"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.clone_row("dummy_input_one")
    input_page.entity1.example_account.wait_for_values()
    input_name = "dummy_input_one"
    input_page.entity1.name.set_value(input_name)
    self.assert_util(
        input_page.entity1.save,
        f"Name {input_name} is already in use",
        left_args={"expect_error": True},
    )

test_example_input_one_clone_frontend_backend_validation(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies the frontend and backend clone functionality of the example input one entity

Source code in tests/ui/test_input_page.py
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
@pytest.mark.sanity_test
def test_example_input_one_clone_frontend_backend_validation(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies the frontend and backend clone functionality of the example input one entity"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.wait_for_rows_to_appear(1)
    input_page.table.clone_row("dummy_input_one")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.name.set_value("dummy_input_one_Clone_Test")
    input_page.entity1.interval.set_value("180")
    input_page.entity1.limit.set_value("500")
    input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
    self.assert_util(input_page.entity1.save, True)
    input_page.table.wait_for_rows_to_appear(2)
    self.assert_util(
        input_page.table.get_table()["dummy_input_one_Clone_Test"],
        {
            "name": "dummy_input_one_Clone_Test",
            "account": "test_input",
            "interval": "180",
            "index": "default",
            "status": "Active",
            "actions": "Edit | Clone | Search | Delete",
        },
    )
    value_to_test = {
        "account": "test_input",
        "input_one_checkbox": "1",
        "input_one_radio": "1",
        "interval": "180",
        "index": "default",
        "limit": "500",
        "multipleSelectTest": "a|b",
        "object": "test_object",
        "object_fields": "test_field",
        "order_by": "LastModifiedDate",
        "singleSelectTest": "two",
        "start_date": "2020-12-11T20:00:32.000z",
        "example_textarea_field": "line1\nline2\nline3\nline4\nline5",
        "disabled": 0,
    }
    backend_stanza = input_page.backend_conf.get_stanza(
        "example_input_one://dummy_input_one_Clone_Test"
    )
    for each_key, each_value in value_to_test.items():
        self.assert_util(each_key, backend_stanza, operator="in")
        self.assert_util(each_value, backend_stanza[each_key])

test_example_input_one_clone_save_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies required field name in example input one at time of clone

Source code in tests/ui/test_input_page.py
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_clone_save_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies required field name in example input one at time of clone"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.clone_row("dummy_input_one")
    self.assert_util(
        input_page.entity1.save,
        "Field Name is required",
        left_args={"expect_error": True},
    )

test_example_input_one_clone_valid_title(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies the title of the ‘Clone Entity’

Source code in tests/ui/test_input_page.py
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_clone_valid_title(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies the title of the 'Clone Entity'"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.clone_row("dummy_input_one")
    self.assert_util(
        input_page.entity1.title.container.get_attribute("textContent").strip(),
        "Clone Example Input One",
    )

test_example_input_one_default_value_example_checkbox(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies default value of example checkbox in example input one

Source code in tests/ui/test_input_page.py
590
591
592
593
594
595
596
597
598
599
600
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_default_value_example_checkbox(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies default value of example checkbox in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    self.assert_util(input_page.entity1.example_checkbox.is_checked, True)

test_example_input_one_default_value_example_radio(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies default value of example radio in example input one

Source code in tests/ui/test_input_page.py
628
629
630
631
632
633
634
635
636
637
638
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_default_value_example_radio(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies default value of example radio in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    self.assert_util(input_page.entity1.example_radio.get_value, "Yes")

test_example_input_one_default_value_index(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies default value of field index in example input one

Source code in tests/ui/test_input_page.py
724
725
726
727
728
729
730
731
732
733
734
735
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_default_value_index(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies default value of field index in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    default_index = "default"
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    self.assert_util(input_page.entity1.index.get_value, default_index)

test_example_input_one_default_value_limit(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies default value of field limit in example input one

Source code in tests/ui/test_input_page.py
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_default_value_limit(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies default value of field limit in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    default_limit = "1000"
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    self.assert_util(input_page.entity1.limit.get_value, default_limit)

test_example_input_one_default_value_multiple_select_test(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies default values of Multiple Select Test dropdown in example input one

Source code in tests/ui/test_input_page.py
488
489
490
491
492
493
494
495
496
497
498
499
500
501
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_default_value_multiple_select_test(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies default values of Multiple Select Test dropdown in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    default_values = ["A", "B"]
    self.assert_util(
        input_page.entity1.multiple_select_test.get_values, default_values
    )

test_example_input_one_default_value_order_by(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies default value of field Order By in example input one

Source code in tests/ui/test_input_page.py
835
836
837
838
839
840
841
842
843
844
845
846
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_default_value_order_by(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies default value of field Order By in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    default_order_by = "LastModifiedDate"
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    self.assert_util(input_page.entity1.order_by.get_value, default_order_by)

test_example_input_one_delete_cancel_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies cancel functionality at time of delete

Source code in tests/ui/test_input_page.py
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_delete_cancel_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies cancel functionality at time of delete"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    self.assert_util(
        input_page.table.delete_row,
        True,
        left_args={"name": "dummy_input_one", "cancel": True},
    )

test_example_input_one_delete_close_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies close functionality at time of delete

Source code in tests/ui/test_input_page.py
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_delete_close_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies close functionality at time of delete"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    self.assert_util(
        input_page.table.delete_row,
        True,
        left_args={"name": "dummy_input_one", "close": True},
    )

test_example_input_one_delete_row_frontend_backend_validation(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies the frontend and backend delete functionality

Source code in tests/ui/test_input_page.py
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
@pytest.mark.sanity_test
def test_example_input_one_delete_row_frontend_backend_validation(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies the frontend and backend delete functionality"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.input_status_toggle("dummy_input_one", enable=False)
    input_page.table.delete_row("dummy_input_one")
    input_page.table.wait_for_rows_to_appear(0)
    self.assert_util("dummy_input_one", input_page.table.get_table, "not in")
    self.assert_util(
        "example_input_one://dummy_input_one",
        input_page.backend_conf.get_all_stanzas().keys(),
        "not in",
    )

test_example_input_one_delete_valid_prompt_message(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies the prompt message of the ‘Delete Entity’

Source code in tests/ui/test_input_page.py
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_delete_valid_prompt_message(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies the prompt message of the 'Delete Entity'"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_name = "dummy_input_one"
    prompt_message = input_page.table.delete_row("dummy_input_one", prompt_msg=True)
    self.assert_util(
        prompt_message, f'Are you sure you want to delete "{input_name}" ?'
    )

test_example_input_one_delete_valid_title(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies the title of the ‘Delete Entity’

Source code in tests/ui/test_input_page.py
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_delete_valid_title(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies the title of the 'Delete Entity'"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.delete_row("dummy_input_one", prompt_msg=True)
    self.assert_util(
        input_page.entity1.title.container.get_attribute("textContent").strip(),
        "Delete Confirmation",
    )

test_example_input_one_deselect_multiple_select_test(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies deselect in Multiple Select Test dropdown in example input one

Source code in tests/ui/test_input_page.py
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_deselect_multiple_select_test(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies deselect in Multiple Select Test dropdown in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    selected_values = ["A", "B"]
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.multiple_select_test.deselect_all()
    for each in selected_values:
        input_page.entity1.multiple_select_test.select(each)
    input_page.entity1.multiple_select_test.deselect("A")
    self.assert_util(input_page.entity1.multiple_select_test.get_values, ["B"])

test_example_input_one_edit_cancel_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies cancel functionality at time of edit

Source code in tests/ui/test_input_page.py
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_edit_cancel_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies cancel functionality at time of edit"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.edit_row("dummy_input_one")
    self.assert_util(input_page.entity1.cancel, True)

test_example_input_one_edit_close_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies close functionality at time of edit

Source code in tests/ui/test_input_page.py
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_edit_close_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies close functionality at time of edit"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.edit_row("dummy_input_one")
    self.assert_util(input_page.entity1.close, True)

test_example_input_one_edit_frontend_backend_validation(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies the frontend and backend edit functionality of the example input one entity

Source code in tests/ui/test_input_page.py
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
@pytest.mark.sanity_test
def test_example_input_one_edit_frontend_backend_validation(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies the frontend and backend edit functionality of the example input one entity"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.edit_row("dummy_input_one")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.example_checkbox.uncheck()
    input_page.entity1.example_radio.select("No")
    input_page.entity1.single_select_group_test.select("four")
    input_page.entity1.multiple_select_test.deselect("b")
    input_page.entity1.interval.set_value("3600")
    input_page.entity1.index.select("main")
    input_page.entity1.example_account.select("test_input")
    input_page.entity1.object.set_value("edit_object")
    input_page.entity1.object_fields.set_value("edit_field")
    input_page.entity1.order_by.set_value("LastDate")
    input_page.entity1.limit.set_value("2000")
    input_page.entity1.query_start_date.set_value("2020-20-20T20:20:20.000z")
    input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
    self.assert_util(input_page.entity1.save, True)
    input_page.table.wait_for_rows_to_appear(1)
    self.assert_util(
        input_page.table.get_table()["dummy_input_one"],
        {
            "name": "dummy_input_one",
            "account": "test_input",
            "interval": "3600",
            "index": "main",
            "status": "Active",
            "actions": "Edit | Clone | Search | Delete",
        },
    )
    value_to_test = {
        "account": "test_input",
        "input_one_checkbox": "0",
        "input_one_radio": "0",
        "interval": "3600",
        "index": "main",
        "limit": "2000",
        "multipleSelectTest": "a",
        "object": "edit_object",
        "object_fields": "edit_field",
        "order_by": "LastDate",
        "singleSelectTest": "four",
        "start_date": "2020-20-20T20:20:20.000z",
        "example_textarea_field": "line1\nline2\nline3\nline4\nline5",
        "disabled": 0,
    }
    backend_stanza = input_page.backend_conf.get_stanza(
        "example_input_one://dummy_input_one"
    )
    for each_key, each_value in value_to_test.items():
        self.assert_util(each_key, backend_stanza, operator="in")
        self.assert_util(each_value, backend_stanza[each_key])

test_example_input_one_edit_uneditable_field_name(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies the frontend uneditable fields at time of edit of the example input one entity

Source code in tests/ui/test_input_page.py
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_edit_uneditable_field_name(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies the frontend uneditable fields at time of edit of the example input one entity"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.edit_row("dummy_input_one")
    self.assert_util(input_page.entity1.name.is_editable, False)

test_example_input_one_edit_valid_title(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies the title of the ‘Edit Entity’

Source code in tests/ui/test_input_page.py
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_edit_valid_title(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies the title of the 'Edit Entity'"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.edit_row("dummy_input_one")
    self.assert_util(
        input_page.entity1.title.container.get_attribute("textContent").strip(),
        "Update Example Input One",
    )

test_example_input_one_fields_label_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies example input one field label

Source code in tests/ui/test_input_page.py
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_fields_label_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies example input one field label"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    self.assert_util(input_page.entity1.name.get_input_label, "Name")
    self.assert_util(
        input_page.entity1.example_checkbox.get_input_label, "Example Checkbox"
    )
    self.assert_util(
        input_page.entity1.example_radio.get_input_label, "Example Radio"
    )
    self.assert_util(
        input_page.entity1.single_select_group_test.get_input_label,
        "Single Select Group Test",
    )
    self.assert_util(
        input_page.entity1.multiple_select_test.get_input_label,
        "Multiple Select Test",
    )
    self.assert_util(input_page.entity1.interval.get_input_label, "Interval")
    self.assert_util(input_page.entity1.index.get_input_label, "Index")
    self.assert_util(
        input_page.entity1.example_account.get_input_label, "Example Account"
    )
    self.assert_util(input_page.entity1.object.get_input_label, "Object")
    self.assert_util(
        input_page.entity1.object_fields.get_input_label, "Object Fields"
    )
    self.assert_util(input_page.entity1.order_by.get_input_label, "Order By")
    self.assert_util(
        input_page.entity1.query_start_date.get_input_label, "Query Start Date"
    )
    self.assert_util(input_page.entity1.limit.get_input_label, "Limit")
    self.assert_util(
        input_page.entity1.text_area.get_input_label, "Example Textarea Field"
    )

Verifies whether the help link redirects to the correct URL

Source code in tests/ui/test_input_page.py
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_help_link(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies whether the help link redirects to the correct URL"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    go_to_link = "https://docs.splunk.com/Documentation"
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    with input_page.entity1.help_link.open_link():
        self.assert_util(input_page.entity1.help_link.get_current_url, go_to_link)

test_example_input_one_help_text_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies help text for the field name

Source code in tests/ui/test_input_page.py
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_help_text_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies help text for the field name"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    self.assert_util(
        input_page.entity1.name.get_help_text, "A unique name for the data input."
    )
    self.assert_util(
        input_page.entity1.example_checkbox.get_help_text,
        "This is an example checkbox for the input one entity",
    )
    self.assert_util(
        input_page.entity1.example_radio.get_help_text,
        "This is an example radio button for the input one entity",
    )
    self.assert_util(
        input_page.entity1.interval.get_help_text,
        "Time interval of the data input, in seconds.",
    )
    self.assert_util(
        input_page.entity1.object.get_help_text,
        "The name of the object to query for.",
    )
    self.assert_util(
        input_page.entity1.object_fields.get_help_text,
        "Object fields from which to collect data. Delimit multiple fields using a comma.",
    )
    self.assert_util(
        input_page.entity1.query_start_date.get_help_text,
        "The datetime after which to query and index records, "
        'in this format: "YYYY-MM-DDThh:mm:ss.000z". Defaults to 90 days '
        "earlier from now.",
    )
    self.assert_util(
        input_page.entity1.limit.get_help_text,
        "The maximum number of results returned by the query.",
    )
    self.assert_util(
        input_page.entity1.order_by.get_help_text,
        "The datetime field by which to query results in ascending order for indexing.",
    )
    self.assert_util(input_page.entity1.text_area.get_help_text, "Help message")

test_example_input_one_list_multiple_select_test(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies values of Multiple Select Test dropdown in example input one

Source code in tests/ui/test_input_page.py
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_list_multiple_select_test(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies values of Multiple Select Test dropdown in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.multiple_select_test.deselect_all()
    multiple_select_test = ["A", "B"]
    self.assert_util(
        input_page.entity1.multiple_select_test.list_of_values(),
        multiple_select_test,
    )

test_example_input_one_list_single_select_group_test(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies values Single Select Group Test dropdown in example input one

Source code in tests/ui/test_input_page.py
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_list_single_select_group_test(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies values Single Select Group Test dropdown in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    single_select_group_test_list = ["One", "Two", "Three", "Four"]
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    self.assert_util(
        input_page.entity1.single_select_group_test.list_of_values(),
        single_select_group_test_list,
    )

test_example_input_one_required_field_example_account(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies required field Example Account in example input one

Source code in tests/ui/test_input_page.py
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_required_field_example_account(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies required field Example Account in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.name.set_value("dummy_input")
    input_page.entity1.example_radio.select("Yes")
    input_page.entity1.single_select_group_test.select("Two")
    input_page.entity1.interval.set_value("90")
    input_page.entity1.object.set_value("test_object")
    input_page.entity1.object_fields.set_value("test_field")
    input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
    input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
    self.assert_util(
        input_page.entity1.save,
        r"Field Example Account is required",
        left_args={"expect_error": True},
    )

test_example_input_one_required_field_index(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies required field index in example input one

Source code in tests/ui/test_input_page.py
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_required_field_index(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies required field index in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.name.set_value("dummy_input")
    input_page.entity1.example_radio.select("Yes")
    input_page.entity1.single_select_group_test.select("Two")
    input_page.entity1.interval.set_value("90")
    input_page.entity1.example_account.select("test_input")
    input_page.entity1.object.set_value("test_object")
    input_page.entity1.object_fields.set_value("test_field")
    input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
    input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
    input_page.entity1.index.cancel_selected_value()
    self.assert_util(
        input_page.entity1.save,
        r"Field Index is required",
        left_args={"expect_error": True},
    )

test_example_input_one_required_field_interval(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies required field interval in example input one

Source code in tests/ui/test_input_page.py
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_required_field_interval(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies required field interval in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.name.set_value("dummy_input")
    input_page.entity1.example_radio.select("Yes")
    input_page.entity1.single_select_group_test.select("Two")
    input_page.entity1.example_account.select("test_input")
    input_page.entity1.object.set_value("test_object")
    input_page.entity1.object_fields.set_value("test_field")
    input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
    input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
    self.assert_util(
        input_page.entity1.save,
        r"Field Interval is required",
        left_args={"expect_error": True},
    )

test_example_input_one_required_field_name(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies required field name in example input one

Source code in tests/ui/test_input_page.py
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_required_field_name(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies required field name in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.example_radio.select("Yes")
    input_page.entity1.single_select_group_test.select("two")
    input_page.entity1.interval.set_value("90")
    input_page.entity1.example_account.select("test_input")
    input_page.entity1.object.set_value("test_object")
    input_page.entity1.object_fields.set_value("test_field")
    input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
    input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
    self.assert_util(
        input_page.entity1.save,
        r"Field Name is required",
        left_args={"expect_error": True},
    )

test_example_input_one_required_field_object(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies required field Object in example input one

Source code in tests/ui/test_input_page.py
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_required_field_object(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies required field Object in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.name.set_value("dummy_input")
    input_page.entity1.example_radio.select("Yes")
    input_page.entity1.single_select_group_test.select("Two")
    input_page.entity1.interval.set_value("90")
    input_page.entity1.example_account.select("test_input")
    input_page.entity1.object_fields.set_value("test_field")
    input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
    input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
    self.assert_util(
        input_page.entity1.save,
        r"Field Object is required",
        left_args={"expect_error": True},
    )

test_example_input_one_required_field_object_fields(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies required field Object Fields in example input one

Source code in tests/ui/test_input_page.py
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_required_field_object_fields(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies required field Object Fields in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.name.set_value("dummy_input")
    input_page.entity1.example_radio.select("Yes")
    input_page.entity1.single_select_group_test.select("Two")
    input_page.entity1.interval.set_value("90")
    input_page.entity1.example_account.select("test_input")
    input_page.entity1.object.set_value("test_object")
    input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
    input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
    self.assert_util(
        input_page.entity1.save,
        r"Field Object Fields is required",
        left_args={"expect_error": True},
    )

test_example_input_one_required_field_order_by(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies required field Order By in example input one

Source code in tests/ui/test_input_page.py
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_required_field_order_by(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies required field Order By in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.name.set_value("dummy_input")
    input_page.entity1.example_radio.select("Yes")
    input_page.entity1.interval.set_value("90")
    input_page.entity1.example_account.select("test_input")
    input_page.entity1.single_select_group_test.select("Two")
    input_page.entity1.object.set_value("test_object")
    input_page.entity1.object_fields.set_value("test_field")
    input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
    input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
    input_page.entity1.order_by.set_value("")
    self.assert_util(
        input_page.entity1.save,
        r"Field Order By is required",
        left_args={"expect_error": True},
    )

test_example_input_one_required_field_textarea(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies required field textarea in example input one

Source code in tests/ui/test_input_page.py
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_required_field_textarea(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies required field textarea in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.name.set_value("dummy_input")
    input_page.entity1.example_radio.select("Yes")
    input_page.entity1.single_select_group_test.select("Two")
    input_page.entity1.interval.set_value("90")
    input_page.entity1.example_account.select("test_input")
    input_page.entity1.object.set_value("test_object")
    input_page.entity1.object_fields.set_value("test_field")
    input_page.entity1.query_start_date.set_value("2020-12-11T20:00:32.000z")
    input_page.entity1.text_area.set_value("")
    self.assert_util(
        input_page.entity1.save,
        r"Field Example Textarea Field is required",
        left_args={"expect_error": True},
    )

test_example_input_one_search_value_multiple_select_test(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies multiple select search functionality properly

Source code in tests/ui/test_input_page.py
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_search_value_multiple_select_test(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies multiple select search functionality properly"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.multiple_select_test.deselect_all()
    self.assert_util(
        input_page.entity1.multiple_select_test.search_get_list,
        ["A"],
        left_args={"value": "A"},
    )

test_example_input_one_search_value_single_select_group_test(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies singleSelect search functionality

Source code in tests/ui/test_input_page.py
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_search_value_single_select_group_test(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies singleSelect search functionality"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    self.assert_util(
        input_page.entity1.single_select_group_test.search_get_list,
        ["one", "One"],
        left_args={"value": "one"},
    )

test_example_input_one_select_multiple_values_multiple_select_test(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies selected multiple values of Multiple Select Test dropdown in example input one

Source code in tests/ui/test_input_page.py
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_select_multiple_values_multiple_select_test(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies selected multiple values of Multiple Select Test dropdown in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    selected_values = ["A", "B"]
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.multiple_select_test.deselect_all()
    for each in selected_values:
        input_page.entity1.multiple_select_test.select(each)
    self.assert_util(
        input_page.entity1.multiple_select_test.get_values, selected_values
    )

test_example_input_one_select_value_example_radio(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies selected value of example radio in example input one

Source code in tests/ui/test_input_page.py
640
641
642
643
644
645
646
647
648
649
650
651
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_select_value_example_radio(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies selected value of example radio in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.example_radio.select("No")
    self.assert_util(input_page.entity1.example_radio.get_value, "No")

test_example_input_one_select_value_multiple_select_test(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies selected single value of Multiple Select Test dropdown in example input one

Source code in tests/ui/test_input_page.py
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_select_value_multiple_select_test(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies selected single value of Multiple Select Test dropdown in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    selected_value = ["A"]
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.multiple_select_test.deselect_all()
    for each in selected_value:
        input_page.entity1.multiple_select_test.select(each)
    self.assert_util(
        input_page.entity1.multiple_select_test.get_values, selected_value
    )

test_example_input_one_select_value_single_select_group_test(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies selected value of Single Select Group Test dropdown in example input one

Source code in tests/ui/test_input_page.py
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_select_value_single_select_group_test(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies selected value of Single Select Group Test dropdown in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    selected_value = "Two"
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.single_select_group_test.select(selected_value)
    self.assert_util(
        input_page.entity1.single_select_group_test.get_value, selected_value
    )

test_example_input_one_unchecked_example_checkbox(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies Uncheck in example checkbox in example input one

Source code in tests/ui/test_input_page.py
602
603
604
605
606
607
608
609
610
611
612
613
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_unchecked_example_checkbox(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies Uncheck in example checkbox in example input one"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.example_checkbox.check()
    self.assert_util(input_page.entity1.example_checkbox.uncheck, True)

test_example_input_one_valid_input_interval(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies whether adding non numeric values, interval field displays validation error

Source code in tests/ui/test_input_page.py
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_valid_input_interval(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies whether adding non numeric values, interval field displays validation error"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.example_account.select("test_input")
    input_page.entity1.object.set_value("test_object")
    input_page.entity1.name.set_value("test_name")
    input_page.entity1.object_fields.set_value("test_field")
    input_page.entity1.interval.set_value("abc")
    self.assert_util(
        input_page.entity1.save,
        r"Interval must be either a non-negative number, CRON interval or -1.",
        left_args={"expect_error": True},
    )

test_example_input_one_valid_input_name(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies whether adding special characters, name field displays validation error

Source code in tests/ui/test_input_page.py
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_valid_input_name(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies whether adding special characters, name field displays validation error"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.name.set_value("$$test_name")
    self.assert_util(
        input_page.entity1.save,
        r"Input Name must begin with a letter and consist exclusively of alphanumeric characters and underscores.",
        left_args={"expect_error": True},
    )

test_example_input_one_valid_input_query_start_date(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies whether adding wrong format, Query Start Date field displays validation error

Source code in tests/ui/test_input_page.py
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_valid_input_query_start_date(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies whether adding wrong format, Query Start Date field displays validation error"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.name.set_value("test_name")
    input_page.entity1.interval.set_value("120")
    input_page.entity1.example_account.select("test_input")
    input_page.entity1.object.set_value("test_object")
    input_page.entity1.object_fields.set_value("test_object_field")
    input_page.entity1.query_start_date.set_value("2020/01/01")
    input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")
    self.assert_util(
        input_page.entity1.save,
        r"Invalid date and time format",
        left_args={"expect_error": True},
    )

test_example_input_one_valid_length_name(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies the name field should not be more than 100 characters

Source code in tests/ui/test_input_page.py
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_one_valid_length_name(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies the name field should not be more than 100 characters"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    name_value = "a" * 101
    input_page.entity1.name.set_value(name_value)
    self.assert_util(
        input_page.entity1.save,
        r"Length of input name should be between 1 and 100",
        left_args={"expect_error": True},
    )

test_example_input_two_add_cancel_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies cancel functionality at time of add

Source code in tests/ui/test_input_page.py
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_add_cancel_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies cancel functionality at time of add"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    self.assert_util(input_page.entity2.cancel, True)

test_example_input_two_add_close_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies close functionality at time of add

Source code in tests/ui/test_input_page.py
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_add_close_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies close functionality at time of add"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    self.assert_util(input_page.entity2.close, True)

test_example_input_two_add_duplicate_names(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies by saving an entity with duplicate name it displays and error

Source code in tests/ui/test_input_page.py
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_add_duplicate_names(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies by saving an entity with duplicate name it displays and error"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    input_name = "dummy_input_two"
    input_page.entity2.name.set_value(input_name)
    self.assert_util(
        input_page.entity2.save,
        f"Name {input_name} is already in use",
        left_args={"expect_error": True},
    )

test_example_input_two_add_frontend_backend_validation(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies the frontend and backend after adding an Example Input Two

Source code in tests/ui/test_input_page.py
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
@pytest.mark.sanity_test
def test_example_input_two_add_frontend_backend_validation(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies the frontend and backend after adding an Example Input Two"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.name.set_value("dummy_input")
    input_page.entity2.example_checkbox.check()
    input_page.entity2.example_radio.select("No")
    input_page.entity2.example_multiple_select.select("Option One")
    input_page.entity2.example_multiple_select.select("Option Two")
    input_page.entity2.index.select("main")
    input_page.entity2.interval.set_value("90")
    input_page.entity2.example_account.select("test_input")
    input_page.entity2.query_start_date.set_value("2020-12-11T20:00:32.000z")
    self.assert_util(input_page.entity2.save, True)
    input_page.table.wait_for_rows_to_appear(1)
    self.assert_util(
        input_page.table.get_table()["dummy_input"],
        {
            "name": "dummy_input",
            "account": "test_input",
            "interval": "90",
            "index": "main",
            "status": "Active",
            "actions": "Edit | Clone | Search | Delete",
        },
    )
    value_to_test = {
        "account": "test_input",
        "index": "main",
        "input_two_checkbox": "1",
        "input_two_radio": "0",
        "interval": "90",
        "input_two_multiple_select": "one,two",
        "start_date": "2020-12-11T20:00:32.000z",
        "disabled": 0,
    }
    backend_stanza = input_page.backend_conf.get_stanza(
        "example_input_two://dummy_input"
    )
    for each_key, each_value in value_to_test.items():
        self.assert_util(each_key, backend_stanza, operator="in")
        self.assert_util(each_value, backend_stanza[each_key])

test_example_input_two_add_valid_title(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies the title of the ‘Add Entity’

Source code in tests/ui/test_input_page.py
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_add_valid_title(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies the title of the 'Add Entity'"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    self.assert_util(
        input_page.entity2.title.container.get_attribute("textContent").strip(),
        "Add Example Input Two",
    )

test_example_input_two_checked_example_checkbox(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies Check in example checkbox in Example Input Two

Source code in tests/ui/test_input_page.py
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_checked_example_checkbox(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies Check in example checkbox in Example Input Two"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    self.assert_util(input_page.entity2.example_checkbox.check, True)

test_example_input_two_clone_cancel_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies cancel functionality at time of clone

Source code in tests/ui/test_input_page.py
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_clone_cancel_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies cancel functionality at time of clone"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.clone_row("dummy_input_two")
    self.assert_util(input_page.entity2.cancel, True)

test_example_input_two_clone_close_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies close functionality at time of clone

Source code in tests/ui/test_input_page.py
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_clone_close_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies close functionality at time of clone"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.clone_row("dummy_input_two")
    self.assert_util(input_page.entity2.close, True)

test_example_input_two_clone_default_values(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies the frontend default fields at time of clone for Example Input Two entity

Source code in tests/ui/test_input_page.py
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_clone_default_values(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies the frontend default fields at time of clone for Example Input Two entity"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.clone_row("dummy_input_two")
    input_page.entity2.example_account.wait_for_values()
    self.assert_util(input_page.entity2.name.get_value, "")
    self.assert_util(input_page.entity2.example_checkbox.is_checked, True)
    self.assert_util(input_page.entity2.example_radio.get_value, "No")
    self.assert_util(
        input_page.entity2.example_multiple_select.get_values,
        ["Option One", "Option Two"],
    )
    self.assert_util(input_page.entity2.interval.get_value, "100")
    self.assert_util(input_page.entity2.index.get_value, "main")
    self.assert_util(input_page.entity2.example_account.get_value, "test_input")
    self.assert_util(
        input_page.entity2.query_start_date.get_value, "2016-10-10T12:10:15.000z"
    )

test_example_input_two_clone_duplicate_names(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies by saving an entity with duplicate name at time of clone it displays and error

Source code in tests/ui/test_input_page.py
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_clone_duplicate_names(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies by saving an entity with duplicate name at time of clone it displays and error"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.clone_row("dummy_input_two")
    input_page.entity2.example_account.wait_for_values()
    input_name = "dummy_input_two"
    input_page.entity2.name.set_value(input_name)
    self.assert_util(
        input_page.entity2.save,
        f"Name {input_name} is already in use",
        left_args={"expect_error": True},
    )

test_example_input_two_clone_frontend_backend_validation(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies the frontend and backend clone functionality of the Example Input Two entity

Source code in tests/ui/test_input_page.py
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
@pytest.mark.sanity_test
def test_example_input_two_clone_frontend_backend_validation(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies the frontend and backend clone functionality of the Example Input Two entity"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.wait_for_rows_to_appear(1)
    input_page.table.clone_row("dummy_input_two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.name.set_value("dummy_input_two_Clone_Test")
    input_page.entity2.interval.set_value("180")
    self.assert_util(input_page.entity2.save, True)
    input_page.table.wait_for_rows_to_appear(2)
    self.assert_util(
        input_page.table.get_table()["dummy_input_two_Clone_Test"],
        {
            "name": "dummy_input_two_Clone_Test",
            "account": "test_input",
            "interval": "180",
            "index": "main",
            "status": "Active",
            "actions": "Edit | Clone | Search | Delete",
        },
    )
    value_to_test = {
        "account": "test_input",
        "input_two_checkbox": "1",
        "input_two_radio": "0",
        "interval": "180",
        "index": "main",
        "input_two_multiple_select": "one,two",
        "start_date": "2016-10-10T12:10:15.000z",
        "disabled": 0,
    }
    backend_stanza = input_page.backend_conf.get_stanza(
        "example_input_two://dummy_input_two_Clone_Test"
    )
    for each_key, each_value in value_to_test.items():
        self.assert_util(each_key, backend_stanza, operator="in")
        self.assert_util(each_value, backend_stanza[each_key])

test_example_input_two_clone_valid_input_name(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies whether adding special characters, name field displays validation error while cloning a row

Source code in tests/ui/test_input_page.py
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_clone_valid_input_name(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies whether adding special characters, name field displays validation error while cloning a row"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.clone_row("dummy_input_two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.name.set_value("$$test_name_two")
    self.assert_util(
        input_page.entity2.save,
        r"Input Name must begin with a letter and consist exclusively of alphanumeric characters and underscores.",
        left_args={"expect_error": True},
    )

test_example_input_two_clone_valid_title(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies the title of the ‘Clone Entity’

Source code in tests/ui/test_input_page.py
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_clone_valid_title(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies the title of the 'Clone Entity'"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.clone_row("dummy_input_two")
    input_page.entity2.example_account.wait_for_values()
    self.assert_util(
        input_page.entity2.title.container.get_attribute("textContent").strip(),
        "Clone Example Input Two",
    )

test_example_input_two_default_value_index(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies default value of field index in Example Input Two

Source code in tests/ui/test_input_page.py
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_default_value_index(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies default value of field index in Example Input Two"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    default_index = "default"
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    self.assert_util(input_page.entity2.index.get_value, default_index)

test_example_input_two_delete_cancel_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies cancel functionality at time of delete

Source code in tests/ui/test_input_page.py
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_delete_cancel_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies cancel functionality at time of delete"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    self.assert_util(
        input_page.table.delete_row,
        True,
        left_args={"name": "dummy_input_two", "cancel": True},
    )

test_example_input_two_delete_close_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies close functionality at time of delete

Source code in tests/ui/test_input_page.py
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_delete_close_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies close functionality at time of delete"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    self.assert_util(
        input_page.table.delete_row,
        True,
        left_args={"name": "dummy_input_two", "close": True},
    )

test_example_input_two_delete_row_frontend_backend_validation(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies the frontend and backend delete functionality

Source code in tests/ui/test_input_page.py
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
@pytest.mark.sanity_test
def test_example_input_two_delete_row_frontend_backend_validation(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies the frontend and backend delete functionality"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.input_status_toggle("dummy_input_two", enable=False)
    input_page.table.delete_row("dummy_input_two")
    input_page.table.wait_for_rows_to_appear(0)
    self.assert_util("dummy_input_two", input_page.table.get_table, "not in")
    self.assert_util(
        "example_input_two://dummy_input_two",
        input_page.backend_conf.get_all_stanzas().keys(),
        "not in",
    )

test_example_input_two_delete_valid_prompt_message(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies the prompt message of the ‘Delete Entity’

Source code in tests/ui/test_input_page.py
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_delete_valid_prompt_message(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies the prompt message of the 'Delete Entity'"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_name = "dummy_input_two"
    prompt_message = input_page.table.delete_row("dummy_input_two", prompt_msg=True)
    self.assert_util(
        prompt_message, f'Are you sure you want to delete "{input_name}" ?'
    )

test_example_input_two_delete_valid_title(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies the title of the ‘Delete Entity’

Source code in tests/ui/test_input_page.py
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_delete_valid_title(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies the title of the 'Delete Entity'"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.delete_row("dummy_input_two", prompt_msg=True)
    self.assert_util(
        input_page.entity2.title.container.get_attribute("textContent").strip(),
        "Delete Confirmation",
    )

test_example_input_two_edit_cancel_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies cancel functionality at time of edit

Source code in tests/ui/test_input_page.py
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_edit_cancel_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies cancel functionality at time of edit"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.edit_row("dummy_input_two")
    self.assert_util(input_page.entity2.cancel, True)

test_example_input_two_edit_close_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies close functionality at time of edit

Source code in tests/ui/test_input_page.py
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_edit_close_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies close functionality at time of edit"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.edit_row("dummy_input_two")
    self.assert_util(input_page.entity2.close, True)

test_example_input_two_edit_frontend_backend_validation(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies the frontend and backend edit functionality of the Example Input Two entity

Source code in tests/ui/test_input_page.py
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
@pytest.mark.sanity_test
def test_example_input_two_edit_frontend_backend_validation(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies the frontend and backend edit functionality of the Example Input Two entity"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.edit_row("dummy_input_two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.example_checkbox.uncheck()
    input_page.entity2.example_radio.select("Yes")
    input_page.entity2.example_account.select("test_input")
    input_page.entity2.example_multiple_select.deselect("Option One")
    input_page.entity2.interval.set_value("3600")
    input_page.entity2.query_start_date.set_value("2020-20-20T20:20:20.000z")
    self.assert_util(input_page.entity2.save, True)
    input_page.table.wait_for_rows_to_appear(1)
    self.assert_util(
        input_page.table.get_table()["dummy_input_two"],
        {
            "name": "dummy_input_two",
            "account": "test_input",
            "interval": "3600",
            "index": "main",
            "status": "Active",
            "actions": "Edit | Clone | Search | Delete",
        },
    )
    value_to_test = {
        "account": "test_input",
        "input_two_checkbox": "0",
        "input_two_radio": "1",
        "interval": "3600",
        "index": "main",
        "input_two_multiple_select": "two",
        "start_date": "2020-20-20T20:20:20.000z",
        "disabled": 0,
    }
    backend_stanza = input_page.backend_conf.get_stanza(
        "example_input_two://dummy_input_two"
    )
    for each_key, each_value in value_to_test.items():
        self.assert_util(each_key, backend_stanza, operator="in")
        self.assert_util(each_value, backend_stanza[each_key])

test_example_input_two_edit_uneditable_field_name(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies the frontend uneditable fields at time of edit of the Example Input Two entity

Source code in tests/ui/test_input_page.py
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_edit_uneditable_field_name(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies the frontend uneditable fields at time of edit of the Example Input Two entity"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.edit_row("dummy_input_two")
    input_page.entity2.example_account.wait_for_values()
    self.assert_util(input_page.entity2.name.is_editable, False)

test_example_input_two_edit_valid_title(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two)

Verifies the title of the ‘Edit Entity’

Source code in tests/ui/test_input_page.py
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_edit_valid_title(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_two
):
    """Verifies the title of the 'Edit Entity'"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.edit_row("dummy_input_two")
    input_page.entity2.example_account.wait_for_values()
    self.assert_util(
        input_page.entity2.title.container.get_attribute("textContent").strip(),
        "Update Example Input Two",
    )

test_example_input_two_fields_label_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies example input two field label

Source code in tests/ui/test_input_page.py
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_fields_label_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies example input two field label"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    self.assert_util(input_page.entity2.name.get_input_label, "Name")
    self.assert_util(input_page.entity2.interval.get_input_label, "Interval")
    self.assert_util(input_page.entity2.index.get_input_label, "Index")
    self.assert_util(
        input_page.entity2.example_account.get_input_label, "Example Account"
    )
    self.assert_util(
        input_page.entity2.example_multiple_select.get_input_label,
        "Example Multiple Select",
    )
    self.assert_util(
        input_page.entity2.example_checkbox.get_input_label, "Example Checkbox"
    )
    self.assert_util(
        input_page.entity2.example_radio.get_input_label, "Example Radio"
    )
    self.assert_util(
        input_page.entity2.query_start_date.get_input_label, "Query Start Date"
    )

test_example_input_two_help_text_entity(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies help text for the field name

Source code in tests/ui/test_input_page.py
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_help_text_entity(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies help text for the field name"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    self.assert_util(
        input_page.entity2.example_multiple_select.get_help_text,
        "This is an example multipleSelect for input two entity",
    )
    self.assert_util(
        input_page.entity2.name.get_help_text, "A unique name for the data input."
    )
    self.assert_util(
        input_page.entity2.interval.get_help_text,
        "Time interval of the data input, in seconds.",
    )
    self.assert_util(
        input_page.entity2.example_checkbox.get_help_text,
        "This is an example checkbox for the input two entity",
    )
    self.assert_util(
        input_page.entity2.example_radio.get_help_text,
        "This is an example radio button for the input two entity",
    )

test_example_input_two_list_example_multiple_select(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies values of Multiple Select Test dropdown in Example Input Two

Source code in tests/ui/test_input_page.py
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_list_example_multiple_select(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies values of Multiple Select Test dropdown in Example Input Two"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    example_multiple_select_list = ["Option One", "Option Two"]
    self.assert_util(
        input_page.entity2.example_multiple_select.list_of_values(),
        example_multiple_select_list,
    )

test_example_input_two_required_field_example_example_account(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies required field Account in Example Input Two

Source code in tests/ui/test_input_page.py
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_required_field_example_example_account(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies required field Account in Example Input Two"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.name.set_value("dummy_input")
    input_page.entity2.example_checkbox.check()
    input_page.entity2.example_radio.select("No")
    input_page.entity2.example_multiple_select.select("Option One")
    input_page.entity2.index.select("main")
    input_page.entity2.interval.set_value("90")
    input_page.entity2.query_start_date.set_value("2020-12-11T20:00:32.000z")
    self.assert_util(
        input_page.entity2.save,
        r"Field Example Account is required",
        left_args={"expect_error": True},
    )

test_example_input_two_required_field_example_multiple_select(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies required field Example Multiple Select in Example Input Two

Source code in tests/ui/test_input_page.py
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_required_field_example_multiple_select(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies required field Example Multiple Select in Example Input Two"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.name.set_value("dummy_input")
    input_page.entity2.example_checkbox.check()
    input_page.entity2.example_radio.select("No")
    input_page.entity2.index.select("main")
    input_page.entity2.interval.set_value("90")
    input_page.entity2.example_account.select("test_input")
    input_page.entity2.query_start_date.set_value("2020-12-11T20:00:32.000z")
    self.assert_util(
        input_page.entity2.save,
        r"Field Example Multiple Select is required",
        left_args={"expect_error": True},
    )

test_example_input_two_required_field_example_radio(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies default value of example radio in Example Input Two

Source code in tests/ui/test_input_page.py
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_required_field_example_radio(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies default value of example radio in Example Input Two"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.name.set_value("dummy_input")
    input_page.entity2.example_checkbox.check()
    input_page.entity2.example_multiple_select.select("Option One")
    input_page.entity2.index.select("main")
    input_page.entity2.interval.set_value("90")
    input_page.entity2.example_account.select("test_input")
    input_page.entity2.query_start_date.set_value("2020-12-11T20:00:32.000z")
    self.assert_util(
        input_page.entity2.save,
        r"Field Example Radio is required",
        left_args={"expect_error": True},
    )

test_example_input_two_required_field_index(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies required field index in Example Input Two

Source code in tests/ui/test_input_page.py
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_required_field_index(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies required field index in Example Input Two"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.name.set_value("dummy_input")
    input_page.entity2.example_checkbox.check()
    input_page.entity2.example_account.select("test_input")
    input_page.entity2.example_radio.select("No")
    input_page.entity2.example_multiple_select.select("Option One")
    input_page.entity2.interval.set_value("90")
    input_page.entity2.query_start_date.set_value("2020-12-11T20:00:32.000z")
    input_page.entity2.index.cancel_selected_value()
    self.assert_util(
        input_page.entity2.save,
        r"Field Index is required",
        left_args={"expect_error": True},
    )

test_example_input_two_required_field_interval(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies required field interval in Example Input Two

Source code in tests/ui/test_input_page.py
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_required_field_interval(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies required field interval in Example Input Two"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.name.set_value("dummy_input")
    input_page.entity2.example_checkbox.check()
    input_page.entity2.example_radio.select("No")
    input_page.entity2.example_multiple_select.select("Option One")
    input_page.entity2.index.select("main")
    input_page.entity2.example_account.select("test_input")
    input_page.entity2.query_start_date.set_value("2020-12-11T20:00:32.000z")
    self.assert_util(
        input_page.entity2.save,
        r"Field Interval is required",
        left_args={"expect_error": True},
    )

test_example_input_two_required_field_name(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies required field name in Example Input Two

Source code in tests/ui/test_input_page.py
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_required_field_name(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies required field name in Example Input Two"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.example_checkbox.check()
    input_page.entity2.example_radio.select("No")
    input_page.entity2.example_multiple_select.select("Option One")
    input_page.entity2.index.select("main")
    input_page.entity2.interval.set_value("90")
    input_page.entity2.example_account.select("test_input")
    input_page.entity2.query_start_date.set_value("2020-12-11T20:00:32.000z")
    self.assert_util(
        input_page.entity2.save,
        r"Field Name is required",
        left_args={"expect_error": True},
    )
    input_page.entity2.name.set_value("test_name_two")
    self.assert_util(input_page.entity2.is_error_closed, True)

test_example_input_two_select_multiple_values_example_multiple_select(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies selected multiple values of Multiple Select Test dropdown in Example Input Two

Source code in tests/ui/test_input_page.py
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_select_multiple_values_example_multiple_select(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies selected multiple values of Multiple Select Test dropdown in Example Input Two"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    selected_values = ["Option One", "Option Two"]
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.index.select("main")
    for each in selected_values:
        input_page.entity2.example_multiple_select.select(each)
    self.assert_util(
        input_page.entity2.example_multiple_select.get_values, selected_values
    )

test_example_input_two_select_select_value_example_multiple_select(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies selected single value of Multiple Select Test dropdown in Example Input Two

Source code in tests/ui/test_input_page.py
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_select_select_value_example_multiple_select(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies selected single value of Multiple Select Test dropdown in Example Input Two"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    selected_value = ["Option One"]
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.index.select("main")
    for each in selected_value:
        input_page.entity2.example_multiple_select.select(each)
    self.assert_util(
        input_page.entity2.example_multiple_select.get_values, selected_value
    )

test_example_input_two_select_value_example_radio(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies default value of example radio in Example Input Two

Source code in tests/ui/test_input_page.py
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_select_value_example_radio(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies default value of example radio in Example Input Two"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.example_radio.select("No")
    self.assert_util(input_page.entity2.example_radio.get_value, "No")

test_example_input_two_unchecked_example_checkbox(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies Uncheck in example checkbox in Example Input Two

Source code in tests/ui/test_input_page.py
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_unchecked_example_checkbox(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies Uncheck in example checkbox in Example Input Two"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.example_checkbox.check()
    self.assert_util(input_page.entity2.example_checkbox.uncheck, True)

test_example_input_two_valid_input_interval(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies whether adding non numeric values, interval field displays validation error

Source code in tests/ui/test_input_page.py
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_valid_input_interval(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies whether adding non numeric values, interval field displays validation error"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.name.set_value("test_name_two")
    input_page.entity2.interval.set_value("abc")
    self.assert_util(
        input_page.entity2.save,
        r"Interval must be either a non-negative number, CRON interval or -1.",
        left_args={"expect_error": True},
    )

test_example_input_two_valid_input_name(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies whether adding special characters, name field displays validation error

Source code in tests/ui/test_input_page.py
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_valid_input_name(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies whether adding special characters, name field displays validation error"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.name.set_value("$$test_name_two")
    self.assert_util(
        input_page.entity2.save,
        r"Input Name must begin with a letter and consist exclusively of alphanumeric characters and underscores.",
        left_args={"expect_error": True},
    )

test_example_input_two_valid_input_query_start_date(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies whether adding wrong format, Query Start Date field displays validation error

Source code in tests/ui/test_input_page.py
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_valid_input_query_start_date(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies whether adding wrong format, Query Start Date field displays validation error"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    input_page.entity2.name.set_value("test_name_two")
    input_page.entity2.interval.set_value("120")
    input_page.entity2.example_account.select("test_input")
    input_page.entity2.example_multiple_select.select("Option One")
    input_page.entity2.example_radio.select("Yes")
    input_page.entity2.query_start_date.set_value("2020/01/01")
    self.assert_util(
        input_page.entity2.save,
        r"Invalid date and time format",
        left_args={"expect_error": True},
    )

test_example_input_two_valid_length_name(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies the name field should not be more than 100 characters

Source code in tests/ui/test_input_page.py
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_example_input_two_valid_length_name(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies the name field should not be more than 100 characters"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.create_new_input.select("Example Input Two")
    input_page.entity2.example_account.wait_for_values()
    name_value = "a" * 101
    input_page.entity2.name.set_value(name_value)
    self.assert_util(
        input_page.entity2.save,
        r"Length of input name should be between 1 and 100",
        left_args={"expect_error": True},
    )

test_example_inputs_with_not_valid_interval(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, interval)

Source code in tests/ui/test_input_page.py
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
@pytest.mark.parametrize(
    "interval",
    [
        "-2",
        "0a 0,11 2 */2 *",
        "a b * * *",
    ],
)
def test_example_inputs_with_not_valid_interval(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, interval
):
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    name = "dummy_input"
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.example_account.select("test_input")
    input_page.entity1.object.set_value("test_object")
    input_page.entity1.name.set_value(name)
    input_page.entity1.object_fields.set_value("test_field")
    input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")

    input_page.entity1.interval.set_value(interval)

    self.assert_util(
        input_page.entity2.save,
        "Interval must be either a non-negative number, CRON interval or -1.",
        left_args={"expect_error": True},
    )

test_example_inputs_with_valid_interval(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, interval)

Source code in tests/ui/test_input_page.py
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
@pytest.mark.parametrize(
    "interval",
    [
        "-1",
        "1",
        "0 0,11 2 */2 *",
        "* * * * *",
    ],
)
def test_example_inputs_with_valid_interval(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, interval
):
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    # for input_pos, interval in enumerate(intervals, 1):
    name = "dummy_input"
    input_page.create_new_input.select("Example Input One")
    input_page.entity1.example_account.wait_for_values()
    input_page.entity1.example_account.select("test_input")
    input_page.entity1.object.set_value("test_object")
    input_page.entity1.name.set_value(name)
    input_page.entity1.object_fields.set_value("test_field")
    input_page.entity1.text_area.set_value("line1\nline2\nline3\nline4\nline5")

    input_page.entity1.interval.set_value(interval)

    input_page.entity1.save_btn.click()
    input_page.table.wait_for_rows_to_appear(1)

    self.assert_util(
        input_page.table.get_table()[name],
        {
            "name": name,
            "account": "test_input",
            "interval": interval,
            "index": "default",
            "status": "Active",
            "actions": "Edit | Clone | Search | Delete",
        },
    )

    backend_stanza = input_page.backend_conf.get_stanza(
        f"example_input_one://{name}"
    )
    assert backend_stanza.get("interval") == interval

test_inputs_count(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one, _add_input_two)

Verifies count on table

Source code in tests/ui/test_input_page.py
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_count(
    self,
    ucc_smartx_selenium_helper,
    ucc_smartx_rest_helper,
    _add_input_one,
    _add_input_two,
):
    """Verifies count on table"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    self.assert_util(
        input_page.table.get_count_title,
        f"{input_page.table.get_row_count()} Inputs",
    )

test_inputs_create_new_input_list_values(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies input list dropdown

Source code in tests/ui/test_input_page.py
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_create_new_input_list_values(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies input list dropdown"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    create_new_input_list = [
        "Example Input One",
        "Example Input Two",
        "Example Input Three",
        "Example Input Four",
        "Service hidden for cloud",
    ]
    self.assert_util(
        input_page.create_new_input.get_inputs_list, create_new_input_list
    )

test_inputs_default_rows_in_table(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies the default number of rows in the table

Source code in tests/ui/test_input_page.py
233
234
235
236
237
238
239
240
241
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_default_rows_in_table(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies the default number of rows in the table"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    self.assert_util(input_page.table.get_row_count, 0)

test_inputs_disable_all_close(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies that closing the ‘Deactivate All’ prompt behaves correctly.

Source code in tests/ui/test_input_page.py
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_disable_all_close(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """
    Verifies that closing the 'Deactivate All' prompt behaves correctly.
    """
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.disable_all_inputs()
    self.assert_util(input_page.interact_all_prompt_entity.close, True)

test_inputs_disable_all_deny(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies that when ‘Deactivate All’ is followed by ‘Deny,’ inputs remain enabled.

Source code in tests/ui/test_input_page.py
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_disable_all_deny(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """
    Verifies that when 'Deactivate All' is followed by 'Deny,' inputs remain enabled.
    """
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    inputs_enabled_table = input_page.table.get_table()
    input_page.disable_all_inputs()
    input_page.interact_all_prompt_entity.deny()
    self.assert_util(input_page.table.get_table(), inputs_enabled_table)

test_inputs_disable_all_enable_all_input_one_input_two(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one, _add_input_two)

Verifies that various types of inputs are correctly disabled and enabled when using the ‘Deactivate All’ and ‘Activate All’ buttons. This test covers scenarios with both Input One and Input Two added.

Source code in tests/ui/test_input_page.py
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_disable_all_enable_all_input_one_input_two(
    self,
    ucc_smartx_selenium_helper,
    ucc_smartx_rest_helper,
    _add_input_one,
    _add_input_two,
):
    """
    Verifies that various types of inputs are correctly disabled and enabled
    when using the 'Deactivate All' and 'Activate All' buttons.
    This test covers scenarios with both Input One and Input Two added.
    """
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    inputs_enabled_table = input_page.table.get_table()
    inputs_disabled_table = copy.deepcopy(inputs_enabled_table)
    for i in inputs_disabled_table:
        inputs_disabled_table[i]["status"] = "Inactive"
    input_page.disable_all_inputs()
    input_page.interact_all_prompt_entity.confirm()
    time.sleep(1)
    self.assert_util(input_page.table.get_table(), inputs_disabled_table)
    input_page.enable_all_inputs()
    input_page.interact_all_prompt_entity.confirm()
    time.sleep(1)
    self.assert_util(input_page.table.get_table(), inputs_enabled_table)

test_inputs_disable_all_some_already_disabled(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one, _add_input_two)

Verifies that all inputs are disabled correctly. This test covers scenario where one input is already disabled.

Source code in tests/ui/test_input_page.py
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_disable_all_some_already_disabled(
    self,
    ucc_smartx_selenium_helper,
    ucc_smartx_rest_helper,
    _add_input_one,
    _add_input_two,
):
    """
    Verifies that all inputs are disabled correctly.
    This test covers scenario where one input is already disabled.
    """
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    inputs_enabled_table = input_page.table.get_table()
    inputs_disabled_table = copy.deepcopy(inputs_enabled_table)
    for i in inputs_disabled_table:
        inputs_disabled_table[i]["status"] = "Inactive"
    self.assert_util(
        input_page.table.input_status_toggle,
        True,
        left_args={"name": "dummy_input_one", "enable": False},
    )
    input_page.disable_all_inputs()
    input_page.interact_all_prompt_entity.confirm()
    time.sleep(1)
    self.assert_util(input_page.table.get_table(), inputs_disabled_table)

test_inputs_disable_all_title_message(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies title and message of disable all prompt

Source code in tests/ui/test_input_page.py
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_disable_all_title_message(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies title and message of disable all prompt"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.disable_all_inputs()
    self.assert_util(
        input_page.interact_all_prompt_entity.prompt_title.container.get_attribute(
            "textContent"
        ).strip(),
        "Deactivate all",
    )
    self.assert_util(
        input_page.interact_all_prompt_entity.prompt_message.container.get_attribute(
            "textContent"
        ).strip(),
        "Do you want to deactivate all? It may take a while.",
    )

test_inputs_disable_enable_all(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_multiple_inputs)

Verifies that all inputs are disabled after clicking ‘Deactivate all’

Source code in tests/ui/test_input_page.py
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_disable_enable_all(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_multiple_inputs
):
    """Verifies that all inputs are disabled after clicking 'Deactivate all'"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    inputs_enabled_table = input_page.table.get_table()
    inputs_disabled_table = copy.deepcopy(inputs_enabled_table)
    for i in inputs_disabled_table:
        inputs_disabled_table[i]["status"] = "Inactive"
    input_page.disable_all_inputs()
    input_page.interact_all_prompt_entity.confirm()
    time.sleep(10)
    self.assert_util(input_page.table.get_table(), inputs_disabled_table)
    input_page.enable_all_inputs()
    input_page.interact_all_prompt_entity.confirm()
    time.sleep(10)
    self.assert_util(input_page.table.get_table(), inputs_enabled_table)

test_inputs_displayed_columns(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies headers of input table

Source code in tests/ui/test_input_page.py
129
130
131
132
133
134
135
136
137
138
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_displayed_columns(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies headers of input table"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    header_list = ["Name", "Account", "Interval", "Index", "Status", "Actions"]
    self.assert_util(input_page.table.get_headers, header_list)

test_inputs_enable_all_close(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies that closing the ‘Activate All’ prompt behaves correctly.

Source code in tests/ui/test_input_page.py
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_enable_all_close(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """
    Verifies that closing the 'Activate All' prompt behaves correctly.
    """
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.enable_all_inputs()
    self.assert_util(input_page.interact_all_prompt_entity.close, True)

test_inputs_enable_all_deny(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies that when ‘Activate All’ is followed by ‘Deny,’ inputs remain disabled.

Source code in tests/ui/test_input_page.py
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_enable_all_deny(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """
    Verifies that when 'Activate All' is followed by 'Deny,' inputs remain disabled.
    """
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    inputs_enabled_table = input_page.table.get_table()
    inputs_disabled_table = copy.deepcopy(inputs_enabled_table)
    for i in inputs_disabled_table:
        inputs_disabled_table[i]["status"] = "Inactive"
    input_page.disable_all_inputs()
    input_page.interact_all_prompt_entity.confirm()
    input_page.enable_all_inputs()
    input_page.interact_all_prompt_entity.deny()
    self.assert_util(input_page.table.get_table(), inputs_disabled_table)

test_inputs_enable_all_some_already_enabled(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one, _add_input_two)

Verifies that all inputs are enabled correctly. This test covers scenario where one input is already enabled.

Source code in tests/ui/test_input_page.py
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_enable_all_some_already_enabled(
    self,
    ucc_smartx_selenium_helper,
    ucc_smartx_rest_helper,
    _add_input_one,
    _add_input_two,
):
    """
    Verifies that all inputs are enabled correctly.
    This test covers scenario where one input is already enabled.
    """
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    inputs_enabled_table = input_page.table.get_table()
    self.assert_util(
        input_page.table.input_status_toggle,
        True,
        left_args={"name": "dummy_input_one", "enable": False},
    )
    input_page.enable_all_inputs()
    input_page.interact_all_prompt_entity.confirm()
    time.sleep(1)
    self.assert_util(input_page.table.get_table(), inputs_enabled_table)

test_inputs_enable_all_title_message(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies title and message of enable all prompt

Source code in tests/ui/test_input_page.py
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_enable_all_title_message(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies title and message of enable all prompt"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.enable_all_inputs()
    self.assert_util(
        input_page.interact_all_prompt_entity.prompt_title.container.get_attribute(
            "textContent"
        ).strip(),
        "Activate all",
    )
    self.assert_util(
        input_page.interact_all_prompt_entity.prompt_message.container.get_attribute(
            "textContent"
        ).strip(),
        "Do you want to activate all? It may take a while.",
    )

test_inputs_enable_disable(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies enable and disable functionality of the input

Source code in tests/ui/test_input_page.py
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_enable_disable(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies enable and disable functionality of the input"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    self.assert_util(
        input_page.table.input_status_toggle,
        True,
        left_args={"name": "dummy_input_one", "enable": False},
    )
    self.assert_util(
        input_page.table.get_cell_value,
        "Inactive",
        left_args={"name": "dummy_input_one", "column": "Status"},
    )
    self.assert_util(
        input_page.table.input_status_toggle,
        True,
        left_args={"name": "dummy_input_one", "enable": True},
    )
    self.assert_util(
        input_page.table.get_cell_value,
        "Active",
        left_args={"name": "dummy_input_one", "column": "Status"},
    )

test_inputs_filter_functionality_negative(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one, _add_input_two)

Verifies the filter functionality (Negative)

Source code in tests/ui/test_input_page.py
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_filter_functionality_negative(
    self,
    ucc_smartx_selenium_helper,
    ucc_smartx_rest_helper,
    _add_input_one,
    _add_input_two,
):
    """Verifies the filter functionality (Negative)"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.set_filter("hello")
    self.assert_util(input_page.table.get_row_count, 0)
    self.assert_util(
        input_page.table.get_count_title,
        f"{input_page.table.get_row_count()} Input",
    )
    input_page.table.clean_filter()

test_inputs_filter_functionality_positive(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one, _add_input_two)

Verifies the filter functionality (Positive)

Source code in tests/ui/test_input_page.py
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_filter_functionality_positive(
    self,
    ucc_smartx_selenium_helper,
    ucc_smartx_rest_helper,
    _add_input_one,
    _add_input_two,
):
    """Verifies the filter functionality (Positive)"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.set_filter("dummy")
    self.assert_util(input_page.table.get_row_count, 2)
    self.assert_util(
        input_page.table.get_count_title,
        f"{input_page.table.get_row_count()} Inputs",
    )
    input_page.table.clean_filter()

test_inputs_input_type_list_values(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one, _add_input_two)

Verifies input type filter list

Source code in tests/ui/test_input_page.py
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_input_type_list_values(
    self,
    ucc_smartx_selenium_helper,
    ucc_smartx_rest_helper,
    _add_input_one,
    _add_input_two,
):
    """Verifies input type filter list"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    type_filter_list = [
        "All",
        "Example Input One",
        "Example Input Two",
        "Example Input Three",
        "Example Input Four",
        "Service hidden for cloud",
        "Service hidden for enterprise",
    ]
    self.assert_util(input_page.type_filter.get_input_type_list, type_filter_list)
    input_page.type_filter.select_input_type(
        "Example Input One", open_dropdown=False
    )
    self.assert_util(input_page.table.get_row_count, 1)
    input_page.type_filter.select_input_type("Example Input Two")
    self.assert_util(input_page.table.get_row_count, 1)

test_inputs_more_info(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies the expand functionality of the inputs table

Source code in tests/ui/test_input_page.py
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_more_info(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """Verifies the expand functionality of the inputs table"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    interval = "90"
    self.assert_util(
        input_page.table.get_more_info,
        {
            "Name": "dummy_input_one",
            "Interval": f"{interval} sec",
            "Index": "default",
            "Status": "Active",
            "Example Account": "test_input",
            "Object": "test_object",
            "Object Fields": "test_field",
            "Order By": "LastModifiedDate",
            "Query Start Date": "2020-12-11T20:00:32.000z",
            "Limit": "1000",
        },
        left_args={"name": "dummy_input_one"},
    )
    backend_stanza = input_page.backend_conf.get_stanza(
        "example_input_one://dummy_input_one"
    )
    # we verify that the conf value is `interval` and only the UI has changed
    assert backend_stanza.get("interval") == interval

test_inputs_pagination(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_multiple_inputs)

Verifies pagination functionality by creating 100 accounts

Source code in tests/ui/test_input_page.py
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_pagination(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_multiple_inputs
):
    """Verifies pagination functionality by creating 100 accounts"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.open()
    self.assert_util(
        input_page.pagination.select_page_option,
        True,
        left_args={"value": "50 Per Page"},
    )
    self.assert_util(input_page.table.switch_to_page, True, left_args={"value": 2})
    self.assert_util(input_page.table.switch_to_prev, True)
    self.assert_util(input_page.table.switch_to_next, True)

test_inputs_pagination_list(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies pagination list

Source code in tests/ui/test_input_page.py
140
141
142
143
144
145
146
147
148
149
150
151
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_pagination_list(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies pagination list"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    self.assert_util(
        input_page.pagination.get_pagination_list,
        ["10 Per Page", "25 Per Page", "50 Per Page"],
    )

test_inputs_sort_functionality(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one, _add_input_two)

Verifies sorting functionality for name column

Source code in tests/ui/test_input_page.py
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_sort_functionality(
    self,
    ucc_smartx_selenium_helper,
    ucc_smartx_rest_helper,
    _add_input_one,
    _add_input_two,
):
    """Verifies sorting functionality for name column"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.pagination.select_page_option("50 Per Page")
    input_page.table.sort_column("Name")
    sort_order = input_page.table.get_sort_order()
    column_values = list(input_page.table.get_column_values("Name"))
    column_values = list(str(item) for item in column_values)
    sorted_values = sorted(column_values, key=str.lower)
    self.assert_util(sort_order["header"].lower(), "name")
    self.assert_util(column_values, sorted_values)
    self.assert_util(sort_order["ascending"], True)

test_inputs_textarea_big_input(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies that textarea can handle big inputs

Source code in tests/ui/test_input_page.py
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_textarea_big_input(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """
    Verifies that textarea can handle big inputs
    """
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.edit_row("dummy_input_one")
    big_input = ""
    for i in range(1, 100):
        big_input += f"{str(i)}\n"
    input_page.entity1.text_area.set_value(big_input)
    self.assert_util(big_input, input_page.entity1.text_area.get_value())
    self.assert_util(input_page.entity1.save, True)
    input_page.table.edit_row("dummy_input_one")
    self.assert_util(big_input.strip(), input_page.entity1.text_area.get_value())

test_inputs_textarea_height(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies that textarea height values.

Source code in tests/ui/test_input_page.py
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_textarea_height(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """
    Verifies that textarea height values.
    """
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.edit_row("dummy_input_one")
    min_textarea_height = 66
    max_textarea_height = 306
    tolerance = 5
    long_input = ""
    self.assert_util(
        min_textarea_height - tolerance
        <= input_page.entity1.text_area.get_textarea_height()
        <= min_textarea_height + tolerance,
        True,
    )

    for i in range(1, 50):
        long_input += f"{str(i)}\n"
    input_page.entity1.text_area.append_value(long_input)
    self.assert_util(
        max_textarea_height - tolerance
        <= input_page.entity1.text_area.get_textarea_height()
        <= max_textarea_height + tolerance,
        True,
    )

test_inputs_textarea_scroll(ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one)

Verifies that textarea height values

Source code in tests/ui/test_input_page.py
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_textarea_scroll(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, _add_input_one
):
    """
    Verifies that textarea height values
    """
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    input_page.table.edit_row("dummy_input_one")
    long_input = ""
    screnshot_before = input_page.entity1.text_area.screenshot()
    for i in range(1, 50):
        long_input += f"{str(i)}\n"
    input_page.entity1.text_area.append_value(long_input)
    input_page.entity1.text_area.scroll("UP", 40)
    screenshot_after = input_page.entity1.text_area.screenshot()
    self.assert_util(screnshot_before, screenshot_after, operator="!=")

test_inputs_title_and_description(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)

Verifies the title and description of the page

Source code in tests/ui/test_input_page.py
368
369
370
371
372
373
374
375
376
377
378
379
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_inputs_title_and_description(
    self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
    """Verifies the title and description of the page"""
    input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
    self.assert_util(input_page.title.wait_to_display, "Inputs")
    self.assert_util(
        input_page.description.wait_to_display, "Manage your data inputs"
    )