admin_data 1.1.11 → 1.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +5 -0
  3. data/Gemfile.lock +19 -0
  4. data/README.md +1 -1
  5. data/Rakefile +2 -50
  6. data/admin_data.gemspec +23 -0
  7. data/app/helpers/admin_data/application_helper.rb +7 -0
  8. data/app/views/admin_data/search/search/_listing.html.erb +1 -1
  9. data/config/routes.rb +24 -22
  10. data/lib/admin_data/version.rb +1 -1
  11. data/test/rails_root/Gemfile +23 -0
  12. data/test/rails_root/Gemfile.lock +157 -0
  13. data/test/rails_root/README.md +11 -0
  14. data/test/rails_root/Rakefile +7 -0
  15. data/test/rails_root/app/views/layouts/application.html.erb +14 -0
  16. data/test/rails_root/config/cucumber.yml +11 -0
  17. data/test/rails_root/config/database.yml +25 -0
  18. data/test/rails_root/config/locales/en.yml +5 -0
  19. data/test/rails_root/config.ru +4 -0
  20. data/test/rails_root/db/development.sqlite3 +0 -0
  21. data/test/rails_root/db/production.sqlite3 +1 -0
  22. data/test/rails_root/features/advance_search/boolean.feature +74 -0
  23. data/test/rails_root/features/advance_search/datetime.feature +101 -0
  24. data/test/rails_root/features/advance_search/delete_all.feature +20 -0
  25. data/test/rails_root/features/advance_search/destroy_all.feature +20 -0
  26. data/test/rails_root/features/advance_search/integer.feature +69 -0
  27. data/test/rails_root/features/advance_search/multiple_rows.feature +87 -0
  28. data/test/rails_root/features/advance_search/sort.feature +16 -0
  29. data/test/rails_root/features/advance_search/string.feature +130 -0
  30. data/test/rails_root/features/crud.feature +50 -0
  31. data/test/rails_root/features/crud_show.feature +56 -0
  32. data/test/rails_root/features/feed.feature +13 -0
  33. data/test/rails_root/features/home.feature +41 -0
  34. data/test/rails_root/features/migration.feature +7 -0
  35. data/test/rails_root/features/quick_search.feature +124 -0
  36. data/test/rails_root/features/table_structure.feature +18 -0
  37. data/test/rails_root/lib/tasks/.gitkeep +0 -0
  38. data/test/rails_root/lib/tasks/cucumber.rake +53 -0
  39. data/test/rails_root/public/.gitkeep +0 -0
  40. data/test/rails_root/script/cucumber +10 -0
  41. data/test/rails_root/script/rails +6 -0
  42. metadata +81 -77
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.log
2
+ tmp/*
3
+ .DS_Store
4
+ *.swp
5
+ *.db
6
+ response.html
7
+ tags
8
+ pkg
9
+ .rvmrc
10
+
11
+ test/rails_root/tmp/**/*
12
+ test/rails_root/log/*.*
13
+ test/rails_root/vendor/**/*.*
14
+ test/rails_root/db/*.sqlite3
15
+ test/rails_root/.rvmrc
16
+ test/rails_root/.bundle
17
+ test/rails_root/.bundle/*
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'rake', '=0.8.7'
4
+
5
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,19 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ admin_data (1.1.12)
5
+ will_paginate (= 3.0.pre2)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ rake (0.8.7)
11
+ will_paginate (3.0.pre2)
12
+
13
+ PLATFORMS
14
+ ruby
15
+
16
+ DEPENDENCIES
17
+ admin_data!
18
+ rake (= 0.8.7)
19
+ will_paginate (= 3.0.pre2)
data/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  #Test#
12
12
 
13
- ####cd _test/rails_app_ and read the instructions mentioned at README.md there.####
13
+ <tt>cd _test/rails_root</tt> and read the instructions mentioned at README.md there.
14
14
 
15
15
 
16
16
 
data/Rakefile CHANGED
@@ -1,50 +1,2 @@
1
- require 'rake'
2
- require 'rake/testtask'
3
- require 'rake/rdoctask'
4
-
5
- desc 'Default: run unit tests.'
6
- task :default => :test
7
-
8
- desc 'Test admin_data gem.'
9
- Rake::TestTask.new(:test) do |t|
10
- t.libs << 'lib' << 'test'
11
- t.pattern = 'test/**/*_test.rb'
12
- t.verbose = true
13
- end
14
-
15
- desc 'Generate documentation for admin_data gem.'
16
- Rake::RDocTask.new(:rdoc) do |rdoc|
17
- rdoc.rdoc_dir = 'rdoc'
18
- rdoc.title = 'AdminData'
19
- rdoc.options << '--line-numbers' << '--inline-source'
20
- rdoc.rdoc_files.include('README.md')
21
- rdoc.rdoc_files.include('lib/**/*.rb')
22
- end
23
-
24
- begin
25
- require 'jeweler'
26
- require './lib/admin_data/version'
27
- Jeweler::Tasks.new do |s|
28
- s.name = "admin_data"
29
- s.version = AdminData::VERSION
30
- s.summary = s.description = "Manage database using browser"
31
- s.email = "neerajdotname@gmail.com"
32
- s.homepage = "http://github.com/neerajdotname/admin_data"
33
- s.authors = ['Neeraj Singh']
34
- s.files = FileList["[A-Z]*", "{app,config,lib}/**/*", 'init.rb']
35
-
36
- s.add_dependency('will_paginate', '>= 3.0.pre2')
37
-
38
- s.add_development_dependency 'flexmock', '>= 0.8.7'
39
- s.add_development_dependency 'shoulda', '>= 2.11.3'
40
- s.add_development_dependency 'factory_girl_rails'
41
- s.add_development_dependency 'nokogiri', '>= 1.4.3.1'
42
- end
43
- Jeweler::GemcutterTasks.new
44
- rescue LoadError => le
45
- puts "Jeweler not available. Install it for jeweler-related tasks with: gem install jeweler: #{le.message}"
46
- end
47
-
48
-
49
-
50
- #TODO delete and destroy from show page do not provide any feedback
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "admin_data/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "admin_data"
7
+ s.version = AdminData::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Neeraj Singh"]
10
+ s.email = ["neeraj@BigBinary.com"]
11
+ s.homepage = ""
12
+ s.summary = %q{Manage data as if you own it}
13
+ s.description = %q{Manage data as if you own it}
14
+
15
+ s.rubyforge_project = "admin_data"
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+
22
+ s.add_dependency("will_paginate", "=3.0.pre2")
23
+ end
@@ -288,5 +288,12 @@ module AdminData
288
288
  klass.reflections.values.detect { |reflection| reflection.primary_key_name.to_sym == col.name.to_sym }
