Skip to content

Commit cc26d52

Browse files
authored
chore: Add Changelog (#237)
* chore: Add Changelog * chore: fix linter issues * chore: fix format * chore: fix paper_size spec
1 parent c7dc979 commit cc26d52

File tree

7 files changed

+235
-17
lines changed

7 files changed

+235
-17
lines changed

.github/gemfiles/websocket-driver-0.6.x.gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ gem "websocket-driver", ">= 0.6", "< 0.7"
66
gem "capybara", "~> 3.37.1"
77
gem "matrix"
88

9+
eval_gemfile "../../Gemfile"
10+
911
gemspec path: "../../"

.github/gemfiles/websocket-driver-0.7.x.gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ gem "websocket-driver", ">= 0.7", "< 0.8"
66
gem "capybara", "~> 3.37.1"
77
gem "matrix"
88

9+
eval_gemfile "../../Gemfile"
10+
911
gemspec path: "../../"

Gemfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22

33
source "https://rubygems.org"
44

5-
gem "byebug", "~> 11.0", platforms: %i[mri mingw x64_mingw]
5+
gem "byebug", "~> 11.1", platforms: %i[mri mingw x64_mingw]
6+
gem "chunky_png", "~> 1.4"
7+
gem "image_size", "~> 3.0"
8+
gem "launchy", "~> 2.5"
9+
gem "pdf-reader", "~> 2.5"
10+
gem "puma", "~> 4.3"
11+
gem "rake", "~> 13.0"
12+
gem "rspec", "~> 3.10"
613
gem "rubocop", "~> 1.22"
714
gem "rubocop-rake", require: false
15+
gem "sinatra", "~> 2.1"
816

917
gemspec

cuprite.gemspec

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,4 @@ Gem::Specification.new do |s|
2626

2727
s.add_runtime_dependency "capybara", "~> 3.0"
2828
s.add_runtime_dependency "ferrum", "~> 0.13.0"
29-
30-
s.add_development_dependency "byebug", "~> 11.1"
31-
s.add_development_dependency "chunky_png", "~> 1.4"
32-
s.add_development_dependency "image_size", "~> 3.0"
33-
s.add_development_dependency "launchy", "~> 2.5"
34-
s.add_development_dependency "pdf-reader", "~> 2.5"
35-
s.add_development_dependency "puma", "~> 4.3"
36-
s.add_development_dependency "rake", "~> 13.0"
37-
s.add_development_dependency "rspec", "~> 3.10"
38-
s.add_development_dependency "sinatra", "~> 2.1"
3929
end

lib/CHANGELOG.md

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
## [Unreleased](https://github.com/rubycdp/ferrum/compare/v0.14.3...main) ##
2+
3+
### Added
4+
5+
### Changed
6+
7+
### Fixed
8+
9+
### Removed
10+
11+
12+
## [0.14.3](https://github.com/rubycdp/cuprite/compare/v0.14.2...v0.14.3) - (Nov 12, 2022) ##
13+
14+
### Added
15+
16+
### Changed
17+
18+
- Compatibility with latest Ferrum
19+
- `Cuprite::Browser#timeout=` passes value to a page
20+
- Use `Ferrum::Browser::Options` instead of hash
21+
- Don't call `browser.network.authorize` if there are no credentials
22+
23+
### Fixed
24+
25+
- Expand `Capybara.save_path`
26+
27+
### Removed
28+
29+
30+
## [0.14.2](https://github.com/rubycdp/cuprite/compare/v0.14.1...v0.14.2) - (Oct 5, 2022) ##
31+
32+
### Added
33+
34+
### Changed
35+
36+
### Fixed
37+
38+
- Files in gemspec
39+
40+
### Removed
41+
42+
43+
## [0.14.1](https://github.com/rubycdp/cuprite/compare/v0.14...v0.14.1) - (Oct 5, 2022) ##
44+
45+
### Added
46+
47+
### Changed
48+
49+
### Fixed
50+
51+
- Use `Ferrum::Utils` instead of `Ferrum`
52+
53+
### Removed
54+
55+
56+
## [0.14](https://github.com/rubycdp/cuprite/compare/v0.13...v0.14) - (Oct 5, 2022) ##
57+
58+
### Added
59+
60+
- Implement Browser#drag and #drag_by
61+
62+
### Changed
63+
64+
- Drop Capybara 2 support
65+
- Refactoring: delegate methods to browser
66+
- Bump Ruby to 2.6
67+
- Add rubocop
68+
- Compatibility with latest Ferrum
69+
70+
### Fixed
71+
72+
- Fix ruby warning
73+
74+
### Removed
75+
76+
77+
## [0.13](https://github.com/rubycdp/cuprite/compare/v0.12...v0.13) - (Mar 11, 2021) ##
78+
79+
### Added
80+
81+
### Changed
82+
83+
- Compatibility with latest Ferrum
84+
85+
### Fixed
86+
87+
- Fix cannot read property 'parentNode' of null
88+
89+
### Removed
90+
91+
92+
## [0.12](https://github.com/rubycdp/cuprite/compare/v0.11...v0.12) - (Feb 24, 2021) ##
93+
94+
### Added
95+
96+
### Changed
97+
98+
- Compatibility with latest Ferrum
99+
100+
### Fixed
101+
102+
- Fix setting input type color
103+
- `Ferrum::NodeNotFoundError` should be treated by capybara
104+
105+
### Removed
106+
107+
108+
## [0.11](https://github.com/rubycdp/cuprite/compare/v0.10...v0.11) - (Jul 29, 2020) ##
109+
110+
### Added
111+
112+
- `Capybara::Cuprite::Driver#wait_for_reload` wait until the whole page is reloaded or raise a timeout error.
113+
114+
### Changed
115+
116+
- Compatibility with latest Ferrum
117+
118+
### Fixed
119+
120+
### Removed
121+
122+
123+
## [0.10](https://github.com/rubycdp/cuprite/compare/v0.9...v0.10) - (Apr 7, 2020) ##
124+
125+
### Added
126+
127+
- Ability to pass binding to debug method `page.driver.debug(binding)`
128+
- Support for click delay and offset position
129+
130+
### Changed
131+
132+
- Update README
133+
134+
### Fixed
135+
136+
- Command line being slow after debugging with `page.driver.debug` and exiting it
137+
138+
### Removed
139+
140+
141+
## [0.9](https://github.com/rubycdp/cuprite/compare/v0.8...v0.9) - (Jan 28, 2020) ##
142+
143+
### Added
144+
145+
- `Capybara::Cuprite::Driver.wait_for_network_idle` natively waits for network idle and if
146+
there are no active connections returns or raises `TimeoutError` error.
147+
- CUPRITE_DEBUG env should turn debug mode on as FERRUM_DEBUG
148+
- Set value for input type range
149+
150+
### Changed
151+
152+
- No monkey-patching for `Capybara::Cuprite::Page`
153+
154+
### Fixed
155+
156+
- LocalJumpError in on(:request) callback
157+
158+
### Removed
159+
160+
161+
## [0.8](https://github.com/rubycdp/cuprite/compare/v0.7.1...v0.8) - (Oct 29, 2019) ##
162+
163+
### Added
164+
165+
- Use Ferrum contexts to work with pages.
166+
- `Capybara::Cuprite::Browser`
167+
- `#page`
168+
- `#reset`
169+
- `#quit`
170+
- `#window_handle`
171+
- `#window_handles`
172+
- `#switch_to_window`
173+
- `#close_window`
174+
- `Capybara::Cuprite::Page`
175+
- `#title`
176+
- `#active_frame`
177+
- `TRIGGER_CLICK_WAIT`
178+
- Accept modals by default with warning
179+
180+
### Changed
181+
182+
### Fixed
183+
184+
- `Capybara::Cuprite::Page#find_modal` use browser timeout
185+
186+
### Removed
187+
188+
189+
## [0.7.1](https://github.com/rubycdp/cuprite/compare/v0.7.0...v0.7.1) - (Sep 20, 2019) ##
190+
191+
### Added
192+
193+
### Changed
194+
195+
### Fixed
196+
197+
- `url_whitelist`, `url_blacklist`, `status_code`, `network_traffic`, `clear_network_traffic`, `response_headers`,
198+
`clear_memory_cache`, `basic_authorize` fixed to use dedicated network namespace to work with network
199+
200+
### Removed
201+
202+
203+
## [0.7.0](https://github.com/rubycdp/cuprite/compare/907c9ec...v0.7.0) - (Sep 12, 2019) ##
204+
205+
### Added
206+
207+
### Changed
208+
209+
- Separate `Ferrum` and `Cuprite`
210+
211+
### Fixed
212+
213+
### Removed
214+
215+
## [Initial commit](https://github.com/rubycdp/cuprite/commit/907c9ec) - (Jul 18, 2018) ##

spec/features/driver_spec.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,15 +303,17 @@ def create_screenshot(file, *args)
303303

304304
it "changes pdf size" do
305305
@session.visit("/cuprite/long_page")
306-
@driver.paper_size = { width: "1in", height: "1in" }
306+
@driver.paper_size = { width: "6in", height: "12in" }
307307

308308
@driver.save_screenshot(file)
309309

310310
reader = PDF::Reader.new(file)
311311
reader.pages.each do |page|
312-
bbox = page.attributes[:MediaBox]
313-
width = (bbox[2] - bbox[0]) / 72
314-
expect(width).to eq(1)
312+
bbox = page.attributes[:MediaBox]
313+
width = (bbox[2] - bbox[0]) / 72
314+
height = (bbox[3] - bbox[1]) / 72
315+
expect(width).to eq(6)
316+
expect(height).to eq(12)
315317
end
316318
end
317319
end

spec/spec_helper.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,9 @@ module TestSessions
107107
Capybara::SpecHelper.configure(config)
108108

109109
def save_exception_artifacts(browser, meta)
110-
time_now = Time.now
111110
filename = File.basename(meta[:file_path])
112111
line_number = meta[:line_number]
113-
timestamp = time_now.strftime("%Y-%m-%d-%H-%M-%S.") + format("%03d", (time_now.usec / 1000).to_i)
112+
timestamp = Time.now.strftime("%Y-%m-%dT%H-%M-%S-%N")
114113

115114
save_exception_log(browser, filename, line_number, timestamp)
116115
save_exception_screenshot(browser, filename, line_number, timestamp)

0 commit comments

Comments
 (0)