smartest 0.3.1.alpha4 → 0.3.1.alpha5
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.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/smartest/init_browser_generator.rb +3 -7
- data/lib/smartest/version.rb +1 -1
- data/smartest/smartest_test.rb +3 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a5579f607ea23d2a51683b610acb2a75fdfeb4594e65a2489a8388c0561044f8
|
|
4
|
+
data.tar.gz: 4fb60cd6e38a79cbb5617a5f536abe773224cf86bb6bb1147c09ecd001aabce6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b5177080f4e761cc48b2fc5a67a97121e4dc4897f9a5bef1a7ea70525d4e9f14f41cfddce6d234a910789d3a71dc34c1681eda2ba448c2566086632ba0d1a289
|
|
7
|
+
data.tar.gz: aa8ddd2fbbdf3f3ce71e5c7c62161b358da6a90339171d6a416c64f548a90677e859eb4ed67dee3d68eb558b43dd9bfda8a1a9a589804430b7d9ede0aa60837c
|
data/README.md
CHANGED
|
@@ -141,7 +141,7 @@ predicate matcher, then adds:
|
|
|
141
141
|
```text
|
|
142
142
|
smartest/fixtures/playwright_fixture.rb
|
|
143
143
|
smartest/matchers/playwright_matcher.rb
|
|
144
|
-
smartest/
|
|
144
|
+
smartest/example_browser_test.rb
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
It also registers `PlaywrightFixture` and `PlaywrightMatcher`, adds
|
|
@@ -153,7 +153,7 @@ It also registers `PlaywrightFixture` and `PlaywrightMatcher`, adds
|
|
|
153
153
|
Run the generated browser example with:
|
|
154
154
|
|
|
155
155
|
```bash
|
|
156
|
-
bundle exec smartest smartest/
|
|
156
|
+
bundle exec smartest smartest/example_browser_test.rb
|
|
157
157
|
```
|
|
158
158
|
|
|
159
159
|
## Defining tests
|
|
@@ -58,7 +58,7 @@ module Smartest
|
|
|
58
58
|
end
|
|
59
59
|
RUBY
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
EXAMPLE_BROWSER_TEST = <<~RUBY
|
|
62
62
|
# frozen_string_literal: true
|
|
63
63
|
|
|
64
64
|
require "test_helper"
|
|
@@ -93,7 +93,7 @@ module Smartest
|
|
|
93
93
|
update_gemfile
|
|
94
94
|
install_dependencies
|
|
95
95
|
@output.puts
|
|
96
|
-
@output.puts "Run your browser test suite with: bundle exec smartest smartest/
|
|
96
|
+
@output.puts "Run your browser test suite with: bundle exec smartest smartest/example_browser_test.rb"
|
|
97
97
|
|
|
98
98
|
0
|
|
99
99
|
end
|
|
@@ -101,11 +101,7 @@ module Smartest
|
|
|
101
101
|
private
|
|
102
102
|
|
|
103
103
|
def smartest_files
|
|
104
|
-
Smartest::InitGenerator::FILES.
|
|
105
|
-
next if path == "smartest/example_test.rb"
|
|
106
|
-
|
|
107
|
-
files[path] = contents
|
|
108
|
-
end.merge("smartest/example_spec.rb" => EXAMPLE_SPEC)
|
|
104
|
+
Smartest::InitGenerator::FILES.merge("smartest/example_browser_test.rb" => EXAMPLE_BROWSER_TEST)
|
|
109
105
|
end
|
|
110
106
|
|
|
111
107
|
def create_file(path, contents)
|
data/lib/smartest/version.rb
CHANGED
data/smartest/smartest_test.rb
CHANGED
|
@@ -2024,9 +2024,8 @@ test("cli browser init generator creates Playwright scaffold and installation co
|
|
|
2024
2024
|
status = generator.run
|
|
2025
2025
|
|
|
2026
2026
|
expect(status).to eq(0)
|
|
2027
|
-
expect(File.
|
|
2028
|
-
expect(File.read(File.join(dir, "smartest/
|
|
2029
|
-
expect(File.read(File.join(dir, "smartest/example_spec.rb"))).to include('expect(page).to have_url("https://rubygems.org/gems/smartest")')
|
|
2027
|
+
expect(File.read(File.join(dir, "smartest/example_browser_test.rb"))).to include("finds the smartest gem on RubyGems")
|
|
2028
|
+
expect(File.read(File.join(dir, "smartest/example_browser_test.rb"))).to include('expect(page).to have_url("https://rubygems.org/gems/smartest")')
|
|
2030
2029
|
expect(File.read(File.join(dir, "smartest/fixtures/playwright_fixture.rb"))).to include("class PlaywrightFixture < Smartest::Fixture")
|
|
2031
2030
|
expect(File.read(File.join(dir, "smartest/fixtures/playwright_fixture.rb"))).to include('require "playwright"')
|
|
2032
2031
|
expect(File.read(File.join(dir, "smartest/fixtures/playwright_fixture.rb"))).to include('playwright_cli_executable_path: "./node_modules/.bin/playwright"')
|
|
@@ -2053,7 +2052,7 @@ test("cli browser init generator creates Playwright scaffold and installation co
|
|
|
2053
2052
|
expect(output.string).to include("run npm init --yes")
|
|
2054
2053
|
expect(output.string).to include("run npm install playwright --save-dev")
|
|
2055
2054
|
expect(output.string).to include("run ./node_modules/.bin/playwright install")
|
|
2056
|
-
expect(output.string).to include("Run your browser test suite with: bundle exec smartest smartest/
|
|
2055
|
+
expect(output.string).to include("Run your browser test suite with: bundle exec smartest smartest/example_browser_test.rb")
|
|
2057
2056
|
end
|
|
2058
2057
|
end
|
|
2059
2058
|
|