Skip to content

Commit

Permalink
Closes #22
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagodp committed Jun 20, 2018
1 parent 18baead commit 7026a76
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dist/__tests__/nlp/NLPTest.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ describe('NLPTest', () => {
expect(r.entities[1].entity).toBe(Entities_1.Entities.VALUE);
expect(r.entities[1].value).toBe('bar');
});
it('starts with a number', () => {
let r = nlp.recognize('en', ' "1foo" ');
expect(r.entities).toHaveLength(1);
expect(r.entities[0].entity).toBe(Entities_1.Entities.VALUE);
expect(r.entities[0].value).toBe('1foo');
});
});
describe('number', () => {
function recogNumber(text, expected, debug = false) {
Expand Down
1 change: 1 addition & 0 deletions dist/plugins/codeceptjs/Commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ exports.CODECEPTJS_COMMANDS = [
// fill
{ action: 'fill', comp: CommandMapper_1.CmdCmp.ONE_TARGET__ONE_VALUE, template: 'I.fillField({{{target}}}, {{{value}}});' },
{ action: 'fill', comp: CommandMapper_1.CmdCmp.SAME_OPTION__ONE_TARGET__ONE_VALUE, options: ['field'], template: 'I.fillField({{{target}}}, {{{value}}});' },
{ action: 'fill', comp: CommandMapper_1.CmdCmp.SAME_OPTION__ONE_TARGET__ONE_VALUE, options: ['inside'], template: 'I.fillField({{{target}}}, {{{value}}});' },
// hide + keyboard (Appium only)
{ action: 'hide', comp: CommandMapper_1.CmdCmp.SAME_OPTION, options: ['keyboard'], template: 'I.hideDeviceKeyboard();' },
// install (Appium only)
Expand Down
1 change: 1 addition & 0 deletions plugins/codeceptjs/Commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const CODECEPTJS_COMMANDS: CmdCfg[] = [
// fill
{ action: 'fill', comp: CmdCmp.ONE_TARGET__ONE_VALUE, template: 'I.fillField({{{target}}}, {{{value}}});' },
{ action: 'fill', comp: CmdCmp.SAME_OPTION__ONE_TARGET__ONE_VALUE, options: [ 'field' ], template: 'I.fillField({{{target}}}, {{{value}}});' },
{ action: 'fill', comp: CmdCmp.SAME_OPTION__ONE_TARGET__ONE_VALUE, options: [ 'inside' ], template: 'I.fillField({{{target}}}, {{{value}}});' },
// hide + keyboard (Appium only)
{ action: 'hide', comp: CmdCmp.SAME_OPTION, options: [ 'keyboard' ], template: 'I.hideDeviceKeyboard();' },
// install (Appium only)
Expand Down

0 comments on commit 7026a76

Please sign in to comment.