289
289
  end
290
290
 
291
+ def record_id(record)
292
+ if record.respond_to?(:primary_key)
293
+ record.send(:primary_key)
294
+ else
295
+ record.id
296
+ end
297
+ end
291
298
  end
292
299
  end
@@ -23,7 +23,7 @@
23
23
  <% columns_order(klass).each do |column| %>
24
24
  <td>
25
25
  <% if (column == klass.primary_key) %>
26
- <%= link_to(record.to_param.to_s, admin_data_path(:klass => klass.name.underscore, :id => record)) %>
26
+ <%= link_to(record.to_param.to_s, admin_data_path(:klass => klass.name.underscore, :id => record_id(record))) %>
27
27
  <% else %>
28
28
  <%=h get_value_for_column(column_native(klass, column), record) %>
29
29
  <% end %>
data/config/routes.rb CHANGED
@@ -1,34 +1,36 @@
1
1
  Rails.application.routes.draw do
2
2
 
3
- namespace(:admin_data) do
4
- scope :admin_data do
5
- controller "crud" do
6
- match '/klass/(:klass)', :to => :index, :as => :index, :via => :get
7
- match '/klass/(:klass)', :to => :create, :as => :index, :via => :post
8
- match '/klass/:klass/new', :to => :new, :as => :new, :via => :get
9
- match '/klass/:klass/:id/del', :to => :del, :as => :del, :via => :delete
10
- match '/klass/:klass/:id/edit', :to => :edit, :as => :edit, :via => :get
11
- match '/klass/:klass/:id', :to => :show, :via => :get
12
- match '/klass/:klass/:id', :to => :update, :via => :put
13
- match '/klass/:klass/:id', :to => :destroy, :via => :delete
14
- end
3
+ scope ENV['RAILS_RELATIVE_URL_ROOT'] || '/' do
4
+ namespace(:admin_data) do
5
+ scope :admin_data do
6
+ controller "crud" do
7
+ match '/klass/(:klass)', :to => :index, :as => :index, :via => :get
8
+ match '/klass/(:klass)', :to => :create, :as => :index, :via => :post
9
+ match '/klass/:klass/new', :to => :new, :as => :new, :via => :get
10
+ match '/klass/:klass/:id/del', :to => :del, :as => :del, :via => :delete
11
+ match '/klass/:klass/:id/edit', :to => :edit, :as => :edit, :via => :get
12
+ match '/klass/:klass/:id', :to => :show, :via => :get
13
+ match '/klass/:klass/:id', :to => :update, :via => :put
14
+ match '/klass/:klass/:id', :to => :destroy, :via => :delete
15
+ end
15
16
 
