Class: CoPilot::BuildsDashboard

Inherits:
Object
  • Object
show all
Defined in:
lib/copilot/requests/internal/builds_dashboard.rb

Instance Method Summary collapse

Constructor Details

#initialize(browser, bundle_id) ⇒ BuildsDashboard

Returns a new instance of BuildsDashboard.



4
5
6
7
# File 'lib/copilot/requests/internal/builds_dashboard.rb', line 4

def initialize(browser, bundle_id)
  @browser = browser
  @bundle_id = bundle_id
end

Instance Method Details

#builds_tableObject



17
18
19
# File 'lib/copilot/requests/internal/builds_dashboard.rb', line 17

def builds_table
  @builds_table ||= header_div.parent.tables[bundle_index]
end

#builds_table_rowsObject



21
22
23
# File 'lib/copilot/requests/internal/builds_dashboard.rb', line 21

def builds_table_rows
  builds_table.trs(id: /\/dashboard\/builds\/report\/\d+\//)
end

#gotoObject



9
10
11
# File 'lib/copilot/requests/internal/builds_dashboard.rb', line 9

def goto
  b.goto 'https://www.testflightapp.com/dashboard/builds'
end

#header_divObject



13
14
15
# File 'lib/copilot/requests/internal/builds_dashboard.rb', line 13

def header_div
  @header_div ||= header_divs[bundle_index]
end

#more_buildsObject



38
39
40
41
# File 'lib/copilot/requests/internal/builds_dashboard.rb', line 38

def more_builds
  link = more_builds_link
  link.click if link
end


34
35
36
# File 'lib/copilot/requests/internal/builds_dashboard.rb', line 34

def more_builds_link
  builds_table.as(text: 'more')[0]
end

#next_pageObject



29
30
31
32
# File 'lib/copilot/requests/internal/builds_dashboard.rb', line 29

def next_page
  link = next_page_link
  link.click if link
end


25
26
27
# File 'lib/copilot/requests/internal/builds_dashboard.rb', line 25

def next_page_link
  builds_table.as(title: 'Next Page')[0]
end