@wdio/cli 8.6.3 → 8.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/templates/exampleFiles/browser/Component.preact.ejs +1 -1
- package/build/templates/exampleFiles/browser/Component.preact.test.ejs +4 -3
- package/build/templates/exampleFiles/browser/Component.react.ejs +1 -1
- package/build/templates/exampleFiles/browser/Component.react.test.ejs +4 -3
- package/build/templates/exampleFiles/browser/Component.solid.ejs +1 -1
- package/build/templates/exampleFiles/browser/Component.solid.test.ejs +4 -3
- package/build/templates/exampleFiles/browser/Component.svelte.test.ejs +3 -2
- package/build/templates/exampleFiles/browser/Component.vue.test.ejs +3 -2
- package/build/utils.d.ts.map +1 -1
- package/build/utils.js +7 -4
- package/package.json +2 -2
|
@@ -16,7 +16,7 @@ expect.extend(matchers)
|
|
|
16
16
|
// Initialize htm with Preact
|
|
17
17
|
const html = htm.bind(h);
|
|
18
18
|
<% } %>
|
|
19
|
-
import ExampleComponent from './Component
|
|
19
|
+
import ExampleComponent from './Component'
|
|
20
20
|
|
|
21
21
|
describe('Preact Component Tests', () => {
|
|
22
22
|
<% if (installTestingLibrary) { %>
|
|
@@ -46,12 +46,13 @@ describe('Preact Component Tests', () => {
|
|
|
46
46
|
it('should test component with WebdriverIO', async () => {
|
|
47
47
|
<%- renderCommand %>
|
|
48
48
|
|
|
49
|
-
const component = await $('button
|
|
49
|
+
const component = await $('button*=count is')
|
|
50
50
|
await expect(component).toBePresent()
|
|
51
|
+
await expect(component).toHaveText('count is 0')
|
|
51
52
|
|
|
52
53
|
await component.click()
|
|
53
54
|
await component.click()
|
|
54
55
|
|
|
55
|
-
await expect(
|
|
56
|
+
await expect(component).toHaveText('count is 2')
|
|
56
57
|
})
|
|
57
58
|
})
|
|
@@ -14,7 +14,7 @@ import { expect, $ } from '@wdio/globals'
|
|
|
14
14
|
import * as matchers from '@testing-library/jest-dom/matchers'
|
|
15
15
|
expect.extend(matchers)
|
|
16
16
|
<% } %>
|
|
17
|
-
import ExampleComponent from './Component
|
|
17
|
+
import ExampleComponent from './Component'
|
|
18
18
|
|
|
19
19
|
describe('React Component Tests', () => {
|
|
20
20
|
<% if (installTestingLibrary) { %>
|
|
@@ -44,12 +44,13 @@ describe('React Component Tests', () => {
|
|
|
44
44
|
it('should test component with WebdriverIO', async () => {
|
|
45
45
|
<%- renderCommand %>
|
|
46
46
|
|
|
47
|
-
const component = await $('button
|
|
47
|
+
const component = await $('button*=count is')
|
|
48
48
|
await expect(component).toBePresent()
|
|
49
|
+
await expect(component).toHaveText('count is 0')
|
|
49
50
|
|
|
50
51
|
await component.click()
|
|
51
52
|
await component.click()
|
|
52
53
|
|
|
53
|
-
await expect(
|
|
54
|
+
await expect(component).toHaveText('count is 2')
|
|
54
55
|
})
|
|
55
56
|
})
|
|
@@ -12,7 +12,7 @@ import { expect, $ } from '@wdio/globals'
|
|
|
12
12
|
import * as matchers from '@testing-library/jest-dom/matchers'
|
|
13
13
|
expect.extend(matchers)
|
|
14
14
|
<% } %>
|
|
15
|
-
import ExampleComponent from './Component
|
|
15
|
+
import ExampleComponent from './Component'
|
|
16
16
|
|
|
17
17
|
describe('Preact Component Tests', () => {
|
|
18
18
|
<% if (installTestingLibrary) { %>
|
|
@@ -44,12 +44,13 @@ describe('Preact Component Tests', () => {
|
|
|
44
44
|
it('should test component with WebdriverIO', async () => {
|
|
45
45
|
<%- renderCommand %>
|
|
46
46
|
|
|
47
|
-
const component = await $('button
|
|
47
|
+
const component = await $('button*=count is')
|
|
48
48
|
await expect(component).toBePresent()
|
|
49
|
+
await expect(component).toHaveText('count is 0')
|
|
49
50
|
|
|
50
51
|
await component.click()
|
|
51
52
|
await component.click()
|
|
52
53
|
|
|
53
|
-
await expect(
|
|
54
|
+
await expect(component).toHaveText('count is 2')
|
|
54
55
|
})
|
|
55
56
|
})
|
|
@@ -44,12 +44,13 @@ describe('Svelte Component Testing', () => {
|
|
|
44
44
|
it('should test component with WebdriverIO', async () => {
|
|
45
45
|
<%- renderCommand %>
|
|
46
46
|
|
|
47
|
-
const component = await $('button
|
|
47
|
+
const component = await $('button*=count is')
|
|
48
48
|
await expect(component).toBePresent()
|
|
49
|
+
await expect(component).toHaveText('count is 0')
|
|
49
50
|
|
|
50
51
|
await component.click()
|
|
51
52
|
await component.click()
|
|
52
53
|
|
|
53
|
-
await expect(
|
|
54
|
+
await expect(component).toHaveText('count is 2')
|
|
54
55
|
})
|
|
55
56
|
})
|
|
@@ -48,12 +48,13 @@ describe('Vue Component Testing', () => {
|
|
|
48
48
|
it('should test component with WebdriverIO', async () => {
|
|
49
49
|
<%- renderCommand %>
|
|
50
50
|
|
|
51
|
-
const component = await $('button
|
|
51
|
+
const component = await $('button*=count is')
|
|
52
52
|
await expect(component).toBePresent()
|
|
53
|
+
await expect(component).toHaveText('count is 2')
|
|
53
54
|
|
|
54
55
|
await component.click()
|
|
55
56
|
await component.click()
|
|
56
57
|
|
|
57
|
-
await expect(
|
|
58
|
+
await expect(component).toHaveText('count is 2')
|
|
58
59
|
})
|
|
59
60
|
})
|
package/build/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AActD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAGhD,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAMlE,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAQrI,eAAO,MAAM,UAAU,SAAuC,MAAM,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,KAAK,QAAQ,MAAM,CAAC,CAAA;AAEnH,qBAAa,SAAU,SAAQ,kBA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AAED,wBAAsB,gBAAgB,CAAC,aAAa,EAAE,aAAa,iBAgBlE;AAED,wBAAsB,gBAAgB,CAAC,aAAa,EAAE,aAAa,oBAkBlE"}
|
package/build/utils.js
CHANGED
|
@@ -479,11 +479,14 @@ export function getPathForFileGeneration(answers, projectRootDir) {
|
|
|
479
479
|
export async function getDefaultFiles(answers, pattern) {
|
|
480
480
|
const projectProps = await getProjectProps();
|
|
481
481
|
const rootdir = getProjectRoot(answers, projectProps);
|
|
482
|
-
|
|
482
|
+
const presetPackage = convertPackageHashToObject(answers.preset || '');
|
|
483
|
+
const isJSX = TSX_BASED_FRAMEWORKS.includes(presetPackage.short || '');
|
|
484
|
+
const val = pattern.endsWith('.feature')
|
|
483
485
|
? path.join(rootdir, pattern)
|
|
484
486
|
: answers?.isUsingCompiler?.toString().includes('TypeScript')
|
|
485
|
-
? `${path.join(rootdir, pattern)}.ts`
|
|
486
|
-
: `${path.join(rootdir, pattern)}.js`;
|
|
487
|
+
? `${path.join(rootdir, pattern)}.ts${isJSX ? 'x' : ''}`
|
|
488
|
+
: `${path.join(rootdir, pattern)}.js${isJSX ? 'x' : ''}`;
|
|
489
|
+
return val;
|
|
487
490
|
}
|
|
488
491
|
/**
|
|
489
492
|
* Ensure core WebdriverIO packages have the same version as cli so that if someone
|
|
@@ -589,7 +592,7 @@ export function npmInstall(parsedAnswers, useYarn, npmTag) {
|
|
|
589
592
|
* add helper package for Solidjs testing
|
|
590
593
|
*/
|
|
591
594
|
if (parsedAnswers.preset === 'solid') {
|
|
592
|
-
parsedAnswers.packagesToInstall.push('solid-js
|
|
595
|
+
parsedAnswers.packagesToInstall.push('solid-js');
|
|
593
596
|
}
|
|
594
597
|
/**
|
|
595
598
|
* add Jasmine types if necessary
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/cli",
|
|
3
|
-
"version": "8.6.
|
|
3
|
+
"version": "8.6.5",
|
|
4
4
|
"description": "WebdriverIO testrunner command line interface",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-cli",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "78266cfe0331a40c891b129c8c530a8c7297566d"
|
|
75
75
|
}
|