@@ -87,12 +87,7 @@ def electric(self) -> ElectricState:
8787 return ElectricState (self ._context )
8888
8989
90- class ElectricState (State ):
91- def benchmark (self ) -> ElectricBenchmarkStateDropdown :
92- """Switch the Electric report type to Benchmark and expose the state dropdown."""
93- self ._select_report ("benchmark" )
94- return ElectricBenchmarkStateDropdown (self ._context )
95-
90+ class SelectReportState (State ):
9691 def _select_report (self , report : str ):
9792 """Click the given radio report selector if it is not already active."""
9893 radio = self ._wait ().until (
@@ -102,6 +97,17 @@ def _select_report(self, report: str):
10297 radio .click ()
10398
10499
100+ class ElectricState (SelectReportState ):
101+ def benchmark (self ) -> ElectricBenchmarkStateDropdown :
102+ """Switch the Electric report type to Benchmark and expose the state dropdown."""
103+ self ._select_report ("benchmark" )
104+ return ElectricBenchmarkStateDropdown (self ._context )
105+
106+ def benchmark_all (self ) -> ElectricBenchmarkAllStateDropdown :
107+ self ._select_report ("benchall" )
108+ return ElectricBenchmarkAllStateDropdown (self ._context )
109+
110+
105111class DropdownState (State ):
106112 """Shared behavior for dropdown-driven selections on the benchmark workflow."""
107113
@@ -163,6 +169,10 @@ class ElectricBenchmarkAllScheduleDropdown(ElectricBenchmarkAllUtilityDropdown):
163169 def get_schedules (self ) -> list [str ]:
164170 return self ._visible_options ()
165171
172+ def select_schedule (self , schedule : str ) -> ElectricBenchmarkAllReport :
173+ """Select a schedule and produce a report interface that can fetch data."""
174+ return self ._select (schedule , category = "Schedule" , next_state = ElectricBenchmarkReport (self ._context ))
175+
166176
167177class ElectricBenchmarkStateDropdown (DropdownState ):
168178 element_id = "StateSelect"
@@ -246,6 +256,12 @@ def back_to_selections(self) -> ElectricBenchmarkScheduleDropdown:
246256 return self ._back_to_selections (ElectricBenchmarkScheduleDropdown (self ._context ))
247257
248258
259+ class ElectricBenchmarkAllReport (ReportState ):
260+ def back_to_selections (self ) -> ElectricBenchmarkAllScheduleDropdown :
261+ """Return to the selections page so additional schedules can be fetched."""
262+ return self ._back_to_selections (ElectricBenchmarkAllScheduleDropdown (self ._context ))
263+
264+
249265def _get_xlsx (folder ) -> set [str ]:
250266 """Return the set of .xlsx filenames currently present in the provided folder."""
251267 return {_ for _ in os .listdir (folder ) if _ .endswith (".xlsx" )}
0 commit comments