Skip to content

Commit

Permalink
add RSpec for /pull/25
Browse files Browse the repository at this point in the history
  • Loading branch information
YusukeIwaki committed Oct 26, 2020
1 parent c7eeadc commit 638af87
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions spec/integration/keyboard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@
page.keyboard.type_text(text)
expect(page.evaluate("() => document.querySelector('textarea').value")).to eq(text)
end

it 'should input ( by type_text method' do
text = '(puppeteer)'
page.keyboard.type_text(text)
expect(page.evaluate("() => document.querySelector('textarea').value")).to eq(text)
end

it 'should input ( by pressing Shift + 9' do
page.keyboard do
down('Shift')
press('Digit9')
up('Shift')
end
expect(page.evaluate("() => document.querySelector('textarea').value")).to eq('(')
end
end

context 'with key event listener content' do
Expand Down

0 comments on commit 638af87

Please sign in to comment.