File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ } ) ;
You can’t perform that action at this time.
0 commit comments