Skip to content

Commit 307ca95

Browse files
committed
+1 test case
1 parent 226ef3e commit 307ca95

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

tests/create-custom-field.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { Selector } from 'testcafe';
2+
3+
fixture('create-custom-field').page(process.env.TL_URL);
4+
5+
const fake = require('faker');
6+
let name = fake.commerce.productName();
7+
let label = fake.finance.currencyCode();
8+
9+
test('create-custom-field', async t => {
10+
await t
11+
.typeText(Selector('#tl_login'), 'admin')
12+
.typeText(Selector('#tl_password'), 'admin')
13+
.pressKey('enter')
14+
.switchToIframe(Selector('[name="mainframe"].siteContent'))
15+
.click(Selector('a').withText('Define Custom Fields'))
16+
.click(Selector('a').withText('Create'))
17+
.typeText(Selector('[name="cfields_edit"]').find('[name="cf_name"]'), name)
18+
.typeText(Selector('[name="cfields_edit"]').find('[name="cf_label"]'), label)
19+
.click(Selector('[name="cfields_edit"]').find('[name="do_update"]'))
20+
.expect(Selector('a').withText(name).visible).ok();
21+
});

0 commit comments

Comments
 (0)