Skip to content

Commit

Permalink
Removed left/right breakpoint arrows from Pause Info panel (#10601)
Browse files Browse the repository at this point in the history
This is my reasoning:
- These button confuse all of us. (Domi, Josh, Mark, and I just chatted about this in Discord.)
- Mixpanel data shows that [almost no one uses the buttons](https://mixpanel.com/project/2349904/view/2894968/app/insights#2NaEPayGGLnB).
- The rewind/fast-forward buttons (available via hover click and context menu) are easier to use. (After all, Replay is fundamentally different from a traditional browser/debugger. Let's lean into that and simplify our UI!)

![Screenshot 2024-07-05 at 6 00 02 PM](https://github.com/replayio/devtools/assets/29597/97eab27f-4e20-4811-a9f6-2a6391263677)
  • Loading branch information
bvaughn authored Jul 8, 2024
1 parent 3cdee91 commit d5b30c0
Show file tree
Hide file tree
Showing 36 changed files with 99 additions and 491 deletions.
2 changes: 1 addition & 1 deletion packages/e2e-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ You'll also probably need to specifically share that recording as "Public", espe

We use 1 specific Playwright test recording which is a replay of the breakpoints-05 test from this repo. Similar to the instructions above, to update this to a more recent version, you can visit the dashboard for FE E2E Tests and select a more recent recording ID for that test.

We also now have a "golden recording" of one of our own `breakpoints-01` E2E test runs. This serves as a testbed for checking more advanced behaviors like the React and Redux routines. If we ever need to update this, just copy-paste the recording ID from a test run in our "Frontend E2E tests" workspace.
We also now have a "golden recording" of one of our own `breakpoints-02` E2E test runs. This serves as a testbed for checking more advanced behaviors like the React and Redux routines. If we ever need to update this, just copy-paste the recording ID from a test run in our "Frontend E2E tests" workspace.

### Test Suite Dashboard Tests

Expand Down
6 changes: 3 additions & 3 deletions packages/e2e-tests/examples.json

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

26 changes: 4 additions & 22 deletions packages/e2e-tests/helpers/pause-information-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export async function closePrintStatementsAccordionPane(page: Page): Promise<voi
export async function expandAllScopesBlocks(page: Page): Promise<void> {
await debugPrint(page, "Expanding all Scopes blocks", "expandAllScopesBlocks");

await openPauseInformationPanel(page);

const scopesPanel = getScopesPanel(page);
const blocks = scopesPanel.locator('[data-test-name="ScopesInspector"]');

Expand Down Expand Up @@ -158,14 +160,6 @@ export async function openScopeBlocks(page: Page, text: string): Promise<void> {
});
}

export async function resumeToLine(page: Page, line: number): Promise<void> {
await debugPrint(page, `Resuming to line ${chalk.bold(line)}`, "resumeToLine");

await clickCommandBarButton(page, "Resume");

await waitForPaused(page, line);
}

export async function clickCommandBarButton(page: Page, title: string): Promise<void> {
await debugPrint(page, title, "clickCommandBarButton");

Expand All @@ -190,23 +184,11 @@ export async function reverseStepOverToLine(page: Page, line: number) {
await waitForPaused(page, line);
}

export async function rewind(page: Page) {
await debugPrint(page, "Rewinding", "rewind");

await clickCommandBarButton(page, "Rewind Execution");
}

export async function rewindToLine(page: Page, line: number): Promise<void> {
await debugPrint(page, `Rewinding to line ${chalk.bold(line)}`, "rewindToLine");

await clickCommandBarButton(page, "Rewind Execution");

await waitForPaused(page, line);
}

export async function selectFrame(page: Page, index: number): Promise<void> {
await debugPrint(page, `Select frame ${chalk.bold(index)}`, "selectFrame");

await openPauseInformationPanel(page);

const framesPanel = getFramesPanel(page);

const frameListItems = framesPanel.locator(".frame");
Expand Down
24 changes: 20 additions & 4 deletions packages/e2e-tests/helpers/source-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -901,13 +901,22 @@ export async function rewindToLine(
const lineLocator = await getSourceLine(page, lineNumber);
const buttonLocator = lineLocator.locator('[data-test-name="ContinueToButton"]');

// Account for the fact that SourceListRow doesn't render SourceListRowMouseEvents while scrolling
await waitFor(async () => {
const isScrolling = await lineLocator.getAttribute("data-test-is-scrolling");
expect(isScrolling).toBe(null);
});

await lineLocator.locator('[data-test-name="SourceLine-HitCount"]').hover({ force: true });
await page.keyboard.down("Shift");
await page.keyboard.down(getCommandKey());

const state = await buttonLocator.getAttribute("data-test-state");
expect(state).toBe("previous");
await expect(await buttonLocator.getAttribute("data-test-state")).toBe("previous");

await buttonLocator.click({ force: true });

await page.keyboard.up(getCommandKey());
await page.keyboard.up("Shift");
}

export async function fastForwardToLine(
Expand All @@ -926,13 +935,20 @@ export async function fastForwardToLine(
const lineLocator = await getSourceLine(page, lineNumber);
const buttonLocator = lineLocator.locator('[data-test-name="ContinueToButton"]');

// Account for the fact that SourceListRow doesn't render SourceListRowMouseEvents while scrolling
await waitFor(async () => {
const isScrolling = await lineLocator.getAttribute("data-test-is-scrolling");
expect(isScrolling).toBe(null);
});

await lineLocator.locator('[data-test-name="SourceLine-HitCount"]').hover({ force: true });
await page.keyboard.down(getCommandKey());

const state = await buttonLocator.getAttribute("data-test-state");
expect(state).toBe("next");
await expect(await buttonLocator.getAttribute("data-test-state")).toBe("next");

await buttonLocator.click({ force: true });

await page.keyboard.up(getCommandKey());
}

export async function waitForSourceContentsToFinishStreaming(
Expand Down
36 changes: 0 additions & 36 deletions packages/e2e-tests/tests/breakpoints-01.test.ts

This file was deleted.

26 changes: 0 additions & 26 deletions packages/e2e-tests/tests/breakpoints-02.test.ts

This file was deleted.

29 changes: 0 additions & 29 deletions packages/e2e-tests/tests/breakpoints-03.test.ts

This file was deleted.

40 changes: 0 additions & 40 deletions packages/e2e-tests/tests/breakpoints-04.test.ts

This file was deleted.

41 changes: 0 additions & 41 deletions packages/e2e-tests/tests/breakpoints-05.test.ts

This file was deleted.

68 changes: 0 additions & 68 deletions packages/e2e-tests/tests/breakpoints-07.test.ts

This file was deleted.

Loading

0 comments on commit d5b30c0

Please sign in to comment.