Skip to content

Commit 6988416

Browse files
committed
Fix types in tests
1 parent f326350 commit 6988416

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

src/test/specs/extension.e2e.ts

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import type { ViewSection } from 'wdio-vscode-service';
1+
import type { TreeItem, ViewSection } from 'wdio-vscode-service';
22

33
describe('Entity Framework Extension', function () {
4-
this.retries(3);
4+
this.retries(2);
55

66
describe('Tree View', () => {
77
let treeView: ViewSection | undefined;
@@ -35,15 +35,13 @@ describe('Entity Framework Extension', function () {
3535

3636
it('should render projects', async () => {
3737
const [projectItem] = await treeView!.getVisibleItems();
38-
// @ts-ignore
39-
const projectItemLabel = await projectItem.getLabel();
38+
const projectItemLabel = await (projectItem as TreeItem).getLabel();
4039
expect(projectItemLabel).toBe('ExampleAPI');
4140
});
4241

4342
it('should render db contexts', async () => {
4443
const [projectItem] = await treeView!.getVisibleItems();
45-
// @ts-ignore
46-
await projectItem.expand();
44+
await (projectItem as TreeItem).expand();
4745

4846
await browser.waitUntil(async () => {
4947
const [, dbContextItem] = await treeView!.getVisibleItems();
@@ -52,25 +50,22 @@ describe('Entity Framework Extension', function () {
5250

5351
const [, dbContextItem] = await treeView!.getVisibleItems();
5452

55-
// @ts-ignore
56-
const dbContextLabel = await dbContextItem.getLabel();
53+
const dbContextLabel = await (dbContextItem as TreeItem).getLabel();
5754

5855
expect(dbContextLabel).toBe('BloggingContext');
5956
});
6057

6158
it('should render migrations', async () => {
6259
const [projectItem] = await treeView!.getVisibleItems();
63-
// @ts-ignore
64-
await projectItem.expand();
60+
await (projectItem as TreeItem).expand();
6561

6662
await browser.waitUntil(async () => {
6763
const [, dbContextItem] = await treeView!.getVisibleItems();
6864
return dbContextItem !== undefined;
6965
});
7066

7167
const [, dbContextItem] = await treeView!.getVisibleItems();
72-
// @ts-ignore
73-
await dbContextItem.expand();
68+
await (dbContextItem as TreeItem).expand();
7469

7570
await browser.waitUntil(async () => {
7671
const [, , migrationOneItem] = await treeView!.getVisibleItems();
@@ -80,10 +75,8 @@ describe('Entity Framework Extension', function () {
8075
const [, , migrationOneItem, migrationTwoItem] =
8176
await treeView!.getVisibleItems();
8277

83-
// @ts-ignore
84-
const migrationOneLabel = await migrationOneItem.getLabel();
85-
// @ts-ignore
86-
const migrationTwoLabel = await migrationTwoItem.getLabel();
78+
const migrationOneLabel = await (migrationOneItem as TreeItem).getLabel();
79+
const migrationTwoLabel = await (migrationTwoItem as TreeItem).getLabel();
8780

8881
expect(migrationOneLabel).toBe('InitialSchema');
8982
expect(migrationTwoLabel).toBe('NewMigration');

0 commit comments

Comments
 (0)