codeceptjs / codeceptjs/CodeceptJS
[feature-request] Send `current` into `Before` / `After` hooks in Data Driven Tests
未關閉
- 主要語言
- JavaScript
- 星號
- 4.2k
- 分支
- 757
- 平均合併
- 2 天 9 小時
- 30 天內合併 PR
- 16
描述
sample
```
let accounts = new DataTable(['login', 'password']);
accounts.add(['davert', '123456']);
accounts.add(['admin', '123456']);
Before(async (I, current) => {
await fetch('/api/createTestAccount', {method: 'post', body: JSON.stringify(current)})
});
Data(accounts).Scenario('Test Login', (I, current) => {
I.fillField('Username', current.login);
I.fillField('Password', current.password);
I.click('Sign In');
});
After(async (I, current) => {
await fetch('/api/removeTestAccount', {method: 'post', body: JSON.stringify(current)});
});
```
貢獻指南
評估
這個 Issue 還沒有評估資料。