From df25f7a8a3854881bf6798ec8273835ce78313ac Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Wed, 4 Sep 2013 15:38:15 +0200 Subject: [PATCH 1/2] Remove enclosing curly braces from features and widgets --- .../CheckMyTrip/1 - DialingCodesFeature.js | 14 +++---- example/CheckMyTrip/2 - ClockFeature.js | 34 ++++++++-------- example/CheckMyTrip/3 - RegisterFeature.js | 18 ++++----- example/CheckMyTrip/ClockWidget.js | 40 +++++++++---------- example/CheckMyTrip/DialCodeWidget.js | 18 ++++----- example/CheckMyTrip/RegisterWidget.js | 20 +++++----- example/CheckMyTrip/TripToolsWidget.js | 8 ++-- .../1 - SearchFeature.js | 10 ++--- .../2 - ExistenceMatcherFeature.js | 14 +++---- .../3 - RegExpMatcherFeature.js | 16 ++++---- .../4 - FunctionMatcherFeature.js | 30 +++++++------- .../SearchBarWidget.js | 16 ++++---- .../ZeroClickWidget.js | 6 +-- example/DuckDuckGo/1 - ZeroClickFeature.js | 12 +++--- example/DuckDuckGo/SearchBarWidget.js | 16 ++++---- example/DuckDuckGo/ZeroClickWidget.js | 6 +-- example/PDC/1 - LoginFeature.js | 14 +++---- example/PDC/2 - ChangeNameFeature.js | 20 +++++----- example/PDC/3 - LogoutFeature.js | 12 +++--- example/PDC/4 - RequestPasswordFeature.js | 18 ++++----- example/PDC/LoginWidget.js | 22 +++++----- example/PDC/NameEditorWidget.js | 14 +++---- example/PDC/PasswordRequestWidget.js | 16 ++++---- example/PDC/ToolbarWidget.js | 10 ++--- src/controller/SuiteLoader.js | 6 +-- .../FailingSuite/1 - FailingFeature.js | 10 ++--- test/resources/FailingSuite/TestWidget.js | 6 +-- .../SucceedingSuite/1 - SucceedingFeature.js | 10 ++--- test/resources/SucceedingSuite/TestWidget.js | 6 +-- 29 files changed, 193 insertions(+), 249 deletions(-) diff --git a/example/CheckMyTrip/1 - DialingCodesFeature.js b/example/CheckMyTrip/1 - DialingCodesFeature.js index 92b7a74..24b9f9d 100644 --- a/example/CheckMyTrip/1 - DialingCodesFeature.js +++ b/example/CheckMyTrip/1 - DialingCodesFeature.js @@ -1,9 +1,7 @@ -{ - description: 'A user should be able to look up ' + dialCodeLookupCountry + '’s dialcode', +description: 'A user should be able to look up ' + dialCodeLookupCountry + '’s dialcode', - scenario: [ - TripToolsWidget.open(), - DialCodeWidget.lookup(dialCodeLookupCountry), - { 'DialCodeWidget.result': dialCodeExpectedResult } - ] -} +scenario: [ + TripToolsWidget.open(), + DialCodeWidget.lookup(dialCodeLookupCountry), + { 'DialCodeWidget.result': dialCodeExpectedResult } +] diff --git a/example/CheckMyTrip/2 - ClockFeature.js b/example/CheckMyTrip/2 - ClockFeature.js index 06e7f66..17c35ab 100644 --- a/example/CheckMyTrip/2 - ClockFeature.js +++ b/example/CheckMyTrip/2 - ClockFeature.js @@ -1,19 +1,17 @@ -{ - description: 'A user should be able to look up ' + clockLookupTown + '’s local time', +description: 'A user should be able to look up ' + clockLookupTown + '’s local time', - scenario: [ - function storeCurrentTime() { - return ClockWidget.getCurrentHour()() - .then(function(hour) { - storage.previousHour = hour; - }); - }, - ClockWidget.lookup(clockLookupTown), - function hasExpectedTimeDiff() { - return ClockWidget.getCurrentHour()() - .then(function(hour) { - assert.equal(hour, storage.previousHour - 1); - }); - } - ] -} +scenario: [ + function storeCurrentTime() { + return ClockWidget.getCurrentHour()() + .then(function(hour) { + storage.previousHour = hour; + }); + }, + ClockWidget.lookup(clockLookupTown), + function hasExpectedTimeDiff() { + return ClockWidget.getCurrentHour()() + .then(function(hour) { + assert.equal(hour, storage.previousHour - 1); + }); + } +] diff --git a/example/CheckMyTrip/3 - RegisterFeature.js b/example/CheckMyTrip/3 - RegisterFeature.js index c314b93..5c5ceb5 100644 --- a/example/CheckMyTrip/3 - RegisterFeature.js +++ b/example/CheckMyTrip/3 - RegisterFeature.js @@ -1,11 +1,9 @@ -{ - description: 'A user should be able to request an account', +description: 'A user should be able to request an account', - scenario: [ - RegisterWidget.register(firstName, lastName), - { - 'RegisterWidget.firstName' : firstName, - 'RegisterWidget.lastName' : lastName - } - ] -} +scenario: [ + RegisterWidget.register(firstName, lastName), + { + 'RegisterWidget.firstName' : firstName, + 'RegisterWidget.lastName' : lastName + } +] diff --git a/example/CheckMyTrip/ClockWidget.js b/example/CheckMyTrip/ClockWidget.js index c74287d..a8c0716 100644 --- a/example/CheckMyTrip/ClockWidget.js +++ b/example/CheckMyTrip/ClockWidget.js @@ -1,24 +1,22 @@ -{ - elements: { - field : { css: '#clock input[type=text]' }, - submitButton : { css: '#clock input[type=submit]' }, - result : { css: '#clock .time-holder .time' }, - selectAutocompleteResultButton : { css: '.xLISTItem_dropdown' } - }, +elements: { + field : { css: '#clock input[type=text]' }, + submitButton : { css: '#clock input[type=submit]' }, + result : { css: '#clock .time-holder .time' }, + selectAutocompleteResultButton : { css: '.xLISTItem_dropdown' } +}, - lookup: function lookup(town) { - return this.setField(town)() // immediate execution to start the chain - .delay(800) - .then(this.setField('\ue015')) // down arrow - .then(this.submit()); - }, +lookup: function lookup(town) { + return this.setField(town)() // immediate execution to start the chain + .delay(800) + .then(this.setField('\ue015')) // down arrow + .then(this.submit()); +}, - getCurrentHour: function getCurrentHour() { - return this.result.then(function(resultElement) { - return resultElement.text(); - }).then(function(text) { - var hour = text.split(':')[0]; // get the hour only - return +hour; // coerce the hour into a Number - }); - } +getCurrentHour: function getCurrentHour() { + return this.result.then(function(resultElement) { + return resultElement.text(); + }).then(function(text) { + var hour = text.split(':')[0]; // get the hour only + return +hour; // coerce the hour into a Number + }); } diff --git a/example/CheckMyTrip/DialCodeWidget.js b/example/CheckMyTrip/DialCodeWidget.js index ff8a2a4..64c22ee 100644 --- a/example/CheckMyTrip/DialCodeWidget.js +++ b/example/CheckMyTrip/DialCodeWidget.js @@ -1,12 +1,10 @@ -{ - elements: { - selector : { css: '#dialingCode input[type=text]' }, - submitButton : { css: '#dialingCode input[type=submit]' }, - result : { css: '#dialingCode .result-wrapper .main' }, - }, +elements: { + selector : { css: '#dialingCode input[type=text]' }, + submitButton : { css: '#dialingCode input[type=submit]' }, + result : { css: '#dialingCode .result-wrapper .main' }, +}, - lookup: function lookup(country) { - return this.setSelector(country)() // immediate execution to start the chain - .then(this.submit()); - } +lookup: function lookup(country) { + return this.setSelector(country)() // immediate execution to start the chain + .then(this.submit()); } diff --git a/example/CheckMyTrip/RegisterWidget.js b/example/CheckMyTrip/RegisterWidget.js index 29aa503..aeeb401 100644 --- a/example/CheckMyTrip/RegisterWidget.js +++ b/example/CheckMyTrip/RegisterWidget.js @@ -1,13 +1,11 @@ -{ - elements: { - firstName : { css: '#register #register_firstName' }, - lastName : { css: '#register #register_lastName' }, - submitButton: { css: '#register input[type=submit]'} - }, +elements: { + firstName : { css: '#register #register_firstName' }, + lastName : { css: '#register #register_lastName' }, + submitButton: { css: '#register input[type=submit]'} +}, - register: function(first, last) { - return this.setFirstName(first)() - .then(this.setLastName(last)) - .then(this.submit()); - } +register: function(first, last) { + return this.setFirstName(first)() + .then(this.setLastName(last)) + .then(this.submit()); } diff --git a/example/CheckMyTrip/TripToolsWidget.js b/example/CheckMyTrip/TripToolsWidget.js index eec6453..bc18ea0 100644 --- a/example/CheckMyTrip/TripToolsWidget.js +++ b/example/CheckMyTrip/TripToolsWidget.js @@ -1,6 +1,4 @@ -{ - elements: { - openLink : { css: 'em.icon.triptools' }, - toolsWrapper: { css: '.triptools-controls' } - } +elements: { + openLink : { css: 'em.icon.triptools' }, + toolsWrapper: { css: '.triptools-controls' } } diff --git a/example/DuckDuckGo - advanced matchers/1 - SearchFeature.js b/example/DuckDuckGo - advanced matchers/1 - SearchFeature.js index 0e2d25a..e1c1df3 100644 --- a/example/DuckDuckGo - advanced matchers/1 - SearchFeature.js +++ b/example/DuckDuckGo - advanced matchers/1 - SearchFeature.js @@ -1,7 +1,5 @@ -{ - description: 'Look up an ambiguous term', +description: 'Look up an ambiguous term', - scenario: [ - SearchBarWidget.searchFor(lookupTerm) - ] -} +scenario: [ + SearchBarWidget.searchFor(lookupTerm) +] diff --git a/example/DuckDuckGo - advanced matchers/2 - ExistenceMatcherFeature.js b/example/DuckDuckGo - advanced matchers/2 - ExistenceMatcherFeature.js index 48e27e1..583dbab 100644 --- a/example/DuckDuckGo - advanced matchers/2 - ExistenceMatcherFeature.js +++ b/example/DuckDuckGo - advanced matchers/2 - ExistenceMatcherFeature.js @@ -1,9 +1,7 @@ -{ - description: 'Make sure the Zero Click Info box exists with booleans', +description: 'Make sure the Zero Click Info box exists with booleans', - scenario: [ - { - 'ZeroClickWidget.header': true // prove that the element exists - } - ] -} +scenario: [ + { + 'ZeroClickWidget.header': true // prove that the element exists + } +] diff --git a/example/DuckDuckGo - advanced matchers/3 - RegExpMatcherFeature.js b/example/DuckDuckGo - advanced matchers/3 - RegExpMatcherFeature.js index 67520be..55d2a29 100644 --- a/example/DuckDuckGo - advanced matchers/3 - RegExpMatcherFeature.js +++ b/example/DuckDuckGo - advanced matchers/3 - RegExpMatcherFeature.js @@ -1,10 +1,8 @@ -{ - description: 'Match the Zero Click Info box header with RegExps', +description: 'Match the Zero Click Info box header with RegExps', - scenario: [ - { - 'ZeroClickWidget.header': /Meanings of/, // match the textual content with a static regexp… - 'ZeroClickWidget.header': new RegExp(lookupTerm + '$') // …or with a dynamic one - } - ] -} +scenario: [ + { + 'ZeroClickWidget.header': /Meanings of/, // match the textual content with a static regexp… + 'ZeroClickWidget.header': new RegExp(lookupTerm + '$') // …or with a dynamic one + } +] diff --git a/example/DuckDuckGo - advanced matchers/4 - FunctionMatcherFeature.js b/example/DuckDuckGo - advanced matchers/4 - FunctionMatcherFeature.js index ce359e7..677d8d2 100644 --- a/example/DuckDuckGo - advanced matchers/4 - FunctionMatcherFeature.js +++ b/example/DuckDuckGo - advanced matchers/4 - FunctionMatcherFeature.js @@ -1,18 +1,16 @@ -{ - description: 'Check an HTML attribute on an element with custom matcher functions', +description: 'Check an HTML attribute on an element with custom matcher functions', - scenario: [ - { - 'ZeroClickWidget.header': function isAlwaysValid(header) { // providing a good name (i.e. prefixed with `is`) for the function will allow for better reports - assert.ok(true, 'This is always valid'); // you can do whatever you please in a function; if it throws, it will be considered a failure - // Node's [assert](http://nodejs.org/api/assert.html) default library is injected, so you can use it instead of `throw`ing yourself - }, - 'SearchBarWidget.field': function hasNoAutocompletion(searchField) { // custom matchers are always passed a WD reference to the element they evaluate; see API for such objects at - return searchField.getAttribute('autocomplete') // notice that if you're using a promise, you should **always** `return` from it - .then(function(attribute) { // a promise-returning matcher will be evaluated based on whether it was resolved or rejected - assert.equal(attribute, 'off', 'Expected autocompletion to be off'); - }); - } +scenario: [ + { + 'ZeroClickWidget.header': function isAlwaysValid(header) { // providing a good name (i.e. prefixed with `is`) for the function will allow for better reports + assert.ok(true, 'This is always valid'); // you can do whatever you please in a function; if it throws, it will be considered a failure + // Node's [assert](http://nodejs.org/api/assert.html) default library is injected, so you can use it instead of `throw`ing yourself + }, + 'SearchBarWidget.field': function hasNoAutocompletion(searchField) { // custom matchers are always passed a WD reference to the element they evaluate; see API for such objects at + return searchField.getAttribute('autocomplete') // notice that if you're using a promise, you should **always** `return` from it + .then(function(attribute) { // a promise-returning matcher will be evaluated based on whether it was resolved or rejected + assert.equal(attribute, 'off', 'Expected autocompletion to be off'); + }); } - ] -} + } +] diff --git a/example/DuckDuckGo - advanced matchers/SearchBarWidget.js b/example/DuckDuckGo - advanced matchers/SearchBarWidget.js index 53f7cdd..07cbff4 100644 --- a/example/DuckDuckGo - advanced matchers/SearchBarWidget.js +++ b/example/DuckDuckGo - advanced matchers/SearchBarWidget.js @@ -1,11 +1,9 @@ -{ - elements: { - field: { name: 'q' }, - submitButton: { id: 'search_button_homepage' } - }, +elements: { + field: { name: 'q' }, + submitButton: { id: 'search_button_homepage' } +}, - searchFor: function searchFor(term) { - return this.setField(term)() - .then(this.submit()); - } +searchFor: function searchFor(term) { + return this.setField(term)() + .then(this.submit()); } diff --git a/example/DuckDuckGo - advanced matchers/ZeroClickWidget.js b/example/DuckDuckGo - advanced matchers/ZeroClickWidget.js index 324a513..89597e0 100644 --- a/example/DuckDuckGo - advanced matchers/ZeroClickWidget.js +++ b/example/DuckDuckGo - advanced matchers/ZeroClickWidget.js @@ -1,5 +1,3 @@ -{ - elements: { - header: { id: 'zero_click_heading' } - } +elements: { + header: { id: 'zero_click_heading' } } diff --git a/example/DuckDuckGo/1 - ZeroClickFeature.js b/example/DuckDuckGo/1 - ZeroClickFeature.js index c0c5d99..c352d0d 100644 --- a/example/DuckDuckGo/1 - ZeroClickFeature.js +++ b/example/DuckDuckGo/1 - ZeroClickFeature.js @@ -1,8 +1,6 @@ -{ - description: 'Looking up an ambiguous term should make a Zero Click Info box appear.', +description: 'Looking up an ambiguous term should make a Zero Click Info box appear.', - scenario: [ - SearchBarWidget.searchFor(lookupTerm), - { 'ZeroClickWidget.header': 'Meanings of ' + lookupTerm } - ] -} +scenario: [ + SearchBarWidget.searchFor(lookupTerm), + { 'ZeroClickWidget.header': 'Meanings of ' + lookupTerm } +] diff --git a/example/DuckDuckGo/SearchBarWidget.js b/example/DuckDuckGo/SearchBarWidget.js index 53f7cdd..07cbff4 100644 --- a/example/DuckDuckGo/SearchBarWidget.js +++ b/example/DuckDuckGo/SearchBarWidget.js @@ -1,11 +1,9 @@ -{ - elements: { - field: { name: 'q' }, - submitButton: { id: 'search_button_homepage' } - }, +elements: { + field: { name: 'q' }, + submitButton: { id: 'search_button_homepage' } +}, - searchFor: function searchFor(term) { - return this.setField(term)() - .then(this.submit()); - } +searchFor: function searchFor(term) { + return this.setField(term)() + .then(this.submit()); } diff --git a/example/DuckDuckGo/ZeroClickWidget.js b/example/DuckDuckGo/ZeroClickWidget.js index 324a513..89597e0 100644 --- a/example/DuckDuckGo/ZeroClickWidget.js +++ b/example/DuckDuckGo/ZeroClickWidget.js @@ -1,5 +1,3 @@ -{ - elements: { - header: { id: 'zero_click_heading' } - } +elements: { + header: { id: 'zero_click_heading' } } diff --git a/example/PDC/1 - LoginFeature.js b/example/PDC/1 - LoginFeature.js index b173ab1..b09dc61 100644 --- a/example/PDC/1 - LoginFeature.js +++ b/example/PDC/1 - LoginFeature.js @@ -1,10 +1,8 @@ -{ - description: 'A user should be able to log in', +description: 'A user should be able to log in', - scenario: [ - LoginWidget.open(), - LoginWidget.login(email, password), +scenario: [ + LoginWidget.open(), + LoginWidget.login(email, password), - { 'ToolbarWidget.username': oldName } - ] -} + { 'ToolbarWidget.username': oldName } +] diff --git a/example/PDC/2 - ChangeNameFeature.js b/example/PDC/2 - ChangeNameFeature.js index 3f0f0db..95c7d18 100644 --- a/example/PDC/2 - ChangeNameFeature.js +++ b/example/PDC/2 - ChangeNameFeature.js @@ -1,12 +1,10 @@ -{ - description: 'A user should be able to change his name', +description: 'A user should be able to change his name', - scenario: [ - ToolbarWidget.editUser(), - { 'ToolbarWidget.username': oldName }, - NameEditorWidget.setUsername(newName), - { 'ToolbarWidget.username': newName }, - NameEditorWidget.setUsername(oldName), - { 'ToolbarWidget.username': oldName } - ] -} +scenario: [ + ToolbarWidget.editUser(), + { 'ToolbarWidget.username': oldName }, + NameEditorWidget.setUsername(newName), + { 'ToolbarWidget.username': newName }, + NameEditorWidget.setUsername(oldName), + { 'ToolbarWidget.username': oldName } +] diff --git a/example/PDC/3 - LogoutFeature.js b/example/PDC/3 - LogoutFeature.js index 14a8807..73e2e18 100644 --- a/example/PDC/3 - LogoutFeature.js +++ b/example/PDC/3 - LogoutFeature.js @@ -1,8 +1,6 @@ -{ - description: 'A user should be able to log out', +description: 'A user should be able to log out', - scenario: [ - ToolbarWidget.logout(), - { 'LoginWidget.openLink': true } - ] -} +scenario: [ + ToolbarWidget.logout(), + { 'LoginWidget.openLink': true } +] diff --git a/example/PDC/4 - RequestPasswordFeature.js b/example/PDC/4 - RequestPasswordFeature.js index 0de7f55..042233c 100644 --- a/example/PDC/4 - RequestPasswordFeature.js +++ b/example/PDC/4 - RequestPasswordFeature.js @@ -1,11 +1,9 @@ -{ - description: 'A password reset request should be protected by a captcha', +description: 'A password reset request should be protected by a captcha', - scenario: [ - LoginWidget.open(), - LoginWidget.requestPassword(), - { 'PasswordRequestWidget.captcha': true }, - PasswordRequestWidget.askFor(badEmail), // check that the captcha is here even after having tried to ask for a reset - { 'PasswordRequestWidget.captcha': true } - ] -} +scenario: [ + LoginWidget.open(), + LoginWidget.requestPassword(), + { 'PasswordRequestWidget.captcha': true }, + PasswordRequestWidget.askFor(badEmail), // check that the captcha is here even after having tried to ask for a reset + { 'PasswordRequestWidget.captcha': true } +] diff --git a/example/PDC/LoginWidget.js b/example/PDC/LoginWidget.js index 5b81428..9df1675 100644 --- a/example/PDC/LoginWidget.js +++ b/example/PDC/LoginWidget.js @@ -1,14 +1,12 @@ -{ - elements: { - openLink : { linkText: 'Connexion' }, - email : { id: 'login_email' }, - password : { id: 'login_password' }, - requestPasswordLink : { css: 'form .details a' } - }, +elements: { + openLink : { linkText: 'Connexion' }, + email : { id: 'login_email' }, + password : { id: 'login_password' }, + requestPasswordLink : { css: 'form .details a' } +}, - login: function login(email, password) { - return this.setEmail(email)() - .then(this.setPassword(password)) - .then(driver.submit.bind(driver)); - } +login: function login(email, password) { + return this.setEmail(email)() + .then(this.setPassword(password)) + .then(driver.submit.bind(driver)); } diff --git a/example/PDC/NameEditorWidget.js b/example/PDC/NameEditorWidget.js index f23d436..b3f9a64 100644 --- a/example/PDC/NameEditorWidget.js +++ b/example/PDC/NameEditorWidget.js @@ -1,10 +1,8 @@ -{ - elements: { - usernameField: { id: 'profile_display_name' } - }, +elements: { + usernameField: { id: 'profile_display_name' } +}, - setUsername: function setUsername(newName) { - return this.setUsernameField(newName)() - .then(driver.submit.bind(driver)); - } +setUsername: function setUsername(newName) { + return this.setUsernameField(newName)() + .then(driver.submit.bind(driver)); } diff --git a/example/PDC/PasswordRequestWidget.js b/example/PDC/PasswordRequestWidget.js index 90f3996..76f3237 100644 --- a/example/PDC/PasswordRequestWidget.js +++ b/example/PDC/PasswordRequestWidget.js @@ -1,11 +1,9 @@ -{ - elements: { - email : { id: 'request_email' }, - captcha : { id: 'recaptcha_response_field' } - }, +elements: { + email : { id: 'request_email' }, + captcha : { id: 'recaptcha_response_field' } +}, - askFor: function(address) { - return this.setEmail(address)() - .then(driver.submit.bind(driver)); - } +askFor: function(address) { + return this.setEmail(address)() + .then(driver.submit.bind(driver)); } diff --git a/example/PDC/ToolbarWidget.js b/example/PDC/ToolbarWidget.js index 9b167f4..28dd706 100644 --- a/example/PDC/ToolbarWidget.js +++ b/example/PDC/ToolbarWidget.js @@ -1,7 +1,5 @@ -{ - elements: { - username : { xpath: '//article[@id="login"]/section[2]/span' }, - logoutLink : { xpath: '//article[@id="login"]/section[2]/a[2]' }, - editUserLink: { xpath: '//article[@id="login"]/section[2]/a[1]' } - } +elements: { + username : { xpath: '//article[@id="login"]/section[2]/span' }, + logoutLink : { xpath: '//article[@id="login"]/section[2]/a[2]' }, + editUserLink: { xpath: '//article[@id="login"]/section[2]/a[1]' } } diff --git a/src/controller/SuiteLoader.js b/src/controller/SuiteLoader.js index f474d1d..b7fb596 100644 --- a/src/controller/SuiteLoader.js +++ b/src/controller/SuiteLoader.js @@ -308,8 +308,8 @@ var SuiteLoader = new Class( /** @lends SuiteLoader# */ { try { vm.runInContext(widgetName + ' = ' + '__widgets__["' + widgetName + '"] = ' - + 'new Widget("' + widgetName + '",' - + fs.readFileSync(widgetFile) + ',' + + 'new Widget("' + widgetName + '", ' + + '{' + fs.readFileSync(widgetFile) + '},' + 'driver);', this.context, widgetFile); @@ -341,7 +341,7 @@ var SuiteLoader = new Class( /** @lends SuiteLoader# */ { ]; try { - vm.runInContext('var featureContents = ' + fs.readFileSync(featureFile) + ';' + vm.runInContext('var featureContents = {' + fs.readFileSync(featureFile) + '};' + '__features__.push(new Feature(' + featureParams.join(',') + '));', diff --git a/test/resources/FailingSuite/1 - FailingFeature.js b/test/resources/FailingSuite/1 - FailingFeature.js index 999ffe0..d4bb611 100644 --- a/test/resources/FailingSuite/1 - FailingFeature.js +++ b/test/resources/FailingSuite/1 - FailingFeature.js @@ -1,7 +1,5 @@ -{ - description: 'Trying to access a missing element should fail.', +description: 'Trying to access a missing element should fail.', - scenario: [ - { 'TestWidget.missing': true } - ] -} +scenario: [ + { 'TestWidget.missing': true } +] diff --git a/test/resources/FailingSuite/TestWidget.js b/test/resources/FailingSuite/TestWidget.js index b1081d7..ea68a04 100644 --- a/test/resources/FailingSuite/TestWidget.js +++ b/test/resources/FailingSuite/TestWidget.js @@ -1,5 +1,3 @@ -{ - elements: { - missing: { id: 'missing' } - } +elements: { + missing: { id: 'missing' } } diff --git a/test/resources/SucceedingSuite/1 - SucceedingFeature.js b/test/resources/SucceedingSuite/1 - SucceedingFeature.js index 7edb6fe..5fdf9d0 100644 --- a/test/resources/SucceedingSuite/1 - SucceedingFeature.js +++ b/test/resources/SucceedingSuite/1 - SucceedingFeature.js @@ -1,7 +1,5 @@ -{ - description: 'Trying to access a existing element should succeed.', +description: 'Trying to access a existing element should succeed.', - scenario: [ - { 'TestWidget.present': true } - ] -} +scenario: [ + { 'TestWidget.present': true } +] diff --git a/test/resources/SucceedingSuite/TestWidget.js b/test/resources/SucceedingSuite/TestWidget.js index 54e3e61..fcbf119 100644 --- a/test/resources/SucceedingSuite/TestWidget.js +++ b/test/resources/SucceedingSuite/TestWidget.js @@ -1,5 +1,3 @@ -{ - elements: { - present: { css: 'body' } - } +elements: { + present: { css: 'body' } } From 6659bf8a872d5d54d14564e3f4c4c37529819946 Mon Sep 17 00:00:00 2001 From: Matti Schneider Date: Wed, 4 Sep 2013 16:09:06 +0200 Subject: [PATCH 2/2] Add upgrade guide draft --- doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc b/doc index d0f030b..1d4b4ed 160000 --- a/doc +++ b/doc @@ -1 +1 @@ -Subproject commit d0f030bfd1ab27240692620274036f1228423d03 +Subproject commit 1d4b4edb747057c17b812f198101907426308b7a