Skip to content

Commit ed27f6b

Browse files
committed
fix: Resolve problems reported by the TypeScript compiler
1 parent 7912670 commit ed27f6b

File tree

2 files changed

+3
-215
lines changed

2 files changed

+3
-215
lines changed

test/testdata.ts

Lines changed: 1 addition & 214 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const SUITES : SuiteStats[] = [
5252
state : 'passed',
5353
"start": new Date("2021-06-11T01:28:24.778Z"),
5454
"_duration":9009,
55-
"cid":"0-0",
55+
// "cid":"0-0",
5656
"fullTitle":"full foo",
5757
"parent": "login test valid logins suite",
5858
},
@@ -140,216 +140,3 @@ export const SUITES : SuiteStats[] = [
140140
}],
141141
}
142142
]
143-
144-
export const SUITES_MULTIPLE_ERRORS : SuiteStats[] = [
145-
{
146-
cid : SUITE_UIDS[0],
147-
uid : SUITE_UIDS[0],
148-
title : SUITE_UIDS[0].slice(0, -1),
149-
type : "suite",
150-
file: "dummy",
151-
hooks: [],
152-
tests : [
153-
//@ts-ignore
154-
{
155-
cid : 'foo1',
156-
uid : 'foo1',
157-
title : 'foo',
158-
state : 'passed',
159-
},
160-
//@ts-ignore
161-
{
162-
cid : 'bar1',
163-
uid : 'bar1',
164-
title : 'bar',
165-
state : 'passed',
166-
}
167-
],
168-
},
169-
{
170-
cid : SUITE_UIDS[1],
171-
uid : SUITE_UIDS[1],
172-
title : SUITE_UIDS[1].slice(0, -1),
173-
type : "suite",
174-
file: "dummy",
175-
hooks: [],
176-
tests : [
177-
//@ts-ignore
178-
{
179-
cid : 'some test1',
180-
uid : 'some test1',
181-
title : 'some test',
182-
state : 'passed',
183-
},
184-
{
185-
cid : 'a failed test',
186-
uid : 'a failed test',
187-
title : 'a test with two failures',
188-
state : 'failed',
189-
190-
errors : [
191-
192-
{
193-
"name": "Error",
194-
"message": "expected the party on the first part to be the party on the first part",
195-
"stack": "First failed stack trace",
196-
//@ts-ignore
197-
"type": "Error"
198-
},
199-
200-
//@ts-ignore
201-
{
202-
name: "Error",
203-
message : 'expected the party on the second part to be the party on the second part',
204-
stack : 'Second failed stack trace',
205-
//@ts-ignore
206-
type: "Error"
207-
}
208-
]
209-
}
210-
],
211-
},
212-
]
213-
214-
export const SUITES_NO_TESTS : SuiteStats[] = [
215-
//@ts-ignore
216-
{
217-
cid : SUITE_UIDS[0],
218-
uid: SUITE_UIDS[0],
219-
title: SUITE_UIDS[0].slice(0, -1),
220-
file: "dummy",
221-
tests: [],
222-
suites: [],
223-
hooks: []
224-
},
225-
]
226-
227-
export const SUITES_NO_TESTS_WITH_HOOK_ERROR : SuiteStats[] = [
228-
{
229-
cid : SUITE_UIDS[0],
230-
uid: SUITE_UIDS[0],
231-
title: SUITE_UIDS[0].slice(0, -1),
232-
file: "dummy",
233-
tests: [],
234-
suites: [],
235-
hooks: [
236-
//@ts-ignore
237-
{
238-
uid : 'a failed hook2',
239-
title : 'a failed hook',
240-
state : 'failed',
241-
error : {
242-
name: "Error",
243-
message : 'expected foo to equal bar',
244-
stack : 'Failed test stack trace'
245-
}
246-
}]
247-
},
248-
]
249-
export const SUITES_NESTED : SuiteStats[] = [
250-
{
251-
"cid" : "Foo test1",
252-
"uid": "Foo test1",
253-
"title": "Foo test",
254-
"type": "suite",
255-
"hooks": [],
256-
"start": "2019-04-13T00:10:05.191Z",
257-
"end": "2019-04-13T00:10:15.191Z",
258-
"tests": [
259-
{
260-
"type": "test",
261-
"cid": "foo1",
262-
"uid": "foo1",
263-
"title": "foo",
264-
"state": "passed",
265-
"start": "2021-06-11T01:28:24.778Z",
266-
"_duration": 9009,
267-
"cid": "0-0",
268-
"fullTitle": "full foo",
269-
"parent": "login test valid logins suite"
270-
},
271-
{
272-
"cid": "bar1",
273-
"uid": "bar1",
274-
"title": "bar",
275-
"state": "failed",
276-
"start": "2021-06-11T01:28:24.778Z",
277-
"_duration": 15809,
278-
"events": [
279-
{
280-
"type": "log",
281-
"value": "Show Login Screen"
282-
},
283-
{
284-
"message": "Expected <xpath://p[@class='message red-gradient' and contains(.,'Unable to login due to Bad credentials')]> to be displayed but it is not",
285-
"stack": "Error: Expected <xpath://p[@class='message red-gradient' and contains(.,'Unable to login due to Bad credentials')]> to be displayed but it is not\n at timer.catch.e (C:\\Users\\rpii\\Development\\micro-magic-web-e2e-test\\node_modules\\webdriverio\\build\\commands\\browser\\waitUntil.js:69:15)\n at Browser.runCommand (C:\\Users\\rpii\\Development\\micro-magic-web-e2e-test\\node_modules\\@wdio\\sync\\build\\wrapCommand.js:31:24)\n at Browser.<anonymous> (C:\\Users\\rpii\\Development\\micro-magic-web-e2e-test\\node_modules\\@wdio\\sync\\build\\wrapCommand.js:53:31)\n at Proxy.<anonymous> (C:\\Users\\rpii\\Development\\micro-magic-web-e2e-test\\node_modules\\chai-webdriverio\\dist\\assertions\\displayed.js:35:20)\n at Proxy.methodWrapper (C:\\Users\\rpii\\Development\\micro-magic-web-e2e-test\\node_modules\\chai\\lib\\chai\\utils\\addMethod.js:57:25)\n at LoginPage.displayed [as assertInvalidCredentials] (C:\\Users\\rpii\\Development\\micro-magic-web-e2e-test\\test\\pages/login.page.js:112:51)\n at LoginPage.assertion [as login] (C:\\Users\\rpii\\Development\\micro-magic-web-e2e-test\\test\\pages/login.page.js:89:9)\n at LoginPage.login [as loginFn] (C:\\Users\\rpii\\Development\\micro-magic-web-e2e-test\\test\\pages/login.page.js:98:14)\n at module.exports.loginFn [as fn] (C:\\Users\\rpii\\Development\\micro-magic-web-e2e-test\\test\\specs/login2.spec.js:29:23)\n at module.exports.runCase (C:\\Users\\rpii\\Development\\micro-magic-web-e2e-test\\node_modules\\@rpii\\wdio-data-driven\\lib\\wdio-data-driven.js:92:22)\n at module.exports.forCasesInSpreadsheet (C:\\Users\\rpii\\Development\\micro-magic-web-e2e-test\\node_modules\\@rpii\\wdio-data-driven\\lib\\wdio-data-driven.js:71:18)",
286-
"type": "Error"
287-
},
288-
{
289-
"type": "screenshot",
290-
"value": "test\\test.png"
291-
}
292-
]
293-
}
294-
],
295-
"suites": [
296-
{
297-
"cid" : "nested Foo test1",
298-
"uid": "nested Foo test1",
299-
"title": "Nested Foo test1",
300-
"type": "suite",
301-
"hooks": [],
302-
"start": "2019-04-13T00:10:05.191Z",
303-
"end": "2019-04-13T00:10:15.191Z",
304-
"tests": [
305-
{
306-
"type": "test",
307-
"cid": "foo1",
308-
"uid": "foo1",
309-
"title": "foo",
310-
"state": "passed",
311-
"start": "2021-06-11T01:28:24.778Z",
312-
"_duration": 9009,
313-
"cid": "0-0",
314-
"fullTitle": "full foo",
315-
"parent": "login test valid logins suite"
316-
}
317-
]
318-
},
319-
{
320-
"cid" : "Nested Foo test2",
321-
"uid": "Nested Foo test2",
322-
"title": "Nested Foo test2",
323-
"type": "suite",
324-
"hooks": [],
325-
"start": "2019-04-13T00:10:05.191Z",
326-
"end": "2019-04-13T00:10:15.191Z",
327-
"tests": [],
328-
"suites": [
329-
{
330-
"cid" : "Foo test2",
331-
"uid": "Foo test2",
332-
"title": "nested Foo test2",
333-
"type": "suite",
334-
"hooks": [],
335-
"start": "2019-04-13T00:10:05.191Z",
336-
"end": "2019-04-13T00:10:15.191Z",
337-
"tests": [
338-
{
339-
"type": "test",
340-
"cid": "foo1",
341-
"uid": "foo1",
342-
"title": "foo",
343-
"state": "passed",
344-
"start": "2021-06-11T01:28:24.778Z",
345-
"_duration": 9009,
346-
"fullTitle": "full foo",
347-
"parent": "login test valid logins suite"
348-
}
349-
]
350-
}
351-
]
352-
}
353-
]
354-
}
355-
]

test/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"@rpii/wdio-report-events",
2121
"@types/chai",
2222
"@types/mocha"
23-
]
23+
],
24+
"skipLibCheck": true
2425
},
2526
"include": [
2627
"../test/*.ts"

0 commit comments

Comments
 (0)