File tree Expand file tree Collapse file tree 3 files changed +23
-17
lines changed Expand file tree Collapse file tree 3 files changed +23
-17
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,6 @@ describe('Source Control View', function () {
192192 // eslint-disable-next-line sonarjs/cognitive-complexity
193193 it ( 'should show the expected changes after running an experiment' , async function ( ) {
194194 const expectedScmItemLabels = [
195- 'demo DVC' ,
196195 'hist.csv' ,
197196 'model.pt' ,
198197 'plots, training' ,
@@ -216,19 +215,19 @@ describe('Source Control View', function () {
216215 const expectedScmSet = new Set ( expectedScmItemLabels )
217216 let dvcTreeItemLabels : string [ ] = [ ]
218217
218+ let openView = true
219+
219220 await browser . waitUntil (
220221 async ( ) => {
221222 dvcTreeItemLabels = [ ]
222- const treeItems = await findScmTreeItems ( )
223+ const treeItems = await findScmTreeItems ( openView )
224+ openView = false
223225 for ( const treeItem of treeItems ) {
224226 const treeItemLabel = await getLabel ( treeItem )
225227 if ( ! expectedScmSet . has ( treeItemLabel ) ) {
226228 continue
227229 }
228230 dvcTreeItemLabels . push ( treeItemLabel )
229- if ( treeItemLabel === 'demo DVC' ) {
230- continue
231- }
232231
233232 const tooltip = await findDecorationTooltip ( treeItem )
234233 expect ( tooltip ) . toBeTruthy ( )
Original file line number Diff line number Diff line change @@ -220,18 +220,24 @@ export const expectAllPlotsToBeFilled = async (webview: PlotsWebview) => {
220220 }
221221}
222222
223- export const findScmTreeItems = async ( ) => {
224- const workbench = await browser . getWorkbench ( )
225- const activityBar = workbench . getActivityBar ( )
226- const sourceControlIcon = await activityBar . getViewControl ( 'Source Control' )
227-
228- await sourceControlIcon ?. openView ( )
229-
230- const visibleItems = await findCurrentTreeItems ( )
231-
232- await visibleItems [ visibleItems . length - 1 ] . click ( )
223+ export const findScmTreeItems = async ( openView : boolean ) => {
224+ if ( openView ) {
225+ await browser
226+ . action ( 'key' )
227+ . down ( Key . Control )
228+ . down ( Key . Shift )
229+ . down ( 'g' )
230+ . up ( Key . Control )
231+ . up ( Key . Shift )
232+ . up ( 'g' )
233+ . pause ( 100 )
234+ . down ( Key . Tab )
235+ . up ( Key . Tab )
236+ . pause ( 100 )
237+ . perform ( )
238+ }
233239
234- for ( let i = 0 ; i < 20 ; i ++ ) {
240+ for ( let i = 0 ; i < 30 ; i ++ ) {
235241 await browser . keys ( 'ArrowDown' )
236242 }
237243
Original file line number Diff line number Diff line change @@ -51,7 +51,8 @@ export const config: Options.Testrunner = {
5151 'wdio:vscodeOptions' : {
5252 extensionPath,
5353 userSettings : {
54- 'dvc.pythonPath' : getVenvBinPath ( dvcDemoPath , '.env' , 'python' )
54+ 'dvc.pythonPath' : getVenvBinPath ( dvcDemoPath , '.env' , 'python' ) ,
55+ 'window.commandCenter' : false
5556 } ,
5657 verboseLogging : false ,
5758 workspacePath : dvcDemoPath
You can’t perform that action at this time.
0 commit comments