rubygene 0.3.4 → 0.4.0

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.
@@ -0,0 +1 @@
1
+ url_home: https://automacaocombatista.herokuapp.com/
@@ -0,0 +1,6 @@
1
+ Dir[File.join(File.dirname(__FILE__),
2
+ '../pages/*_page.rb')].each { |file| require file }
3
+
4
+ # Modulos para chamar as classes instanciadas
5
+ module Pages
6
+ end
@@ -0,0 +1,8 @@
1
+ ## YAML Templatesss
2
+ ---
3
+ #para rodar em um determinado ambiente basta alterar o enviroment
4
+ #para rodar sem headless basta alterar para no_headless
5
+ #para rodar no firefox bastar colocar firefox
6
+ headless: headless
7
+ browser: chrome
8
+ environment: homolog
@@ -24,6 +24,14 @@ def create_page_file(name)
24
24
  "#{name.downcase}_page.rb"), opts)
25
25
  end
26
26
 
27
+ def create_page_rspec_file(name)
28
+ # opcoes usadas para gerar o arquivo na funcao de modelo
29
+ opts = { name: camelize(name) }
30
+ # Thor cria um arquivo com base no modelo templates/page.tt
31
+ template('page', File.join(FileUtils.pwd, 'pages',
32
+ "#{name.downcase}_page.rb"), opts)
33
+ end
34
+
27
35
  def create_service_file(name)
28
36
  # opcoes usadas para gerar o arquivo na funcao de modelo
29
37
  opts = { name: camelize(name) }
@@ -32,6 +40,14 @@ def create_service_file(name)
32
40
  "#{name.downcase}_services.rb"), opts)
33
41
  end
34
42
 
43
+ def create_service_rspec_file(name)
44
+ # opcoes usadas para gerar o arquivo na funcao de modelo
45
+ opts = { name: camelize(name) }
46
+ # Thor cria um arquivo com base no modelo templates/services.tt
47
+ template('services', File.join(FileUtils.pwd, 'services',
48
+ "#{name.downcase}_services.rb"), opts)
49
+ end
50
+
35
51
  def create_screens_file(name)
36
52
  # opcoes usadas para gerar o arquivo na funcao de modelo
37
53
  opts = { name: camelize(name) }
@@ -40,6 +56,14 @@ def create_screens_file(name)
40
56
  "#{name.downcase}_screens.rb"), opts)
41
57
  end
42
58
 
59
+ def create_spec_file(name)
60
+ # opcoes usadas para gerar o arquivo na funcao de modelo
61
+ opts = { name: camelize(name) }
62
+ # Thor cria um arquivo com base no modelo templates/specs.tt
63
+ template('specs', File.join(FileUtils.pwd, 'specs',
64
+ "#{name.downcase}_spec.rb"), opts)
65
+ end
66
+
43
67
  def camelize(string)
44
68
  camelized = ''
45
69
  string.split('_').each do |s|
@@ -56,3 +80,13 @@ def in_root_project_folder?
56
80
  end
57
81
  true
58
82
  end
83
+
84
+
85
+ def in_root_project_folder_rspec?
86
+ # Olha se o usuario esta na pasta raiz do projeto
87
+ unless Dir.exist?(File.join(FileUtils.pwd, 'specs'))
88
+ puts 'Please run this command on the root folder of the project'
89
+ exit 1
90
+ end
91
+ true
92
+ end
@@ -1,3 +1,3 @@
1
1
  module GenerateRubyTests
2
- VERSION = "0.3.4"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -6,6 +6,9 @@ en:
6
6
  given: "Given"
7
7
  when: "When"
8
8
  then: "Then"
9
+ describe: description
10
+ context: description
11
+ it: does something
9
12
  comments:
10
13
  insert_steps: "Insert steps"
11
14
  elements: "Declare all the elements of this page"
@@ -6,6 +6,9 @@ pt:
6
6
  given: "Dado"
7
7
  when: "Quando"
8
8
  then: "Entao"
9
+ describe: descrição
10
+ context: descrição
11
+ it: faz alguma coisa
9
12
  comments:
10
13
  insert_steps: "Insira os passos"
11
14
  elements: "Declare todos os elementos da página"