16
- controller "migration" do
17
- match '/migration', :to => :index, :as => :migration_information
18
- match '/jstest', :to => :jstest, :as => :jstest
19
- end
17
+ controller "migration" do
18
+ match '/migration', :to => :index, :as => :migration_information
19
+ match '/jstest', :to => :jstest, :as => :jstest
20
+ end
20
21
 
21
- match '/table_structure/:klass' => "table_structure#index", :as => :table_structure
22
+ match '/table_structure/:klass' => "table_structure#index", :as => :table_structure
22
23
 
23
- match '/quick_search/:klass' => "search#quick_search", :as => :search
24
+ match '/quick_search/:klass' => "search#quick_search", :as => :search
24
25
 
25
- match '/advance_search/:klass' => "search#advance_search", :as => :advance_search
26
+ match '/advance_search/:klass' => "search#advance_search", :as => :advance_search
26
27
 
27
- match '/feed/:klasss' => "feed#index", :defaults => { :format =>'rss' }, :as => :feed
28
+ match '/feed/:klasss' => "feed#index", :defaults => { :format =>'rss' }, :as => :feed
28
29
 
29
- match '/public/*file' => "public#serve", :as => :public
30
+ match '/public/*file' => "public#serve", :as => :public
30
31
 
31
- root :to => "home#index"
32
+ root :to => "home#index"
33
+ end
32
34
  end
33
35
  end
34
36
 
@@ -1,3 +1,3 @@
1
1
  module AdminData
2
- VERSION = '1.1.11'
2
+ VERSION = '1.1.12'
3
3
  end
