Skip to content

Commit

Permalink
Deleted stepping-05 Gecko test. Finished filling in stepping-05 (now …
Browse files Browse the repository at this point in the history
…Chromium) test (#10364)
  • Loading branch information
bvaughn authored Feb 26, 2024
1 parent bd8d041 commit 4af669e
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 70 deletions.
8 changes: 2 additions & 6 deletions packages/e2e-tests/examples.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions packages/e2e-tests/helpers/lexical.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,14 @@ export async function submitCurrentText(page: Page, options: InputAndTypeAheadOp
const input = page.locator(inputSelector);
const initialText = await input.textContent();

await hideTypeAheadSuggestions(page, options);

let loopCounter = 0;

// Timing awkwardness;
// Sometimes the typeahead misses an "Enter" command and doesn't submit the form.
// Sometimes the typeahead panel takes a while to popup so we should attempt to re-dismiss it each retry
while ((await input.textContent()) === initialText) {
await hideTypeAheadSuggestions(page, options);

await delay(100);

await input.press("Enter");
Expand Down
30 changes: 18 additions & 12 deletions packages/e2e-tests/tests/stepping-05.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,26 @@ test(`stepping-05: Test stepping in pretty-printed code`, async ({
await rewindToLine(page, 4);
await stepInToLine(page, 2);

// Add a breakpoint in minified.html and resume to there
// Add a breakpoint in doc_minified.html and resume to there
await addBreakpoint(page, { url: exampleKey, lineNumber: 8 });
await resumeToLine(page, 8);
await stepOverToLine(page, 9);
await stepOverToLine(page, 10);
await resumeToLine(page, 8); // [ document ].getElementById("divvy").click()
await stepOverToLine(page, 8); // document.[ getElementById("divvy") ].click()
await stepOverToLine(page, 8); // document.getElementById("divvy").[ click() ]
await stepOverToLine(page, 9); // [ window ].setTimeout(recordingFinished)
await stepOverToLine(page, 9); // window.[ setTimeout(recordingFinished) ]
await stepOverToLine(page, 10); // [ }) ]

// Step around in bundle_input.js
await openConsolePanel(page);
await addEventListenerLogpoints(page, [{ eventType: "event.mouse.click", categoryKey: "mouse" }]);
await warpToMessage(page, "(click)", 15);
await addEventListenerLogpoints(page, [{ eventType: "click", categoryKey: "mouse" }]);
await warpToMessage(page, "(click)", 15); // [ n = new DOMEvent(n, s ].getWindow()), !1 === nf.call(s, n)
await stepInToLine(page, 15); // n = new DOMEvent(n, s.[ getWindow()), !1 ] === nf.call(s, n)
await stepInToLine(page, 2); // getWindow: () => [ window ]
await stepOutToLine(page, 15); // n = new DOMEvent(n, s.getWindow()), !1 [ === nf ].call(s, n)
await stepInToLine(page, 15); // n = new DOMEvent(n, s.getWindow()), !1 === nf.[ call(s, n) ]
await stepInToLine(page, 6); // [ this ].getElementById("divvy").innerHTML = "Done!"
await stepOutToLine(page, 16); // [ } ]

await stepInToLine(page, 2);
await stepOutToLine(page, 15);
await stepInToLine(page, 11);
await stepOutToLine(page, 15);
await stepInToLine(page, 6);
await stepOutToLine(page, 16);
// Step back out to doc_minified.html
await stepInToLine(page, 9); // [ window ].setTimeout(recordingFinished)
});
48 changes: 0 additions & 48 deletions packages/e2e-tests/tests/stepping-05_chromium.test.ts

This file was deleted.

2 changes: 1 addition & 1 deletion public/test/examples/doc_minified.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div id="divvy">Hello World!</div><script src="minified.js"></script><script>function recordingFinished(){console.log("ExampleFinished");}window.addEventListener("load", () => {document.getElementById("divvy").click();window.setTimeout(recordingFinished);});</script><script src="mapped_minified.js"></script>
<div id="divvy">Hello World!</div><script src="minified.js"></script><script>function recordingFinished(){console.log("ExampleFinished");}window.addEventListener("load", () => {document.getElementById("divvy").click();window.setTimeout(recordingFinished, 500);});</script><script src="mapped_minified.js"></script>
1 change: 0 additions & 1 deletion public/test/examples/doc_minified_chromium.html

This file was deleted.

0 comments on commit 4af669e

Please sign in to comment.