lesson_builder_helpers 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc237f619bedf858cc4668d4ca5a1c821b543ac0
4
- data.tar.gz: e89f85fd001b849cb8b4bcc545289acf5d11c2b0
3
+ metadata.gz: f75effdcfd2a9eee9ed096c5188e45035630dd39
4
+ data.tar.gz: c3f24076efb3709fc92f0f4a9bb85633cff4693e
5
5
  SHA512:
6
- metadata.gz: 242373477fd8d879669e20a2571ac13f6e23f5276deaee3d4461347300bad19c3cba6342d248546419e58f6e7c4b9396194228ea1b4b7486f231a58a592e0534
7
- data.tar.gz: 3bacf21f0abf542e339077e1a60812e3da665f9d852947950be986d0147368ca9242d94d2551248da303416e091d5c98616c58c4c3fa8dce6cd9151d72762343
6
+ metadata.gz: 7521adc449836416743870f5d38069c4f27529abca7346e8cb36abe96b08ca31fed6757fe6555ff09bab2ae6b373ca2e0e121cfd2dcffa338455b2df045fdc2a
7
+ data.tar.gz: 4867974d7a193e3efba804df9b458f2e2867ce4d84d0d68e79140d85ad9306e77038dabfc782e3fe34b040a79e8a8ac6e6e625459231e465396737b18942edd4
@@ -1,7 +1,9 @@
1
1
  require_relative 'lesson_builder_helpers/login'
2
+ require_relative 'lesson_builder_helpers/google_oauth_flow'
2
3
 
3
4
  module LessonBuilderHelpers
4
5
  include Login
6
+ include GoogleOauthFlow
5
7
  end
6
8
 
7
9
  World(LessonBuilderHelpers)
@@ -0,0 +1,32 @@
1
+ module GoogleOauthFlow
2
+ def should_grant_access?
3
+ page.has_css? '.redtext'
4
+ end
5
+
6
+ def should_accept_consent?
7
+ page.has_css? '#submit_approve_access'
8
+ end
9
+
10
+ def account_already_signed_in? email
11
+ page.has_css? '.account-email', text: email
12
+ end
13
+
14
+ def is_on_landing_page?
15
+ on_login_time do
16
+ page.has_css? '#landing-wrapper'
17
+ end
18
+ end
19
+
20
+ def select_account email
21
+ page.should have_css 'button[value="' + email + '"]'
22
+ find('button[value="' + email + '"]').click
23
+ end
24
+
25
+ def grant_access
26
+ click_button 'choose-account-0'
27
+ end
28
+
29
+ def accept_consent
30
+ click_button 'submit_approve_access'
31
+ end
32
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesson_builder_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sarah Michaelson
@@ -18,6 +18,7 @@ extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
20
  - lib/lesson_builder_helpers.rb
21
+ - lib/lesson_builder_helpers/google_oauth_flow.rb
21
22
  - lib/lesson_builder_helpers/login.rb
22
23
  homepage:
23
24
  licenses: []