@@ -0,0 +1,23 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'rails', '3.0.3'
4
+
5
+ gem 'sqlite3-ruby', :require => 'sqlite3'
6
+
7
+ gem 'ruby-debug'
8
+
9
+ gem 'faker'
10
+
11
+ #gem 'admin_data', :git => 'git://github.com/neerajdotname/admin_data.git'
12
+ gem 'admin_data', :path => File.expand_path("../../..", __FILE__)
13
+
14
+ group :development, :test do
15
+ gem 'factory_girl_rails'
16
+ gem 'database_cleaner'
17
+ gem 'shoulda'
18
+ gem "rspec-rails", ">= 2.0.1"
19
+ gem "cucumber-rails", ">= 0.3.2"
20
+ gem "capybara", "= 0.4.0"
21
+ gem "launchy", ">= 0.3.7"
22
+ end
23
+
@@ -0,0 +1,157 @@
1
+ PATH
2
+ remote: /Users/nsingh/dev/personal/admin_data
3
+ specs:
4
+ admin_data (1.1.11)
5
+ will_paginate (>= 3.0.pre2)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ abstract (1.0.0)
11
+ actionmailer (3.0.3)
12
+ actionpack (= 3.0.3)
13
+ mail (~> 2.2.9)
14
+ actionpack (3.0.3)
15
+ activemodel (= 3.0.3)
16
+ activesupport (= 3.0.3)
17
+ builder (~> 2.1.2)
18
+ erubis (~> 2.6.6)
19
+ i18n (~> 0.4)
20
+ rack (~> 1.2.1)
21
+ rack-mount (~> 0.6.13)
22
+ rack-test (~> 0.5.6)
23
+ tzinfo (~> 0.3.23)
24
+ activemodel (3.0.3)
25
+ activesupport (= 3.0.3)
26
+ builder (~> 2.1.2)
27
+ i18n (~> 0.4)
28
+ activerecord (3.0.3)
29
+ activemodel (= 3.0.3)
30
+ activesupport (= 3.0.3)
31
+ arel (~> 2.0.2)
32
+ tzinfo (~> 0.3.23)
33
+ activeresource (3.0.3)
34
+ activemodel (= 3.0.3)
35
+ activesupport (= 3.0.3)
36
+ activesupport (3.0.3)
37
+ arel (2.0.3)
38
+ builder (2.1.2)
39
+ capybara (0.4.0)
40
+ celerity (>= 0.7.9)
41
+ culerity (>= 0.2.4)
42
+ mime-types (>= 1.16)
43
+ nokogiri (>= 1.3.3)
44
+ rack (>= 1.0.0)
45
+ rack-test (>= 0.5.4)
46
+ selenium-webdriver (>= 0.0.27)
47
+ xpath (~> 0.1.2)
48
+ celerity (0.8.4)
49
+ childprocess (0.1.4)
50
+ ffi (~> 0.6.3)
51
+ columnize (0.3.2)
52
+ configuration (1.2.0)
53
+ cucumber (0.9.4)
54
+ builder (~> 2.1.2)
55
+ diff-lcs (~> 1.1.2)
56
+ gherkin (~> 2.2.9)
57
+ json (~> 1.4.6)
58
+ term-ansicolor (~> 1.0.5)
59
+ cucumber-rails (0.3.2)
60
+ cucumber (>= 0.8.0)
61
+ culerity (0.2.12)
62
+ database_cleaner (0.6.0)
63
+ diff-lcs (1.1.2)
64
+ erubis (2.6.6)
65
+ abstract (>= 1.0.0)
66
+ factory_girl (1.3.2)
67
+ factory_girl_rails (1.0)
68
+ factory_girl (~> 1.3)
69
+ rails (>= 3.0.0.beta4)
70
+ faker (0.3.1)
71
+ ffi (0.6.3)
72
+ rake (>= 0.8.7)
73
+ gherkin (2.2.9)
74
+ json (~> 1.4.6)
75
+ term-ansicolor (~> 1.0.5)
76
+ i18n (0.4.2)
77
+ json (1.4.6)
78
+ json_pure (1.4.6)
79
+ launchy (0.3.7)
80
+ configuration (>= 0.0.5)
81
+ rake (>= 0.8.1)
82
+ linecache (0.43)
83
+ mail (2.2.10)
84
+ activesupport (>= 2.3.6)
85
+ i18n (~> 0.4.1)
86
+ mime-types (~> 1.16)
87
+ treetop (~> 1.4.8)
88
+ mime-types (1.16)
89
+ nokogiri (1.4.4)
90
+ polyglot (0.3.1)
91
+ rack (1.2.1)
92
+ rack-mount (0.6.13)
93
+ rack (>= 1.0.0)
94
+ rack-test (0.5.6)
95
+ rack (>= 1.0)
96
+ rails (3.0.3)
97
+ actionmailer (= 3.0.3)
98
+ actionpack (= 3.0.3)
99
+ activerecord (= 3.0.3)
100
+ activeresource (= 3.0.3)
101
+ activesupport (= 3.0.3)
102
+ bundler (~> 1.0)
103
+ railties (= 3.0.3)
104
+ railties (3.0.3)
105
+ actionpack (= 3.0.3)
106
+ activesupport (= 3.0.3)
107
+ rake (>= 0.8.7)
108
+ thor (~> 0.14.4)
109
+ rake (0.8.7)
110
+ rspec (2.1.0)
111
+ rspec-core (~> 2.1.0)
112
+ rspec-expectations (~> 2.1.0)
113
+ rspec-mocks (~> 2.1.0)
114
+ rspec-core (2.1.0)
115
+ rspec-expectations (2.1.0)
116
+ diff-lcs (~> 1.1.2)
117
+ rspec-mocks (2.1.0)
118
+ rspec-rails (2.1.0)
119
+ rspec (~> 2.1.0)
120
+ ruby-debug (0.10.4)
121
+ columnize (>= 0.1)
122
+ ruby-debug-base (~> 0.10.4.0)
123
+ ruby-debug-base (0.10.4)
124
+ linecache (>= 0.3)
125
+ rubyzip (0.9.4)
126
+ selenium-webdriver (0.1.0)
127
+ childprocess (= 0.1.4)
128
+ ffi (~> 0.6.3)
129
+ json_pure
130
+ rubyzip
131
+ shoulda (2.11.3)
132
+ sqlite3-ruby (1.3.2)
133
+ term-ansicolor (1.0.5)
134
+ thor (0.14.4)
135
+ treetop (1.4.9)
136
+ polyglot (>= 0.3.1)
137
+ tzinfo (0.3.23)
138
+ will_paginate (3.0.pre2)
139
+ xpath (0.1.2)
140
+ nokogiri (~> 1.3)
141
+
142
+ PLATFORMS
143
+ ruby
144
+
145
+ DEPENDENCIES
146
+ admin_data!
147
+ capybara (= 0.4.0)
148
+ cucumber-rails (>= 0.3.2)
149
+ database_cleaner
150
+ factory_girl_rails
151
+ faker
152
+ launchy (>= 0.3.7)
153
+ rails (= 3.0.3)
154
+ rspec-rails (>= 2.0.1)
155
+ ruby-debug
156
+ shoulda
157
+ sqlite3-ruby
@@ -0,0 +1,11 @@
1
+ # This respository is used for running cucumber tests for admin_data#
2
+
3
+ # How do I run test?
4
+ * bundle install
5
+ * rake db:migrate
6
+ * rake db:test:prepare
7
+ * bundle exec cucumber
8
+
9
+
10
+ #TODO add test for delete a record
11
+ ## TODO add test for destroy a record
@@ -0,0 +1,7 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+ require 'rake'
6
+
7
+ AdminDataDemo::Application.load_tasks
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>AdminDataDemo</title>
5
+ <%= stylesheet_link_tag :all %>
6
+ <%= javascript_include_tag :defaults %>
7
+ <%= csrf_meta_tag %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,11 @@
1
+ <%
2
+ rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
3
+ rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
4
+ std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --strict --tags ~@wip"
5
+ %>
6
+ default: <%= std_opts %> features
7
+ wip: --tags @wip:3 --wip features
8
+ rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
9
+ javascript: --tags @javascript
10
+
11
+
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3-ruby (not necessary on OS X Leopard)
3
+ development:
4
+ adapter: sqlite3
5
+ database: db/development.sqlite3
6
+ pool: 5
7
+ timeout: 5000
8
+
9
+ # Warning: The database defined as "test" will be erased and
10
+ # re-generated from your development database when you run "rake".
11
+ # Do not set this db to the same as development or production.
12
+ test: &test
13
+ adapter: sqlite3
14
+ database: db/test.sqlite3
15
+ pool: 5
16
+ timeout: 5000
17
+
18
+ production:
19
+ adapter: sqlite3
20
+ database: db/production.sqlite3
21
+ pool: 5
22
+ timeout: 5000
23
+
24
+ cucumber:
25
+ <<: *test
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run AdminDataDemo::Application
@@ -0,0 +1 @@
1
+ S
@@ -0,0 +1,74 @@
1
+ Feature: Advance Search for boolean
2
+
3
+ @javascript
4
+ Scenario: Advance Search for a boolean
5
+ Given a user exists
6
+ Given I visit advance_search page
7
+ When I select "active" from "adv_search[1_row][col1]"
8
+ Then page should have css "#advance_search_table tr td select.col2"
9
+ When I select "is null" from "adv_search[1_row][col2]"
10
+ #Then page should have disabled css "#advance_search_table tr td input.col3"
11
+ When I select "is not null" from "adv_search[1_row][col2]"
12
+ #Then page should have disabled css "#advance_search_table tr td input.col3"
13
+ When I select "is true" from "adv_search[1_row][col2]"
14
+ #Then page should have disabled css "#advance_search_table tr td input.col3"
15
+ When I select "is false" from "adv_search[1_row][col2]"
16
+ #Then page should have disabled css "#advance_search_table tr td input.col3"
17
+
18
+ @javascript
19
+ Scenario: option "is false"
20
+ Given the following user exists:
21
+ | first name | last name | active |
22
+ | John | Smith | false |
23
+ | Mary | Jane | true |
24
+ Given I visit advance_search page
25
+ When I select "active" from "adv_search[1_row][col1]"
26
+ When I select "is false" from "adv_search[1_row][col2]"
27
+ When I press "Search"
28
+ Then I should see "Search result: 1 record found"
29
+ Then async verify that user "first_name" is "John"
30
+ Then async verify that user "last_name" is "Smith"
31
+
32
+ @javascript
33
+ Scenario: option "is true"
34
+ Given the following user exists:
35
+ | first name | last name | active |
36
+ | Mary | Jane | true |
37
+ | John | Smith | false |
38
+ Given I visit advance_search page
39
+ When I select "active" from "adv_search[1_row][col1]"
40
+ When I select "is true" from "adv_search[1_row][col2]"
41
+ When I press "Search"
42
+ Then I should see "Search result: 1 record found"
43
+ Then async verify that user "first_name" is "Mary"
44
+ Then async verify that user "last_name" is "Jane"
45
+
46
+ @javascript
47
+ Scenario: option "is null"
48
+ Given the following user exists:
49
+ | first name | last name | active |
50
+ | John | Smith | false |
51
+ | Mary | Jane | true |
52
+ Given first user's value for active is nil
53
+ Given I visit advance_search page
54
+ When I select "active" from "adv_search[1_row][col1]"
55
+ When I select "is null" from "adv_search[1_row][col2]"
56
+ When I press "Search"
57
+ Then I should see "Search result: 1 record found"
58
+ Then async verify that user "first_name" is "John"
59
+ Then async verify that user "last_name" is "Smith"
60
+
61
+ @javascript
62
+ Scenario: option "is not null"
63
+ Given the following user exists:
64
+ | first name | last name | active |
65
+ | Mary | Jane | true |
66
+ | John | Smith | false |
67
+ Given last user's value for active is nil
68
+ Given I visit advance_search page
69
+ When I select "active" from "adv_search[1_row][col1]"
70
+ When I select "is not null" from "adv_search[1_row][col2]"
71
+ When I press "Search"
72
+ Then I should see "Search result: 1 record found"
73
+ Then async verify that user "first_name" is "Mary"
74
+ Then async verify that user "last_name" is "Jane"