cypress-on-rails 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -6
- data/CHANGELOG.md +4 -0
- data/README.md +61 -27
- data/lib/cypress_dev/version.rb +1 -1
- data/lib/generators/cypress_dev/install_generator.rb +7 -5
- data/lib/generators/cypress_dev/templates/spec/cypress/app_commands/activerecord_fixtures.rb +21 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/app_commands/clean.rb +1 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/app_commands/scenarios/basic.rb +2 -1
- data/lib/generators/cypress_dev/templates/spec/cypress/fixtures/example.json +5 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/actions.spec.js +272 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/aliasing.spec.js +42 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/assertions.spec.js +63 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/connectors.spec.js +55 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/cookies.spec.js +78 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/cypress_api.spec.js +211 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/files.spec.js +86 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/local_storage.spec.js +52 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/location.spec.js +32 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/misc.spec.js +68 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/navigation.spec.js +54 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/network_requests.spec.js +108 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/querying.spec.js +65 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/spies_stubs_clocks.spec.js +62 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/traversal.spec.js +121 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/utilities.spec.js +89 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/viewport.spec.js +59 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/waiting.spec.js +34 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/examples/window.spec.js +22 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/rails_examples/other_spec.js +25 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/rails_examples/using_factory_bot.js +31 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/rails_examples/using_fixtures.js +33 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/rails_examples/using_scenarios_spec.js +26 -0
- data/lib/generators/cypress_dev/templates/spec/cypress/support/on-rails.js +7 -3
- data/spec/integrations/cypress.json +5 -0
- data/spec/integrations/rails_3_2/app/models/post.rb +4 -0
- data/spec/integrations/rails_3_2/app/views/welcome/index.html.erb +24 -5
- data/spec/integrations/rails_3_2/test.sh +9 -3
- data/spec/integrations/rails_4_2/.gitignore +5 -5
- data/spec/integrations/rails_4_2/app/models/post.rb +4 -0
- data/spec/integrations/rails_4_2/app/views/welcome/index.html.erb +24 -5
- data/spec/integrations/rails_4_2/test.sh +11 -4
- data/spec/integrations/rails_5_2/.gitignore +7 -5
- data/spec/integrations/rails_5_2/Gemfile +2 -0
- data/spec/integrations/rails_5_2/app/assets/javascripts/posts.js +2 -0
- data/spec/integrations/rails_5_2/app/assets/stylesheets/posts.css +4 -0
- data/spec/integrations/rails_5_2/app/assets/stylesheets/scaffold.css +80 -0
- data/spec/integrations/rails_5_2/app/controllers/posts_controller.rb +58 -0
- data/spec/integrations/rails_5_2/app/helpers/posts_helper.rb +2 -0
- data/spec/integrations/rails_5_2/app/models/application_record.rb +3 -0
- data/spec/integrations/rails_5_2/app/models/post.rb +1 -12
- data/spec/integrations/rails_5_2/app/views/posts/_form.html.erb +32 -0
- data/spec/integrations/rails_5_2/app/views/posts/edit.html.erb +6 -0
- data/spec/integrations/rails_5_2/app/views/posts/index.html.erb +31 -0
- data/spec/integrations/rails_5_2/app/views/posts/new.html.erb +5 -0
- data/spec/integrations/rails_5_2/app/views/posts/show.html.erb +19 -0
- data/spec/integrations/rails_5_2/config/application.rb +2 -2
- data/spec/integrations/rails_5_2/config/database.yml +15 -0
- data/spec/integrations/rails_5_2/config/routes.rb +2 -1
- data/spec/integrations/rails_5_2/db/migrate/20180621085832_create_posts.rb +11 -0
- data/spec/integrations/rails_5_2/test.sh +14 -5
- data/spec/integrations/rails_5_2/test/controllers/posts_controller_test.rb +48 -0
- data/spec/integrations/rails_5_2/test/cypress_fixtures/posts.yml +11 -0
- data/spec/integrations/rails_5_2/test/fixtures/posts.yml +11 -0
- data/spec/integrations/rails_5_2/test/models/post_test.rb +7 -0
- metadata +45 -4
- data/lib/generators/cypress_dev/templates/spec/cypress/integration/on_rails_spec.js +0 -33
- data/spec/integrations/rails_5_2/app/controllers/welcome_controller.rb +0 -4
@@ -0,0 +1,32 @@
|
|
1
|
+
<%= form_with(model: post, local: true) do |form| %>
|
2
|
+
<% if post.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(post.errors.count, "error") %> prohibited this post from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% post.errors.full_messages.each do |message| %>
|
8
|
+
<li><%= message %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div class="field">
|
15
|
+
<%= form.label :title %>
|
16
|
+
<%= form.text_field :title %>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="field">
|
20
|
+
<%= form.label :body %>
|
21
|
+
<%= form.text_area :body %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="field">
|
25
|
+
<%= form.label :published %>
|
26
|
+
<%= form.check_box :published %>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="actions">
|
30
|
+
<%= form.submit %>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
2
|
+
|
3
|
+
<h1>Posts</h1>
|
4
|
+
|
5
|
+
<table>
|
6
|
+
<thead>
|
7
|
+
<tr>
|
8
|
+
<th>Title</th>
|
9
|
+
<th>Body</th>
|
10
|
+
<th>Published</th>
|
11
|
+
<th colspan="3"></th>
|
12
|
+
</tr>
|
13
|
+
</thead>
|
14
|
+
|
15
|
+
<tbody>
|
16
|
+
<% @posts.each do |post| %>
|
17
|
+
<tr>
|
18
|
+
<td><%= post.title %></td>
|
19
|
+
<td><%= post.body %></td>
|
20
|
+
<td><%= post.published %></td>
|
21
|
+
<td><%= link_to 'Show', post %></td>
|
22
|
+
<td><%= link_to 'Edit', edit_post_path(post) %></td>
|
23
|
+
<td><%= link_to 'Destroy', post, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
24
|
+
</tr>
|
25
|
+
<% end %>
|
26
|
+
</tbody>
|
27
|
+
</table>
|
28
|
+
|
29
|
+
<br>
|
30
|
+
|
31
|
+
<%= link_to 'New Post', new_post_path %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
<strong>Title:</strong>
|
5
|
+
<%= @post.title %>
|
6
|
+
</p>
|
7
|
+
|
8
|
+
<p>
|
9
|
+
<strong>Body:</strong>
|
10
|
+
<%= @post.body %>
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<p>
|
14
|
+
<strong>Published:</strong>
|
15
|
+
<%= @post.published %>
|
16
|
+
</p>
|
17
|
+
|
18
|
+
<%= link_to 'Edit', edit_post_path(@post) %> |
|
19
|
+
<%= link_to 'Back', posts_path %>
|
@@ -4,14 +4,14 @@ require "rails"
|
|
4
4
|
# Pick the frameworks you want:
|
5
5
|
require "active_model/railtie"
|
6
6
|
require "active_job/railtie"
|
7
|
-
|
7
|
+
require "active_record/railtie"
|
8
8
|
# require "active_storage/engine"
|
9
9
|
require "action_controller/railtie"
|
10
10
|
# require "action_mailer/railtie"
|
11
11
|
require "action_view/railtie"
|
12
12
|
# require "action_cable/engine"
|
13
13
|
# require "sprockets/railtie"
|
14
|
-
|
14
|
+
require "rails/test_unit/railtie"
|
15
15
|
|
16
16
|
# Require the gems listed in Gemfile, including any gems
|
17
17
|
# you've limited to :test, :development, or :production.
|
@@ -0,0 +1,15 @@
|
|
1
|
+
default: &default
|
2
|
+
adapter: sqlite3
|
3
|
+
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
4
|
+
timeout: 5000
|
5
|
+
|
6
|
+
development:
|
7
|
+
<<: *default
|
8
|
+
database: db/development.sqlite3
|
9
|
+
|
10
|
+
# Warning: The database defined as "test" will be erased and
|
11
|
+
# re-generated from your development database when you run "rake".
|
12
|
+
# Do not set this db to the same as development or production.
|
13
|
+
test:
|
14
|
+
<<: *default
|
15
|
+
database: db/test.sqlite3
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
|
-
set -
|
2
|
+
set -eo pipefail
|
3
3
|
|
4
4
|
echo '--- testing rails 5.2'
|
5
5
|
|
@@ -13,8 +13,11 @@ echo '-- bundle install'
|
|
13
13
|
bundle --version
|
14
14
|
bundle install --quiet --gemfile="$DIR/Gemfile" --retry 2 --path vendor/bundle
|
15
15
|
|
16
|
+
echo '-- migration'
|
17
|
+
bin/rails db:migrate
|
18
|
+
|
16
19
|
echo '-- cypress install'
|
17
|
-
bundle exec ./bin/rails g cypress_dev:install
|
20
|
+
bundle exec ./bin/rails g cypress_dev:install --cypress_folder=test/cypress --no-install-cypress-examples
|
18
21
|
|
19
22
|
echo '-- start rails server'
|
20
23
|
# make sure the server is not running
|
@@ -24,8 +27,14 @@ bundle exec ./bin/rails server -p 5002 -e test &
|
|
24
27
|
sleep 2 # give rails a chance to start up correctly
|
25
28
|
|
26
29
|
echo '-- cypress run'
|
27
|
-
|
28
|
-
|
30
|
+
cp -fv ../cypress.json test/
|
31
|
+
cd test
|
32
|
+
if [ -z $CYPRESS_RECORD_KEY ]
|
33
|
+
then
|
34
|
+
yarn run cypress run
|
35
|
+
else
|
36
|
+
yarn run cypress run --record
|
37
|
+
fi
|
29
38
|
|
30
39
|
echo '-- stop rails server'
|
31
|
-
kill -9 `cat ../tmp/pids/server.pid`
|
40
|
+
kill -9 `cat ../tmp/pids/server.pid` || true
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class PostsControllerTest < ActionDispatch::IntegrationTest
|
4
|
+
setup do
|
5
|
+
@post = posts(:one)
|
6
|
+
end
|
7
|
+
|
8
|
+
test "should get index" do
|
9
|
+
get posts_url
|
10
|
+
assert_response :success
|
11
|
+
end
|
12
|
+
|
13
|
+
test "should get new" do
|
14
|
+
get new_post_url
|
15
|
+
assert_response :success
|
16
|
+
end
|
17
|
+
|
18
|
+
test "should create post" do
|
19
|
+
assert_difference('Post.count') do
|
20
|
+
post posts_url, params: { post: { body: @post.body, published: @post.published, title: @post.title } }
|
21
|
+
end
|
22
|
+
|
23
|
+
assert_redirected_to post_url(Post.last)
|
24
|
+
end
|
25
|
+
|
26
|
+
test "should show post" do
|
27
|
+
get post_url(@post)
|
28
|
+
assert_response :success
|
29
|
+
end
|
30
|
+
|
31
|
+
test "should get edit" do
|
32
|
+
get edit_post_url(@post)
|
33
|
+
assert_response :success
|
34
|
+
end
|
35
|
+
|
36
|
+
test "should update post" do
|
37
|
+
patch post_url(@post), params: { post: { body: @post.body, published: @post.published, title: @post.title } }
|
38
|
+
assert_redirected_to post_url(@post)
|
39
|
+
end
|
40
|
+
|
41
|
+
test "should destroy post" do
|
42
|
+
assert_difference('Post.count', -1) do
|
43
|
+
delete post_url(@post)
|
44
|
+
end
|
45
|
+
|
46
|
+
assert_redirected_to posts_url
|
47
|
+
end
|
48
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cypress-on-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- miceportal team
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-07-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
@@ -96,12 +96,36 @@ files:
|
|
96
96
|
- lib/generators/cypress_dev/install_generator.rb
|
97
97
|
- lib/generators/cypress_dev/templates/config/initializers/cypress_dev.rb.erb
|
98
98
|
- lib/generators/cypress_dev/templates/spec/cypress.json
|
99
|
+
- lib/generators/cypress_dev/templates/spec/cypress/app_commands/activerecord_fixtures.rb
|
99
100
|
- lib/generators/cypress_dev/templates/spec/cypress/app_commands/clean.rb
|
100
101
|
- lib/generators/cypress_dev/templates/spec/cypress/app_commands/eval.rb
|
101
102
|
- lib/generators/cypress_dev/templates/spec/cypress/app_commands/factory_bot.rb
|
102
103
|
- lib/generators/cypress_dev/templates/spec/cypress/app_commands/scenarios/basic.rb
|
103
104
|
- lib/generators/cypress_dev/templates/spec/cypress/cypress_helper.rb
|
104
|
-
- lib/generators/cypress_dev/templates/spec/cypress/
|
105
|
+
- lib/generators/cypress_dev/templates/spec/cypress/fixtures/example.json
|
106
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/actions.spec.js
|
107
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/aliasing.spec.js
|
108
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/assertions.spec.js
|
109
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/connectors.spec.js
|
110
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/cookies.spec.js
|
111
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/cypress_api.spec.js
|
112
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/files.spec.js
|
113
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/local_storage.spec.js
|
114
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/location.spec.js
|
115
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/misc.spec.js
|
116
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/navigation.spec.js
|
117
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/network_requests.spec.js
|
118
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/querying.spec.js
|
119
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/spies_stubs_clocks.spec.js
|
120
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/traversal.spec.js
|
121
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/utilities.spec.js
|
122
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/viewport.spec.js
|
123
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/waiting.spec.js
|
124
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/examples/window.spec.js
|
125
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/rails_examples/other_spec.js
|
126
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/rails_examples/using_factory_bot.js
|
127
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/rails_examples/using_fixtures.js
|
128
|
+
- lib/generators/cypress_dev/templates/spec/cypress/integration/rails_examples/using_scenarios_spec.js
|
105
129
|
- lib/generators/cypress_dev/templates/spec/cypress/support/commands.js
|
106
130
|
- lib/generators/cypress_dev/templates/spec/cypress/support/index.js
|
107
131
|
- lib/generators/cypress_dev/templates/spec/cypress/support/on-rails.js
|
@@ -113,6 +137,7 @@ files:
|
|
113
137
|
- spec/cypress_dev/middleware_spec.rb
|
114
138
|
- spec/cypress_dev/railtie_spec.rb
|
115
139
|
- spec/cypress_dev/smart_factory_wrapper_spec.rb
|
140
|
+
- spec/integrations/cypress.json
|
116
141
|
- spec/integrations/rails_3_2/.gitignore
|
117
142
|
- spec/integrations/rails_3_2/Gemfile
|
118
143
|
- spec/integrations/rails_3_2/README.rdoc
|
@@ -190,11 +215,21 @@ files:
|
|
190
215
|
- spec/integrations/rails_5_2/Gemfile
|
191
216
|
- spec/integrations/rails_5_2/README.md
|
192
217
|
- spec/integrations/rails_5_2/Rakefile
|
218
|
+
- spec/integrations/rails_5_2/app/assets/javascripts/posts.js
|
219
|
+
- spec/integrations/rails_5_2/app/assets/stylesheets/posts.css
|
220
|
+
- spec/integrations/rails_5_2/app/assets/stylesheets/scaffold.css
|
193
221
|
- spec/integrations/rails_5_2/app/controllers/application_controller.rb
|
194
|
-
- spec/integrations/rails_5_2/app/controllers/
|
222
|
+
- spec/integrations/rails_5_2/app/controllers/posts_controller.rb
|
223
|
+
- spec/integrations/rails_5_2/app/helpers/posts_helper.rb
|
195
224
|
- spec/integrations/rails_5_2/app/jobs/application_job.rb
|
225
|
+
- spec/integrations/rails_5_2/app/models/application_record.rb
|
196
226
|
- spec/integrations/rails_5_2/app/models/post.rb
|
197
227
|
- spec/integrations/rails_5_2/app/views/layouts/application.html.erb
|
228
|
+
- spec/integrations/rails_5_2/app/views/posts/_form.html.erb
|
229
|
+
- spec/integrations/rails_5_2/app/views/posts/edit.html.erb
|
230
|
+
- spec/integrations/rails_5_2/app/views/posts/index.html.erb
|
231
|
+
- spec/integrations/rails_5_2/app/views/posts/new.html.erb
|
232
|
+
- spec/integrations/rails_5_2/app/views/posts/show.html.erb
|
198
233
|
- spec/integrations/rails_5_2/app/views/welcome/index.html.erb
|
199
234
|
- spec/integrations/rails_5_2/bin/bundle
|
200
235
|
- spec/integrations/rails_5_2/bin/rails
|
@@ -205,6 +240,7 @@ files:
|
|
205
240
|
- spec/integrations/rails_5_2/config/application.rb
|
206
241
|
- spec/integrations/rails_5_2/config/boot.rb
|
207
242
|
- spec/integrations/rails_5_2/config/credentials.yml.enc
|
243
|
+
- spec/integrations/rails_5_2/config/database.yml
|
208
244
|
- spec/integrations/rails_5_2/config/environment.rb
|
209
245
|
- spec/integrations/rails_5_2/config/environments/development.rb
|
210
246
|
- spec/integrations/rails_5_2/config/environments/production.rb
|
@@ -220,6 +256,7 @@ files:
|
|
220
256
|
- spec/integrations/rails_5_2/config/locales/en.yml
|
221
257
|
- spec/integrations/rails_5_2/config/master.key
|
222
258
|
- spec/integrations/rails_5_2/config/routes.rb
|
259
|
+
- spec/integrations/rails_5_2/db/migrate/20180621085832_create_posts.rb
|
223
260
|
- spec/integrations/rails_5_2/public/404.html
|
224
261
|
- spec/integrations/rails_5_2/public/422.html
|
225
262
|
- spec/integrations/rails_5_2/public/500.html
|
@@ -228,6 +265,10 @@ files:
|
|
228
265
|
- spec/integrations/rails_5_2/public/favicon.ico
|
229
266
|
- spec/integrations/rails_5_2/public/robots.txt
|
230
267
|
- spec/integrations/rails_5_2/test.sh
|
268
|
+
- spec/integrations/rails_5_2/test/controllers/posts_controller_test.rb
|
269
|
+
- spec/integrations/rails_5_2/test/cypress_fixtures/posts.yml
|
270
|
+
- spec/integrations/rails_5_2/test/fixtures/posts.yml
|
271
|
+
- spec/integrations/rails_5_2/test/models/post_test.rb
|
231
272
|
- spec/integrations/rails_5_2/tmp/.keep
|
232
273
|
- spec/integrations/rails_5_2/vendor/.keep
|
233
274
|
- spec/spec_helper.rb
|
@@ -1,33 +0,0 @@
|
|
1
|
-
describe('My First On Rails Tests', function() {
|
2
|
-
it('setup basic scenario', function() {
|
3
|
-
cy.appScenario('basic')
|
4
|
-
cy.visit('/')
|
5
|
-
})
|
6
|
-
|
7
|
-
it('using factory bot', function() {
|
8
|
-
cy.appFactories([
|
9
|
-
['create_list', 'post', 10],
|
10
|
-
['create', 'post', {title: 'Hello World'} ]
|
11
|
-
])
|
12
|
-
cy.visit('/')
|
13
|
-
})
|
14
|
-
|
15
|
-
it('cypress eval', function() {
|
16
|
-
cy.appEval("Time.now")
|
17
|
-
})
|
18
|
-
|
19
|
-
it('runs multiple commands', function() {
|
20
|
-
cy.appCommands([{ name: 'clean' },
|
21
|
-
{ name: 'eval', options: "Time.now" }])
|
22
|
-
cy.visit('/')
|
23
|
-
})
|
24
|
-
|
25
|
-
// uncomment these if you want to see what happens
|
26
|
-
// it('example of missing scenario failure', function() {
|
27
|
-
// cy.appScenario('missing')
|
28
|
-
// })
|
29
|
-
//
|
30
|
-
// it('example of missing app failure', function() {
|
31
|
-
// cy.app('run_me')
|
32
|
-
// })
|
33
|
-
})
|