File tree 2 files changed +28
-1
lines changed
2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 1
1
/** *******************************************************************
2
- * copyright (c) 2019-2023 Red Hat, Inc.
2
+ * copyright (c) 2019-2024 Red Hat, Inc.
3
3
*
4
4
* This program and the accompanying materials are made
5
5
* available under the terms of the Eclipse Public License 2.0
@@ -38,6 +38,7 @@ export class Dashboard {
38
38
browserVersion : 'browser-version' ,
39
39
username : 'username'
40
40
} ;
41
+ private static readonly CONTINUE_WITH_DEFAULT_DEVFILE_BUTTON : By = By . xpath ( '//button[text()="Continue with default devfile"]' ) ;
41
42
42
43
constructor (
43
44
@inject ( CLASSES . DriverHelper )
@@ -184,6 +185,12 @@ export class Dashboard {
184
185
await this . driverHelper . waitDisappearance ( Dashboard . USER_SETTINGS_DROPDOWN , timeout ) ;
185
186
}
186
187
188
+ async clickContinueWithDefaultDevfileButton ( timeout : number = TIMEOUT_CONSTANTS . TS_CLICK_DASHBOARD_ITEM_TIMEOUT ) : Promise < void > {
189
+ Logger . debug ( ) ;
190
+
191
+ await this . driverHelper . waitAndClick ( Dashboard . CONTINUE_WITH_DEFAULT_DEVFILE_BUTTON , timeout ) ;
192
+ }
193
+
187
194
private getAboutMenuItemButtonLocator ( text : string ) : By {
188
195
return By . xpath ( `//li/button[text()="${ text } "]` ) ;
189
196
}
Original file line number Diff line number Diff line change @@ -105,6 +105,26 @@ suite(
105
105
const allCreatedWorkspacesNames : string [ ] = await workspaces . getAllCreatedWorkspacesNames ( ) ;
106
106
expect ( allCreatedWorkspacesNames ) . has . length ( numberOfCreatedWorkspaces ) ;
107
107
} ) ;
108
+
109
+ test ( 'Check creating workspace using default devfile' , async function ( ) : Promise < void > {
110
+ await browserTabsUtil . navigateTo ( FACTORY_TEST_CONSTANTS . TS_SELENIUM_FACTORY_URL ( ) ) ;
111
+ await dashboard . waitLoader ( ) ;
112
+ await dashboard . clickContinueWithDefaultDevfileButton ( ) ;
113
+ await workspaceHandlingTests . obtainWorkspaceNameFromStartingPage ( ) ;
114
+ registerRunningWorkspace ( WorkspaceHandlingTests . getWorkspaceName ( ) ) ;
115
+ await projectAndFileTests . waitWorkspaceReadinessForCheCodeEditor ( ) ;
116
+ } ) ;
117
+
118
+ test ( 'Check that a project folder has not been cloned' , async function ( ) : Promise < void > {
119
+ testRepoProjectName = StringUtil . getProjectNameFromGitUrl ( FACTORY_TEST_CONSTANTS . TS_SELENIUM_FACTORY_GIT_REPO_URL ) ;
120
+ await driverHelper . waitVisibility ( webCheCodeLocators . TitleBar . itemElement ) ;
121
+ await projectAndFileTests . performTrustAuthorDialog ( ) ;
122
+ const isProjectFolderUnable : string = await driverHelper . waitAndGetElementAttribute (
123
+ ( webCheCodeLocators . TreeItem as any ) . projectFolderItem ,
124
+ 'aria-label'
125
+ ) ;
126
+ expect ( isProjectFolderUnable ) . to . contain ( 'No Folder Opened Section' ) ;
127
+ } ) ;
108
128
} else {
109
129
test ( 'Obtain workspace name from workspace loader page' , async function ( ) : Promise < void > {
110
130
await workspaceHandlingTests . obtainWorkspaceNameFromStartingPage ( ) ;
You can’t perform that action at this time.
0 commit comments