diff --git a/app/javascript/src/config/locales/utils.js b/app/javascript/src/config/locales/utils.js index 3b5c62876..246c21717 100644 --- a/app/javascript/src/config/locales/utils.js +++ b/app/javascript/src/config/locales/utils.js @@ -1,15 +1,15 @@ // with this utility function we can write nested locales like an json object -export function flattenMessages(nestedMessages, prefix = '') { - return Object.keys(nestedMessages).reduce((messages, key) => { - let value = nestedMessages[key]; - let prefixedKey = prefix ? `${prefix}.${key}` : key; +export function flattenMessages(nestedMessages, prefix = "") { + return Object.keys(nestedMessages).reduce((messages, key) => { + let value = nestedMessages[key]; + let prefixedKey = prefix ? `${prefix}.${key}` : key; - if (typeof value === 'string') { - messages[prefixedKey] = value; - } else { - Object.assign(messages, flattenMessages(value, prefixedKey)); - } + if (typeof value === "string") { + messages[prefixedKey] = value; + } else { + Object.assign(messages, flattenMessages(value, prefixedKey)); + } - return messages; - }, {}); + return messages; + }, {}); } diff --git a/features/support/env.rb b/features/support/env.rb index 0f55cb7eb..7ed037c52 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -15,10 +15,7 @@ headless.start Capybara::Webkit.configure do |config| # Enable debug mode. Prints a log of everything the driver is doing. - config.debug = true - - # By default, requests to outside domains (anything besides localhost) will - # result in a warning. Several methods allow you to change this behavior. + config.debug = false # Silently return an empty 200 response for any requests to unknown URLs. config.block_unknown_urls @@ -38,10 +35,6 @@ end Capybara.javascript_driver = :webkit -Before do - `bundle exec rails webpacker:compile` -end - # Capybara defaults to CSS3 selectors rather than XPath. # If you'd prefer to use XPath, just uncomment this line and adjust any # selectors in your step definitions to use the XPath syntax.