codeceptjs / codeceptjs/CodeceptJS

Bug: using a "dynamic" restart=false with webdriverio backend leaves browser instances running

Đang mở
#2,023 6 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
JavaScript
Star
4.2k
Fork
757
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
16

Mô tả

#### What are you trying to achieve?

I'm trying to configure a single feature to keep the browser open between tests.
Configuring globally is not an option because our tests are not ready to handle that yet.
I want to have some tests run with browser restart: true, and others with restart: false.

I'm running the following command:
```bash
codeceptjs run path-to-my-test
```

I expect the browser to close after tests are executed.

(All tests pass btw.)

#### What do you get instead?

Browser remains open after all tests finish.

```bash
› [Suite Config] WebDriver {"restart":false}
› Started SeleniumStandaloneLauncher
› [Session] Starting singleton browser session
› [Window Size] [object Object]

# ...
# irrelevant tests output
# ....

Emitted | test.after ([object Object])
› [Session] cleaning cookies and localStorage
Emitted | suite.after ([object Object])
› [Suite Config] Reverted for WebDriver

OK | 7 passed // 23s
Emitted | global.result ([object Object])
Emitted | global.after ([object Object])
› Stopped SeleniumStandaloneLauncher
```

> Provide test source code if related

```js
Feature('Feature').config('WebDriver', {
restart: false,
});
```

### Details

* CodeceptJS version: ^2.3.2
* NodeJS Version: v10.15.3
* Operating System: Ubuntu 19.04
* Protractor || WebDriverIO || Nightmare version (if related): ` "@wdio/selenium-standalone-service": "^5.15.0",`
* Configuration file:

```js
helpers: {
GraphQL: {
endpoint: 'http://localhost:4060/graphql',
},
WebDriver: {
url: 'http://localhost:4050/',
browser: 'chrome',
windowSize: 'maximize',
version: chromeVersion,
desiredCapabilities: {
chromeOptions: {
binary: process.env.CI ? void 0 : chromiumBinary.path,
args: ['--disable-gpu'],
},
},
smartWait: 5000,
},
},
```

Related but not the same: https://github.com/Codeception/CodeceptJS/issues/1069

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.