tramway-admin 4.1.2.1 → 5.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2b26ed193b916d9041c27df7818850630e53ddd5867ac5ce658c002bfcf23e6
|
4
|
+
data.tar.gz: 2b2bd839eff52907661a96b378e6073d564e9b354db06b7c4de0a58166260c34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d8d83f628fad98569b8965b19669b21739a6e50f3db84d9b30cf99742e1e91048716f822b9be5d1159e20bb17867be55ecbc61208b95ad441ae85e8dc4b864a
|
7
|
+
data.tar.gz: 329007a4d71ca1d20410900db2fc710e5dab3688c9fb97e3a99400052fe6698eb2375b64e452645a2750818bae7a265f52d81655c7f46ae040dd6fb8c93e00d3
|
data/README.md
CHANGED
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TramwayHelpers
|
4
|
+
def click_on_association_delete_button(object)
|
5
|
+
delete_path = ::Tramway::Admin::Engine.routes.url_helpers.record_path(
|
6
|
+
object.id,
|
7
|
+
model: object.class
|
8
|
+
)
|
9
|
+
row = find("td[colspan='2'] td a[href='#{delete_path}']").parent_node(level: 2)
|
10
|
+
row.find('td button.delete[type="submit"]').click
|
11
|
+
end
|
12
|
+
|
13
|
+
def click_on_tab(text)
|
14
|
+
find('li.nav-item a.nav-link', text: text).click
|
15
|
+
end
|
16
|
+
|
17
|
+
def click_on_table_item(text)
|
18
|
+
find('table td a', text: text).click
|
19
|
+
end
|
20
|
+
|
21
|
+
def click_on_delete_button(object)
|
22
|
+
delete_path = ::Tramway::Admin::Engine.routes.url_helpers.record_path(
|
23
|
+
object.id,
|
24
|
+
model: object.class
|
25
|
+
)
|
26
|
+
form = find("form[action='#{delete_path}']")
|
27
|
+
form.find('button[type="submit"]').click
|
28
|
+
end
|
29
|
+
|
30
|
+
def fill_in_ckeditor(name, with:)
|
31
|
+
id = name.gsub(']', '').split('[').join('_')
|
32
|
+
content = with.to_json # convert to a safe javascript string
|
33
|
+
page.execute_script <<-SCRIPT
|
34
|
+
CKEDITOR.instances['#{id}'].setData(#{content});
|
35
|
+
$('textarea##{id}').text(#{content});
|
36
|
+
SCRIPT
|
37
|
+
end
|
38
|
+
|
39
|
+
def fill_in_datepicker(name, with:)
|
40
|
+
return unless with.present?
|
41
|
+
|
42
|
+
input = find("input[name=#{name.gsub('[', '\[').gsub(']', '\]')}]")
|
43
|
+
input.click
|
44
|
+
|
45
|
+
find('td.day', text: /^#{with.day}$/, match: :first).click
|
46
|
+
end
|
47
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tramway-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: '5.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tramway-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '5.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '5.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: tramway-auth
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,20 +134,6 @@ dependencies:
|
|
134
134
|
- - ">="
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
|
-
- !ruby/object:Gem::Dependency
|
138
|
-
name: selectize-rails
|
139
|
-
requirement: !ruby/object:Gem::Requirement
|
140
|
-
requirements:
|
141
|
-
- - ">="
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
version: '0'
|
144
|
-
type: :runtime
|
145
|
-
prerelease: false
|
146
|
-
version_requirements: !ruby/object:Gem::Requirement
|
147
|
-
requirements:
|
148
|
-
- - ">="
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
version: '0'
|
151
137
|
- !ruby/object:Gem::Dependency
|
152
138
|
name: smart_buttons
|
153
139
|
requirement: !ruby/object:Gem::Requirement
|
@@ -309,6 +295,8 @@ files:
|
|
309
295
|
- lib/tramway/admin/record_routes_helper.rb
|
310
296
|
- lib/tramway/admin/records_models.rb
|
311
297
|
- lib/tramway/admin/singleton_models.rb
|
298
|
+
- lib/tramway/admin/spec/helpers/navbar_helper.rb
|
299
|
+
- lib/tramway/admin/spec/helpers/tramway_helpers.rb
|
312
300
|
- lib/tramway/admin/tramway_model_helper.rb
|
313
301
|
- lib/tramway/admin/version.rb
|
314
302
|
- lib/tramway/admin/welcome_page_actions.rb
|