ember-formulaic
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -11,8 +11,10 @@ 'use strict'; | ||
afterInstall: function() { | ||
this.insertIntoFile('tests/.jshintrc', ' "clickOn",' , { | ||
var predefs = [ | ||
' "clickOn",', | ||
' "fillForm",', | ||
].join('\n'); | ||
this.insertIntoFile('tests/.jshintrc', predefs, { | ||
after: '"predef": [\n' | ||
}); | ||
this.insertIntoFile('tests/.jshintrc', ' "fillForm",' , { | ||
after: '"predef": [\n' | ||
}); | ||
@@ -19,0 +21,0 @@ return this.addAddonToProject('ember-i18n', '~> 4.1.0'); |
master | ||
------ | ||
0.0.3 | ||
----- | ||
* Restructure files to enable `import './ember-formulaic/test-helpers';` | ||
* Change behvaior of `fillForm` to only work on | ||
`<label for="text">Text</label><input id="text">`, in addition to | ||
`<label>Text <input></label>` | ||
0.0.2 | ||
@@ -5,0 +13,0 @@ ----- |
{ | ||
"name": "ember-formulaic", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Simplified form filling", | ||
@@ -5,0 +5,0 @@ "directories": { |
@@ -12,2 +12,9 @@ # Ember-Formulaic | ||
First, import the test helpers: | ||
```js | ||
// tests/test-helper.js | ||
import './ember-formulaic/test-helpers'; | ||
``` | ||
Assume the page has the following template: | ||
@@ -67,15 +74,15 @@ | ||
test("fill in form", function() { | ||
visit("/login") | ||
test('fill in form', function() { | ||
visit('/login') | ||
fillForm({ | ||
"login.email": "ralph@thoughtbot.com", | ||
"login.password": "secret", | ||
"login.remember-me": true, | ||
"login.role": "user", | ||
'login.email': 'ralph@thoughtbot.com', | ||
'login.password': 'secret', | ||
'login.remember-me': true, | ||
'login.role': 'user', | ||
}); | ||
clickOn("form.submit"); | ||
clickOn('form.submit'); | ||
andThen(function() { | ||
equal(currentPath(), "loggedInPath"); | ||
equal(currentPath(), 'loggedInPath'); | ||
}); | ||
@@ -82,0 +89,0 @@ }); |
export default { | ||
'form': { | ||
'button': 'Sibling Button', | ||
'checkbox': 'Sibling Checkbox', | ||
'multi-select': 'Sibling Multi-Select', | ||
'select': 'Sibling Select', | ||
'submit': 'Sibling Submit', | ||
'text': 'Sibling Text', | ||
'textarea': 'Sibling Textarea', | ||
'button': 'For ID Button', | ||
'checkbox': 'For ID Checkbox', | ||
'multi-select': 'For ID Multi-Select', | ||
'select': 'For ID Select', | ||
'submit': 'For ID Submit', | ||
'text': 'For ID Text', | ||
'textarea': 'For ID Textarea', | ||
}, | ||
@@ -11,0 +11,0 @@ 'nested': { |
import Ember from 'ember'; | ||
import Application from '../../app'; | ||
import config from '../../config/environment'; | ||
import './test-helpers'; | ||
import './ember-formulaic/test-helpers'; | ||
@@ -6,0 +6,0 @@ function setupI18n(application) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
24456
438
111
0