Scenario: Updating profile picture
Given I am logged in
When I change my profile picture
Then my profile should be updated
And I should see the new profile picture
When /^I change my profile picture$/ do
visit("/user/profile")
module Faker | |
class Internet | |
def self.webpage | |
"https://#{Faker::Internet.user_name}.#{domain_name}" | |
end | |
end | |
class Geo | |
def self.lat | |
Random.rand(-90.00000000..90.00000000) |
# Grabs errors from a json response. | |
def from_json(json, save_cache = false) | |
array = Array.wrap(ActiveSupport::JSON.decode(json)['errors']) rescue [] | |
from_array array, save_cache | |
end | |
def from_array(messages, save_cache = false) | |
clear unless save_cache | |
humanized_attributes = Hash[@base.attributes.keys.map { |attr_name| [attr_name.humanize, attr_name] }] | |
messages.each do |message| |
[ 2013-10-03 13:13:09.4306 2839/7f6b7aef7700 Pool2/Implementation.cpp:1174 ]: [App 4249 stderr] cache error: Unknown storage provider: redis://localhost:6380/1/metastore | |
[ 2013-10-03 13:13:09.4306 2839/7f6b7aef7700 Pool2/Implementation.cpp:1174 ]: [App 4249 stderr] /var/lib/jenkins/workspace/master-plupin-web/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/storage.rb:39:in `create_store' | |
[ 2013-10-03 13:13:09.4306 2839/7f6b7aef7700 Pool2/Implementation.cpp:1174 ]: [App 4249 stderr] /var/lib/jenkins/workspace/master-plupin-web/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/storage.rb:18:in `resolve_metastore_uri' | |
[ 2013-10-03 13:13:09.4306 2839/7f6b7aef7700 Pool2/Implementation.cpp:1174 ]: [App 4249 stderr] /var/lib/jenkins/workspace/master-plupin-web/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:34:in `metastore' | |
[ 2013-10-03 13:13:09.4306 2839/7f6b7aef7700 Pool2/Implementation.cpp:1174 ]: [App 4249 stderr] /var/lib/jenkins/workspace/master-plupin-web/vendor/b |
Scenario: Updating profile picture
Given I am logged in
When I change my profile picture
Then my profile should be updated
And I should see the new profile picture
When /^I change my profile picture$/ do
visit("/user/profile")
class Measure | |
def valid? | |
true | |
end | |
end | |
Measure.extend(Spawn).spawner do |measure| | |
measure.source ||= ["profile","identity"].sample | |
measure.key ||= User::PROFILE_MEASURES.keys.sample.to_s | |
measure.type ||= measure.key | |
measure.unit ||= nil |
When /^I edit biometric value with "(.*)"$/ do |value| | |
@value = value | |
find(:css, "div[data-key='#{@key}']").hover | |
within("div[data-key='#{@key}']") do | |
find(:css, ".icon-edit").trigger("click") | |
end | |
within("div.resource-type-#{@key}") do | |
find(:css, "div.selectbox").click | |
end | |
within("ul.selectbox") do |
[taro@tarolandia lib]$ php -a (master ✗) | |
Interactive shell | |
php > include "m2x.php"; | |
php > $m2x = new M2X("b90db94f6ef123c3a291156b7a55e516"); | |
php > $r = $m2x->feeds()->view("8081a7e630caecfb184bdb5f18bad137"); | |
php > print_r($r->json()); | |
stdClass Object | |
( | |
[id] => 8081a7e630caecfb184bdb5f18bad137 |
{ | |
"status": "OK", | |
"accuracy": 10.0, | |
"location": { | |
"lat": 48.777, | |
"lng": 9.171, | |
"latitude": 48.777, | |
"longitude": 9.171, | |
"accuracy": 10.0 | |
} |
[taro@tarolandia mhealth]$ PROTEST_REPORT=progress be rake test (861-upgrade_riak_client ✔) | |
............................................................................................................................................................................ | |
172 tests, 391 assertions (172 passed, 0 pending, 0 failed, 0 errored) | |
Ran in 157.633680122 seconds | |
Coverage report generated for Protest to /home/taro/development/mhealth/coverage. 2948 / 5632 LOC (52.34%) covered. | |
[taro@tarolandia mhealth]$ PROTEST_REPORT=progress be rake test (861-upgrade_riak_client ✔) | |
............................................................................................................................................................................ | |
172 tests, 391 assertions (172 passed, 0 pending, 0 failed, 0 errored) |
The link Public Status Pages
programmatically opens an external resource into mHealth layout.
There are several problems with this behavior:
In order to handle
this unpredictable behavior the HTML tag iframe
(where the external content is loaded) supports scrollbars but they tend to look ugly in most of designs.
Another possible and recommended option is to open the resource into a new tab or windows.