@wdio/cli 8.15.0 → 8.15.3

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.
@@ -29,7 +29,7 @@ export class MyElement {
29
29
  <slot />
30
30
  </h1>
31
31
  <div class="card">
32
- <button onClick={() => { this.count++ }} part="button">
32
+ <button onClick={() => { this.count = this.count + 1; }} part="button">
33
33
  count is {this.count}
34
34
  </button>
35
35
  <p>
@@ -1,12 +1,14 @@
1
+ import { h } from '@stencil/core'
1
2
  import { render } from '@wdio/browser-runner/stencil'
2
3
  import { $, expect } from '@wdio/globals'
3
4
 
4
5
  import { MyElement } from './Component.js'
5
6
 
6
7
  describe('Lit component testing', () => {
7
- it('should increment value on click', async () => {
8
+ it('should increment value on click automatically', async () => {
8
9
  await render({
9
10
  components: [MyElement],
11
+ autoApplyChanges: true,
10
12
  template: () => (
11
13
  <my-element count={42}>WebdriverIO Component Testing</my-element>
12
14
  )
@@ -20,4 +22,22 @@ describe('Lit component testing', () => {
20
22
 
21
23
  await expect(button).toHaveText('count is 44')
22
24
  })
25
+
26
+ it('should increment value on click after flush', async () => {
27
+ const { flushAll } = await render({
28
+ components: [MyElement],
29
+ template: () => (
30
+ <my-element count={42}>WebdriverIO Component Testing</my-element>
31
+ )
32
+ })
33
+
34
+ const button = await $('my-element').$('>>>button')
35
+ await expect(button).toHaveText('count is 42')
36
+
37
+ await button.click()
38
+ await button.click()
39
+ flushAll()
40
+
41
+ await expect(button).toHaveText('count is 44')
42
+ })
23
43
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/cli",
3
- "version": "8.15.0",
3
+ "version": "8.15.3",
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",
@@ -83,5 +83,5 @@
83
83
  "publishConfig": {
84
84
  "access": "public"
85
85
  },
86
- "gitHead": "78e199c5ffd74bdf3a5576952c3834c29afa989f"
86
+ "gitHead": "f421e8fe0ffca2de60fcc4efdf9f81980bf3b064"
87
87
  }