@@ -236,15 +236,17 @@ def test_classic_ti_plan( # noqa: PLR0915
236236 assert not ws_info .value .is_closed ()
237237 restartable_jlab_websocket = RobustWebSocket (page , ws_info .value )
238238
239- with log_context (logging .INFO , "Run optimization" ) as ctx :
239+ with log_context (logging .INFO , "Run optimization" ) as ctx2 :
240240 run_button = ti_iframe .get_by_role ("button" , name = "Run Optimization" )
241241 run_button .click (timeout = _JLAB_RUN_OPTIMIZATION_APPEARANCE_TIME )
242242 try :
243243 _wait_for_optimization_complete (run_button )
244- ctx .logger .info ("Optimization finished!" )
244+ ctx2 .logger .info ("Optimization finished!" )
245245 except RetryError as e :
246246 last_exc = e .last_attempt .exception ()
247- ctx .logger .warning (f"Optimization did not finish in time: { last_exc } " )
247+ ctx2 .logger .warning (
248+ "Optimization did not finish in time: %s" , f"{ last_exc } "
249+ )
248250
249251 with log_context (logging .INFO , "Create report" ):
250252 with log_context (
@@ -262,16 +264,23 @@ def test_classic_ti_plan( # noqa: PLR0915
262264
263265 if is_product_lite :
264266 assert (
265- not ti_iframe .get_by_role ("button" , name = "Add to Report (0)" )
267+ ti_iframe .get_by_role ("button" , name = "Add to Report (0)" )
266268 .nth (0 )
267- .is_enabled ()
268- )
269- assert not ti_iframe .get_by_role (
270- "button" , name = "Export to S4L"
271- ).is_enabled ()
272- assert not ti_iframe .get_by_role (
273- "button" , name = "Export Report"
274- ).is_enabled ()
269+ .get_attribute ("disabled" )
270+ is not None
271+ ), "Add to Report button should be disabled in lite product"
272+ assert (
273+ ti_iframe .get_by_role ("button" , name = "Export to S4L" ).get_attribute (
274+ "disabled"
275+ )
276+ is not None
277+ ), "Export to S4L button should be disabled in lite product"
278+ assert (
279+ ti_iframe .get_by_role ("button" , name = "Export Report" ).get_attribute (
280+ "disabled"
281+ )
282+ is not None
283+ ), "Export Report button should be disabled in lite product"
275284
276285 else :
277286 with log_context (
0 commit comments