File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
src/lightning_app/testing Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -227,13 +227,20 @@ def run_app_in_cloud(app_folder: str, app_name: str = "app.py") -> Generator:
227227 [LIGHTNING_CLOUD_PROJECT_ID ],
228228 )
229229 admin_page .goto (f"{ Config .url } /{ Config .username } /apps" )
230+
231+ # Closing the Create Project dialog.
230232 try :
231- # Closing the Create Project modal
232- button = admin_page .locator ('button:has-text("Cancel")' )
233+ project_dialog = admin_page .locator ("text=Create a project" )
234+ project_dialog .wait_for (timeout = 10 * 1000 , state = "visible" )
235+ print ("'Create Project' dialog visible, closing it." )
236+ project_name_input = admin_page .locator ('input[type="text"]' )
237+ project_name_input .fill ("Default Project" )
238+ button = admin_page .locator ('button:has-text("Continue")' )
233239 button .wait_for (timeout = 3 * 1000 )
234240 button .click ()
235- except (playwright ._impl ._api_types .Error , playwright ._impl ._api_types .TimeoutError ):
236- pass
241+ except playwright ._impl ._api_types .TimeoutError :
242+ print ("'Create Project' dialog not visible, skipping." )
243+
237244 admin_page .locator (f"text={ name } " ).click ()
238245 admin_page .evaluate (
239246 """data => {
You can’t perform that action at this time.
0 commit comments