@@ -0,0 +1,6 @@
1
+ describe '<%= I18n.translate(:describe) %>' do
2
+ context '<%= I18n.translate(:context) %>' do
3
+ it '<%= I18n.translate(:it) %>' do
4
+ end
5
+ end
6
+ end
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.version = GenerateRubyTests::VERSION
8
8
  spec.authors = ['brunobatista25']
9
9
  spec.email = ['brunobatista101@gmail.com']
10
- spec.summary = %q{Generates an Web,Api and Mobile Test Automation project with Cucumber,
10
+ spec.summary = %q{Generates an Web,Api and Mobile Test Automation project with Cucumber, Rspec,
11
11
  SitePrism, Capybara, Selenium, Httparty and JsonSchema.}
12
12
  spec.description = %q{A simple gem to generate all files needed in a
13
13
  project Mobile, Web and Api for Testing Automation.}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubygene
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - brunobatista25
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-15 00:00:00.000000000 Z
11
+ date: 2018-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -115,6 +115,8 @@ files:
115
115
  - bin/console
116
116
  - bin/rubygene
117
117
  - bin/setup
118
+ - docs/Readme_pt.md
119
+ - docs/history_pt.md
118
120
  - history.md
119
121
  - lib/SkeletonApi/.gitignore
120
122
  - lib/SkeletonApi/Gemfile
@@ -141,9 +143,27 @@ files:
141
143
  - lib/SkeletonMobile/features/support/helper.rb
142
144
  - lib/SkeletonMobile/features/support/hooks.rb
143
145
  - lib/SkeletonMobile/features/support/page_helper.rb
146
+ - lib/SkeletonMobile/features/support/results/test_failed/.gitkeep
147
+ - lib/SkeletonMobile/features/support/results/test_passed/.gitkeep
144
148
  - lib/SkeletonMobile/results/report.html
145
149
  - lib/SkeletonMobile/results/report.json
146
150
  - lib/SkeletonMobile/results/screenshots/.gitkeep
151
+ - lib/SkeletonRspecApi/.gitignore
152
+ - lib/SkeletonRspecApi/.rspec
153
+ - lib/SkeletonRspecApi/Gemfile
154
+ - lib/SkeletonRspecApi/README.md
155
+ - lib/SkeletonRspecApi/results/.gitkeep
156
+ - lib/SkeletonRspecApi/services/.gitkeep
157
+ - lib/SkeletonRspecApi/specs/spec_helper.rb
158
+ - lib/SkeletonRspecWeb/.gitignore
159
+ - lib/SkeletonRspecWeb/.rspec
160
+ - lib/SkeletonRspecWeb/Gemfile
161
+ - lib/SkeletonRspecWeb/README.md
162
+ - lib/SkeletonRspecWeb/pages/.gitkeep
163
+ - lib/SkeletonRspecWeb/specs/spec_helper.rb
164
+ - lib/SkeletonRspecWeb/support/data/homolog.yml
165
+ - lib/SkeletonRspecWeb/support/page_helper.rb
166
+ - lib/SkeletonRspecWeb/support/rspec.yml
147
167
  - lib/SkeletonWeb/.gitignore
148
168
  - lib/SkeletonWeb/Gemfile
149
169
  - lib/SkeletonWeb/README.md
@@ -170,6 +190,7 @@ files:
170
190
  - lib/templates/page.tt
171
191
  - lib/templates/screens.tt
172
192
  - lib/templates/services.tt
193
+ - lib/templates/specs.tt
173
194
  - lib/templates/steps.tt
174
195
  - rubygene.gemspec
175
196
  homepage: https://github.com/brunobatista25/RubyGene
@@ -195,6 +216,6 @@ rubyforge_project:
195
216
  rubygems_version: 2.6.13
196
217
  signing_key:
197
218
  specification_version: 4
198
- summary: Generates an Web,Api and Mobile Test Automation project with Cucumber, SitePrism,
199
- Capybara, Selenium, Httparty and JsonSchema.
219
+ summary: Generates an Web,Api and Mobile Test Automation project with Cucumber, Rspec,
220
+ SitePrism, Capybara, Selenium, Httparty and JsonSchema.
200
221
  test_files: []