This repository was archived by the owner on May 21, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ const VcsDataComponent = ({data}: { data: VcsData }) => {
36
36
} ;
37
37
38
38
export const StatusBarComponent = ( { presentWorkingDirectory} : { presentWorkingDirectory : string } ) =>
39
- < div style = { css . statusBar . itself } >
39
+ < div className = "status-bar" style = { css . statusBar . itself } >
40
40
< span style = { css . statusBar . icon } > { fontAwesome . folderOpen } </ span >
41
- < span style = { css . statusBar . presentDirectory } > { presentWorkingDirectory } </ span >
41
+ < span className = "present-directory" style = { css . statusBar . presentDirectory } > { presentWorkingDirectory } </ span >
42
42
< VcsDataComponent data = { watchManager . vcsDataFor ( presentWorkingDirectory ) } />
43
43
</ div > ;
Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ class Page {
24
24
get job ( ) {
25
25
return new Job ( this . client , this . client . element ( ".job" ) ) ;
26
26
}
27
+
28
+ get statusBar ( ) {
29
+ return new StatusBar ( this . client , this . client . element ( ".status-bar" ) ) ;
30
+ }
27
31
}
28
32
29
33
abstract class Block {
@@ -57,6 +61,12 @@ class JobMenu extends Block {
57
61
}
58
62
}
59
63
64
+ class StatusBar extends Block {
65
+ get presentDirectory ( ) {
66
+ return this . selector . element ( ".present-directory" ) ;
67
+ }
68
+ }
69
+
60
70
describe ( "application launch" , function ( ) {
61
71
this . timeout ( timeout ) ;
62
72
@@ -104,4 +114,17 @@ describe("application launch", function () {
104
114
const output = await page . job . output . getText ( ) ;
105
115
expect ( output ) . to . eql ( "Received SIGTERM" ) ;
106
116
} ) ;
117
+
118
+ describe ( "status bar" , ( ) => {
119
+ it ( "changes working directory on cd" , async ( ) => {
120
+ const oldDirectory = __dirname + "/" ;
121
+ const newDirectory = join ( oldDirectory , "utils" ) + "/" ;
122
+
123
+ await page . executeCommand ( `cd ${ oldDirectory } ` ) ;
124
+ expect ( await page . statusBar . presentDirectory . getText ( ) ) . to . eql ( oldDirectory ) ;
125
+
126
+ await page . executeCommand ( `cd ${ newDirectory } ` ) ;
127
+ expect ( await page . statusBar . presentDirectory . getText ( ) ) . to . eql ( newDirectory ) ;
128
+ } ) ;
129
+ } ) ;
107
130
} ) ;
You can’t perform that action at this time.
0 commit comments