File tree Expand file tree Collapse file tree 3 files changed +50
-0
lines changed
Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+
15+ strategy :
16+ matrix :
17+ node-version : [16.x]
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v2
22+
23+ - name : Set up Node.js
24+ uses : actions/setup-node@v2
25+ with :
26+ node-version : ${{ matrix.node-version }}
27+
28+ - name : Install dependencies
29+ run : npm install
30+
31+ - name : Compile the extension
32+ run : npm run compile
33+
34+ - name : Run tests
35+ run : npm test
Original file line number Diff line number Diff line change 1010
1111# VS Code
1212.vscode /
13+ .vscode-test /
14+ out /
1315
1416# Build directories
1517dist /
Original file line number Diff line number Diff line change @@ -37,4 +37,17 @@ suite('Extension Test Suite', () => {
3737 assert . notStrictEqual ( isMagentoProject , undefined , "Settings section 'magentoLogViewer' is not added" ) ;
3838 } ) ;
3939
40+ test ( 'Extension should prompt if it is a Magento project' , async ( ) => {
41+ const configuration = vscode . workspace . getConfiguration ( 'magentoLogViewer' ) ;
42+ const isMagentoProject = configuration . get ( 'isMagentoProject' ) ;
43+ assert . strictEqual ( isMagentoProject , 'Please select' , "Extension did not prompt if it is a Magento project" ) ;
44+ } ) ;
45+
46+ test ( 'Extension should have logo in activity bar' , async ( ) => {
47+ const activityBarItem = vscode . window . createStatusBarItem ( vscode . StatusBarAlignment . Left , 100 ) ;
48+ activityBarItem . text = '$(magento-logfile-viewer-logo)' ;
49+ activityBarItem . show ( ) ;
50+ assert . strictEqual ( activityBarItem . text , '$(magento-logfile-viewer-logo)' , "Logo is not present in the activity bar" ) ;
51+ } ) ;
52+
4053} ) ;
You can’t perform that action at this time.
0 commit comments