Skip to content

[ZEPPELIN-6562] Fix specs that silently pass or flake because they target DOM the new UI no longer renders - #5350

Merged
tbonelee merged 2 commits into
apache:masterfrom
voidmatcha:fix/e2e-flaky-stabilization
Jul 29, 2026
Merged

[ZEPPELIN-6562] Fix specs that silently pass or flake because they target DOM the new UI no longer renders#5350
tbonelee merged 2 commits into
apache:masterfrom
voidmatcha:fix/e2e-flaky-stabilization

Conversation

@voidmatcha

@voidmatcha voidmatcha commented Jul 26, 2026

Copy link
Copy Markdown
Member

What is this PR for?

Several new UI specs target DOM that the previous UI rendered. Those selectors match no element, and the result splits two ways: some checks pass without proving anything, and some waits never resolve and time out. Both symptoms come from the same cause.

The silent passes are the heavier half. waitForParagraphExecution in notebook-keyboard-page.ts waits on .paragraph-control .fa-spin, .running-indicator, .paragraph-status-running. None of those classes appear in any new UI template, and .fa-spin is only a class definition in the vendored FontAwesome stylesheet that is never applied. The wait resolves immediately, so callers move on while the paragraph still reads READY. The keyboard suite uses this helper throughout.

The same selector is used as an assertion. paragraph-functionality.spec.ts:184 is meant to confirm that a cancelled paragraph stopped running, but the locator matches nothing and not.toBeVisible passes whether or not execution stopped. This PR asserts that .status reaches ABORT instead. Asserting that the cancel control disappears is not enough, because that control only renders while the paragraph is PENDING or RUNNING, so it also disappears on natural completion. For the same reason the cancel has to happen after the run starts: the control is visible during PENDING too, so the existing code clicked it while the interpreter was still starting and exercised something other than what the test claims.

The flaky half comes from three places. The trash folder's "Empty" anchor collapses when the row loses hover: its bounding box is {width:0, height:0} unhovered and {width:12, height:17} hovered, so splitting reveal and click clicks empty space. A click that lands while a dialog is still running its open animation is not registered at all. And paragraphs arrive over the WebSocket, so waitForLoadState('networkidle') can resolve before any paragraph has rendered.

Strict-mode collisions sit on top of that. getByRole('link', { name: 'Job' }) matches the accessible name as a substring, so it also selects note links whose title contains "Job". The header and user-menu locators now pass exact: true, checked against the names in the templates.

Fallback selector chains move into the Page Object and narrow to the element that exists. The cancel button was .cancel-para, [nz-tooltip*="Cancel"], [title*="Cancel"], button:has-text("Cancel"), i[nz-icon="pause-circle"], .anticon-pause-circle; only .cancel-para is in the new UI. The export dropdown is declared without nzTrigger, so ng-zorro opens it on hover rather than click, which is now encapsulated as openExportMenu(). The clipboard spec produced a TEXT result because %sh output has no %table marker, so the export control never rendered at all; adding the marker gives it a real TABLE result.

What type of PR is it?

Bug Fix

Todos

  • Confirm the removed selectors appear in no Angular template and in no React component
  • Confirm each replacement exists and means what the test assumes
  • Check that every changed assertion still fails when the feature is broken
  • Run the cancel test, measure the status transitions, and set the timeout from the measurement
  • Lint with the rules added in ZEPPELIN-6560 and confirm no new violations

What is the Jira issue?

ZEPPELIN-6562

How should this be tested?

cd zeppelin-web-angular
npm run e2e:fast -- tests/notebook/ tests/home/ tests/share/ tests/workspace/

The clipboard spec needs a shell interpreter and skips on CI. The cancel test runs on CI against the Python interpreter; measured locally, the status goes PENDING to RUNNING and reaches ABORT about ten seconds after the click, which is what the assertion timeout is set from.

The dead selectors can be confirmed directly: grep -rn "fa-spin\|running-indicator\|paragraph-status-running" zeppelin-web-angular/src matches only the vendored FontAwesome stylesheet and no template.

Screenshots (if appropriate)

Questions:

  • Does the license files need to update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@voidmatcha
voidmatcha force-pushed the fix/e2e-flaky-stabilization branch 2 times, most recently from 78bef62 to ca8457e Compare July 27, 2026 15:18
@voidmatcha
voidmatcha force-pushed the fix/e2e-flaky-stabilization branch from ca8457e to 98ab23c Compare July 28, 2026 00:26
@tbonelee
tbonelee merged commit cc5c38a into apache:master Jul 29, 2026
18 checks passed
@tbonelee

Copy link
Copy Markdown
Contributor

Merged into master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants