Skip to content

Commit

Permalink
chore: remove legacy checks in keyboard tests (#10995)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrandolf committed Sep 22, 2023
1 parent 01c33e8 commit f21e903
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 251 deletions.
172 changes: 8 additions & 164 deletions test/TestExpectations.json
Expand Up @@ -119,6 +119,12 @@
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard *",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.launch *",
"platforms": ["darwin", "linux", "win32"],
Expand Down Expand Up @@ -642,100 +648,10 @@
"expectations": ["FAIL", "PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard ElementHandle.press should not support |text| option",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should move with the arrow keys",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should not type canceled events",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should press the meta key",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should press the metaKey",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should send a character with ElementHandle.press",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should send proper codes while typing",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should send proper codes while typing with shift",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should specify location",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should specify repeat property",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should throw on unknown keys",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should trigger commands of keyboard shortcuts",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should type all kinds of characters",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should type emoji",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should type emoji into an iframe",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should type into a textarea",
"testIdPattern": "[keyboard.spec] Keyboard should send a character with sendCharacter",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
"expectations": ["FAIL"]
},
{
"testIdPattern": "[launcher.spec] Launcher specs Puppeteer Browser.disconnect should reject navigation when browser closes",
Expand Down Expand Up @@ -2147,72 +2063,6 @@
"parameters": ["cdp", "chrome"],
"expectations": ["FAIL"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard ElementHandle.press should support |text| option",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["cdp", "firefox"],
"expectations": ["FAIL"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should press the meta key",
"platforms": ["linux", "win32"],
"parameters": ["cdp", "firefox"],
"expectations": ["FAIL"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should press the meta key",
"platforms": ["linux", "win32"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["FAIL"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should press the meta key",
"platforms": ["darwin"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should press the metaKey",
"platforms": ["linux", "win32"],
"parameters": ["cdp", "firefox"],
"expectations": ["FAIL"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should press the metaKey",
"platforms": ["linux", "win32"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["FAIL"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should press the metaKey",
"platforms": ["darwin"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should report multiple modifiers",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["chrome", "webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should report shiftKey",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["chrome", "webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should report shiftKey",
"platforms": ["darwin"],
"parameters": ["cdp", "firefox"],
"expectations": ["FAIL"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should report shiftKey",
"platforms": ["linux"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should send a character with sendCharacter",
"platforms": ["darwin", "linux", "win32"],
Expand All @@ -2237,12 +2087,6 @@
"parameters": ["cdp", "firefox"],
"expectations": ["FAIL"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should type all kinds of characters",
"platforms": ["linux"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[keyboard.spec] Keyboard should type emoji",
"platforms": ["darwin", "linux", "win32"],
Expand Down
8 changes: 4 additions & 4 deletions test/assets/input/keyboard.html
Expand Up @@ -10,13 +10,13 @@
let textarea = document.querySelector('textarea');
textarea.focus();
textarea.addEventListener('keydown', event => {
log('Keydown:', event.key, event.code, event.which, modifiers(event));
log('Keydown:', event.key, event.code, modifiers(event));
});
textarea.addEventListener('keypress', event => {
log('Keypress:', event.key, event.code, event.which, event.charCode, modifiers(event));
textarea.addEventListener('input', event => {
log('input:', event.data, event.inputType, event.isComposing);
});
textarea.addEventListener('keyup', event => {
log('Keyup:', event.key, event.code, event.which, modifiers(event));
log('Keyup:', event.key, event.code, modifiers(event));
});
function modifiers(event) {
let m = [];
Expand Down

0 comments on commit f21e903

Please sign in to comment.