testcentricity_web 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 411dbfd9b34e65051d04c4aaea10a483a2e6196f
4
- data.tar.gz: 81ca19c8cb7489ca37514fad7d76c8f25420971e
3
+ metadata.gz: e4afb1201d3968b9cac2f882a8fad01c299f9fed
4
+ data.tar.gz: ddce1932ddf913f79c32234f1e6f05fb57c3b393
5
5
  SHA512:
6
- metadata.gz: 5f35a9baf87dbf8a86bf57e4dce84c9b51c3fae59f28bc87752a558aa2dd427dc9506b0246d315c03762a551656b5ce9dc7d1abe063f5193657e3c6388eeed32
7
- data.tar.gz: b8a2d7f6518a9d5f797c9be9a300f422d02acbba36e9158d025475e32c0545608ba69808ef0b6a090c7bd7fd9e796f5a6c222151935b066c4892e33e04be5da4
6
+ metadata.gz: ad622e81595a59048e790eef47f860bba7ee0b29ce6aeb74cb5e3bcce35867cd4528e2f199b888f511803a34d77bf481633852b73862992711e0a21553087214
7
+ data.tar.gz: 17dd9c90fa61a45fa9cd82e1690dde44739a7d3de227b720bae3ce8a8d129a637838be135ca09849a73e90952910ab75d98d17432b641fed66624fd5ef74e27d
@@ -39,6 +39,44 @@ module TestCentricity
39
39
  popup.wait_until_exists(15)
40
40
  end
41
41
 
42
+ def is_table_row_expanded?(row, column)
43
+ row_count = get_row_count
44
+ raise "Row #{row} exceeds number of rows (#{row_count}) in table #{@locator}" if row > row_count
45
+ column_count = get_column_count
46
+ raise "Column #{column} exceeds number of columns (#{column_count}) in table #{@locator}" if column > column_count
47
+ set_table_cell_locator(row, column)
48
+ saved_locator = @alt_locator
49
+ set_alt_locator("#{@alt_locator}//div[@class='ui-icon ui-icon-triangle-1-s tree-minus treeclick']")
50
+ if exists?
51
+ expanded = true
52
+ else
53
+ set_alt_locator("#{saved_locator}//div[@class='ui-icon ui-icon-triangle-1-e tree-plus treeclick']")
54
+ exists? ?
55
+ expanded = false :
56
+ raise "Row #{row}/Column #{column} of table #{@locator} does not contain a disclosure triangle"
57
+ end
58
+ clear_alt_locator
59
+ expanded
60
+ end
61
+
62
+ def expand_table_row(row, column)
63
+ unless is_table_row_expanded?(row, column)
64
+ set_table_cell_locator(row, column)
65
+ set_alt_locator("#{saved_locator}//div[@class='ui-icon ui-icon-triangle-1-e tree-plus treeclick']")
66
+ click if exists?
67
+ clear_alt_locator
68
+ end
69
+ end
70
+
71
+ def collapse_table_row(row, column)
72
+ if is_table_row_expanded?(row, column)
73
+ set_table_cell_locator(row, column)
74
+ set_alt_locator("#{saved_locator}//div[@class='ui-icon ui-icon-triangle-1-e tree-minus treeclick']")
75
+ click if exists?
76
+ clear_alt_locator
77
+ end
78
+ end
79
+
42
80
  def get_siebel_object_type
43
81
  obj, _ = find_element
44
82
  object_not_found_exception(obj, 'Siebel object')
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '0.4.2'
2
+ VERSION = '0.4.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.J. Mrozinski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-29 00:00:00.000000000 Z
11
+ date: 2016-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler