Skip to content

Commit

Permalink
Final
Browse files Browse the repository at this point in the history
  • Loading branch information
hopsoft committed Feb 23, 2024
1 parent a6142bd commit df34a84
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion test/application_system_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
attr_reader :page

def before_setup
# User.destroy_all
migrations_dir = File.expand_path("dummy/db/migrate", __dir__)
ActiveRecord::MigrationContext.new(migrations_dir).migrate
@playwright_exec = Playwright.create(playwright_cli_executable_path: "npx playwright")
@playwright = @playwright_exec.playwright
@browser = @playwright.public_send(BROWSER).launch
Expand Down
4 changes: 2 additions & 2 deletions test/system/basic_commands/decrement_frame_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class DecrementFrameTest < ApplicationSystemTestCase

test "decrement once" do
page.goto basic_command_url
user = User.first
user = User.last

assert_equal 0, user.count
assert_equal "0000", element("code[role='counter']").inner_text
Expand All @@ -22,7 +22,7 @@ class DecrementFrameTest < ApplicationSystemTestCase

test "decrement 3 times" do
page.goto basic_command_url
user = User.first
user = User.last

assert_equal 0, user.count
assert_equal "0000", element("code[role='counter']").inner_text
Expand Down
4 changes: 2 additions & 2 deletions test/system/basic_commands/decrement_no_frame_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class DecrementNoFrameTest < ApplicationSystemTestCase

test "decrement once" do
page.goto basic_command_url
user = User.first
user = User.last

assert_equal 0, user.count
assert_equal "0000", element("code[role='counter']").inner_text
Expand All @@ -22,7 +22,7 @@ class DecrementNoFrameTest < ApplicationSystemTestCase

test "decrement 3 times" do
page.goto basic_command_url
user = User.first
user = User.last

assert_equal 0, user.reload.count
assert_equal "0000", element("code[role='counter']").inner_text
Expand Down
4 changes: 2 additions & 2 deletions test/system/basic_commands/increment_frame_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class IncrementFrameTest < ApplicationSystemTestCase

test "increment once" do
page.goto basic_command_url
user = User.first
user = User.last

assert_equal 0, user.count
assert_equal "0000", element("code[role='counter']").inner_text
Expand All @@ -22,7 +22,7 @@ class IncrementFrameTest < ApplicationSystemTestCase

test "increment 3 times" do
page.goto basic_command_url
user = User.first
user = User.last

assert_equal 0, user.count
assert_equal "0000", element("code[role='counter']").inner_text
Expand Down
4 changes: 2 additions & 2 deletions test/system/basic_commands/increment_no_frame_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class IncrementNoFrameTest < ApplicationSystemTestCase

test "increment once" do
page.goto basic_command_url
user = User.first
user = User.last

assert_equal 0, user.count
assert_equal "0000", element("code[role='counter']").inner_text
Expand All @@ -22,7 +22,7 @@ class IncrementNoFrameTest < ApplicationSystemTestCase

test "increment 3 times" do
page.goto basic_command_url
user = User.first
user = User.last

assert_equal 0, user.reload.count
assert_equal "0000", element("code[role='counter']").inner_text
Expand Down
4 changes: 2 additions & 2 deletions test/system/basic_commands/reset_frame_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def accept_dialod(dialog)
test "increment once then reset and accept confirm" do
skip "Playwright dialog handling not working yet"
page.goto basic_command_url
user = User.first
user = User.last

assert_equal 0, user.count
assert_equal "0000", element("code[role='counter']").inner_text
Expand All @@ -36,7 +36,7 @@ def accept_dialod(dialog)
test "increment once then reset and dismiss confirm" do
skip "Playwright dialog handling not working yet"
page.goto basic_command_url
user = User.first
user = User.last

assert_equal 0, user.count
assert_equal "0000", element("code[role='counter']").inner_text
Expand Down
4 changes: 2 additions & 2 deletions test/system/basic_commands/reset_no_frame_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ResetNoFrameTest < ApplicationSystemTestCase
test "increment once then reset and accept confirm" do
skip "Playwright dialog handling not working yet"
page.goto basic_command_url
user = User.first
user = User.last

assert_equal 0, user.count
assert_equal "0000", element("code[role='counter']").inner_text
Expand All @@ -32,7 +32,7 @@ class ResetNoFrameTest < ApplicationSystemTestCase
test "increment once then reset and dismiss confirm" do
skip "Playwright dialog handling not working yet"
page.goto basic_command_url
user = User.first
user = User.last

assert_equal 0, user.count
assert_equal "0000", element("code[role='counter']").inner_text
Expand Down

0 comments on commit df34a84

Please sign in to comment.