codeceptjs / codeceptjs/CodeceptJS
[feature-request] Send `current` into `Before` / `After` hooks in Data Driven Tests
Đang mở
- 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ả
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)});
});
```
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.