chemlab-library-the-internet 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/component/flash.rb +12 -0
- data/lib/page/index.rb +57 -0
- data/lib/page/index.stub.rb +1223 -0
- data/lib/page/login.rb +14 -0
- data/lib/page/login.stub.rb +107 -0
- data/lib/page/secure.rb +13 -0
- data/lib/page/secure.stub.rb +62 -0
- data/lib/the_internet.rb +16 -0
- metadata +121 -0
data/lib/page/login.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TheInternet
|
4
|
+
module Page
|
5
|
+
# Login Page
|
6
|
+
class Login < Chemlab::Page
|
7
|
+
path '/login'
|
8
|
+
|
9
|
+
text_field :username, id: 'username'
|
10
|
+
text_field :password, id: 'password'
|
11
|
+
button :login, type: 'submit'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TheInternet
|
4
|
+
module Page
|
5
|
+
module Login
|
6
|
+
|
7
|
+
# @note Defined as +text_field :username+
|
8
|
+
# @return [String] The text content or value of +username+
|
9
|
+
def username
|
10
|
+
# This is a stub, used for indexing
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
# Set the value of username
|
15
|
+
# @example
|
16
|
+
# TheInternet::Page::Login.perform do |login|
|
17
|
+
# login.username = 'value'
|
18
|
+
# end
|
19
|
+
# @param value [String] The value to set.
|
20
|
+
def username=(value)
|
21
|
+
# This is a stub, used for indexing
|
22
|
+
end
|
23
|
+
|
24
|
+
# @example
|
25
|
+
# TheInternet::Page::Login.perform do |login|
|
26
|
+
# expect(login.username_element).to exist
|
27
|
+
# end
|
28
|
+
# @return [Watir::TextField] The raw +TextField+ element
|
29
|
+
def username_element
|
30
|
+
# This is a stub, used for indexing
|
31
|
+
end
|
32
|
+
|
33
|
+
# @example
|
34
|
+
# TheInternet::Page::Login.perform do |login|
|
35
|
+
# expect(login).to be_username
|
36
|
+
# end
|
37
|
+
# @return [Boolean] true if the +username+ element is present on the page
|
38
|
+
def username?
|
39
|
+
# This is a stub, used for indexing
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
# @note Defined as +text_field :password+
|
44
|
+
# @return [String] The text content or value of +password+
|
45
|
+
def password
|
46
|
+
# This is a stub, used for indexing
|
47
|
+
end
|
48
|
+
|
49
|
+
|
50
|
+
# Set the value of password
|
51
|
+
# @example
|
52
|
+
# TheInternet::Page::Login.perform do |login|
|
53
|
+
# login.password = 'value'
|
54
|
+
# end
|
55
|
+
# @param value [String] The value to set.
|
56
|
+
def password=(value)
|
57
|
+
# This is a stub, used for indexing
|
58
|
+
end
|
59
|
+
|
60
|
+
# @example
|
61
|
+
# TheInternet::Page::Login.perform do |login|
|
62
|
+
# expect(login.password_element).to exist
|
63
|
+
# end
|
64
|
+
# @return [Watir::TextField] The raw +TextField+ element
|
65
|
+
def password_element
|
66
|
+
# This is a stub, used for indexing
|
67
|
+
end
|
68
|
+
|
69
|
+
# @example
|
70
|
+
# TheInternet::Page::Login.perform do |login|
|
71
|
+
# expect(login).to be_password
|
72
|
+
# end
|
73
|
+
# @return [Boolean] true if the +password+ element is present on the page
|
74
|
+
def password?
|
75
|
+
# This is a stub, used for indexing
|
76
|
+
end
|
77
|
+
|
78
|
+
|
79
|
+
# @note Defined as +button :login+
|
80
|
+
# Clicks +login+
|
81
|
+
def login
|
82
|
+
# This is a stub, used for indexing
|
83
|
+
end
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
# @example
|
88
|
+
# TheInternet::Page::Login.perform do |login|
|
89
|
+
# expect(login.login_element).to exist
|
90
|
+
# end
|
91
|
+
# @return [Watir::Button] The raw +Button+ element
|
92
|
+
def login_element
|
93
|
+
# This is a stub, used for indexing
|
94
|
+
end
|
95
|
+
|
96
|
+
# @example
|
97
|
+
# TheInternet::Page::Login.perform do |login|
|
98
|
+
# expect(login).to be_login
|
99
|
+
# end
|
100
|
+
# @return [Boolean] true if the +login+ element is present on the page
|
101
|
+
def login?
|
102
|
+
# This is a stub, used for indexing
|
103
|
+
end
|
104
|
+
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
data/lib/page/secure.rb
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TheInternet
|
4
|
+
module Page
|
5
|
+
module Secure
|
6
|
+
|
7
|
+
# @note Defined as +h4 :welcome_message+
|
8
|
+
# @return [String] The text content or value of +welcome_message+
|
9
|
+
def welcome_message
|
10
|
+
# This is a stub, used for indexing
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
# @example
|
16
|
+
# TheInternet::Page::Secure.perform do |secure|
|
17
|
+
# expect(secure.welcome_message_element).to exist
|
18
|
+
# end
|
19
|
+
# @return [Watir::H4] The raw +H4+ element
|
20
|
+
def welcome_message_element
|
21
|
+
# This is a stub, used for indexing
|
22
|
+
end
|
23
|
+
|
24
|
+
# @example
|
25
|
+
# TheInternet::Page::Secure.perform do |secure|
|
26
|
+
# expect(secure).to be_welcome_message
|
27
|
+
# end
|
28
|
+
# @return [Boolean] true if the +welcome_message+ element is present on the page
|
29
|
+
def welcome_message?
|
30
|
+
# This is a stub, used for indexing
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
# @note Defined as +link :logout+
|
35
|
+
# Clicks +logout+
|
36
|
+
def logout
|
37
|
+
# This is a stub, used for indexing
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
# @example
|
43
|
+
# TheInternet::Page::Secure.perform do |secure|
|
44
|
+
# expect(secure.logout_element).to exist
|
45
|
+
# end
|
46
|
+
# @return [Watir::Link] The raw +Link+ element
|
47
|
+
def logout_element
|
48
|
+
# This is a stub, used for indexing
|
49
|
+
end
|
50
|
+
|
51
|
+
# @example
|
52
|
+
# TheInternet::Page::Secure.perform do |secure|
|
53
|
+
# expect(secure).to be_logout
|
54
|
+
# end
|
55
|
+
# @return [Boolean] true if the +logout+ element is present on the page
|
56
|
+
def logout?
|
57
|
+
# This is a stub, used for indexing
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
data/lib/the_internet.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'chemlab'
|
4
|
+
|
5
|
+
# The Internet Chemlab Library
|
6
|
+
module TheInternet
|
7
|
+
module Component
|
8
|
+
autoload :Flash, 'component/flash'
|
9
|
+
end
|
10
|
+
|
11
|
+
module Page
|
12
|
+
autoload :Index, 'page/index'
|
13
|
+
autoload :Login, 'page/login'
|
14
|
+
autoload :Secure, 'page/secure'
|
15
|
+
end
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,121 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: chemlab-library-the-internet
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- GitLab Quality
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-05-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubocop
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.14.0
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.14.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop-rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.3.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.3.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: yard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.9.26
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.9.26
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: chemlab
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.6.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.6.0
|
83
|
+
description:
|
84
|
+
email:
|
85
|
+
- quality@gitlab.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- lib/component/flash.rb
|
91
|
+
- lib/page/index.rb
|
92
|
+
- lib/page/index.stub.rb
|
93
|
+
- lib/page/login.rb
|
94
|
+
- lib/page/login.stub.rb
|
95
|
+
- lib/page/secure.rb
|
96
|
+
- lib/page/secure.stub.rb
|
97
|
+
- lib/the_internet.rb
|
98
|
+
homepage: https://gitlab.com/gitlab-org/quality/chemlab-library-the-internet
|
99
|
+
licenses:
|
100
|
+
- MIT
|
101
|
+
metadata: {}
|
102
|
+
post_install_message:
|
103
|
+
rdoc_options: []
|
104
|
+
require_paths:
|
105
|
+
- lib
|
106
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 2.7.2
|
111
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - ">="
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0'
|
116
|
+
requirements: []
|
117
|
+
rubygems_version: 3.1.4
|
118
|
+
signing_key:
|
119
|
+
specification_version: 4
|
120
|
+
summary: Chemlab Library for "The Internet"
|
121
|
+
test_files: []
|