Skip to content

Commit 395076a

Browse files
committed
feat: update changelog for version 1.7.0 and enhance extension tests
1 parent 65720ce commit 395076a

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
66

77
## [Unreleased]
88

9-
## [1.6.1] - 2024-12-08
9+
## [1.7.0] - 2024-12-08
1010

1111
### Added
1212

13-
- Added Trunk Support to improve Code Quality
1413
- Added context menu (right click) option to delete report files
1514

1615
### Changed

src/test/extension.test.ts

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,36 @@ import * as assert from 'assert';
55
import * as vscode from 'vscode';
66
// import * as myExtension from '../../extension';
77

8+
const extensionId = 'MathiasElle.magento-log-viewer';
9+
810
suite('Extension Test Suite', () => {
911
vscode.window.showInformationMessage('Start all tests.');
1012

11-
test('Sample test', () => {
12-
assert.strictEqual(-1, [1, 2, 3].indexOf(5));
13-
assert.strictEqual(-1, [1, 2, 3].indexOf(0));
13+
test('Extension should be present', () => {
14+
const extension = vscode.extensions.getExtension(extensionId);
15+
assert.ok(extension, "Extension is not installed");
16+
});
17+
18+
test('Extension should activate', async () => {
19+
const extension = vscode.extensions.getExtension(extensionId);
20+
if (extension) {
21+
await extension.activate();
22+
assert.ok(extension.isActive, "Extension is not active");
23+
}
24+
});
25+
26+
test('Extension should start', async () => {
27+
const extension = vscode.extensions.getExtension(extensionId);
28+
if (extension) {
29+
await extension.activate();
30+
assert.ok(extension.isActive, "Extension did not start");
31+
}
32+
});
33+
34+
test('Extension should add settings section', () => {
35+
const configuration = vscode.workspace.getConfiguration('magentoLogViewer');
36+
const isMagentoProject = configuration.get('isMagentoProject');
37+
assert.notStrictEqual(isMagentoProject, undefined, "Settings section 'magentoLogViewer' is not added");
1438
});
39+
1540
});

0 commit comments

Comments
 (0)