Skip to main content

Merchandise Plan Selectors

The data-testid hooks Toolio guarantees in the Merchandise Plan planning view, for building Playwright and Cypress tests.

This page lists the test ids Toolio guarantees in the Merchandise Plan planning view. Use them to load a plan, filter it, change the timeframe and scenario, seed, edit, and save from an automated test.

For the general rules, locator patterns, and the log of contract changes, see Automating UI Tests in Toolio.

Use Cases

  • Load a plan with a set of filters and a timeframe, then check values in the grid.

  • Edit cells, save, and confirm the edits stuck.

  • Seed a scenario from another and verify the result.

Toolbar

These controls sit inside the planning view's toolbar. Scope to mfp-toolbar because dialogs such as Seed render their own copies of the same controls.

Test id

Element

mfp-toolbar

The planning view's toolbar. Use it as the container for the ids below.

load-data-button

Load Data button

scenario-toolbar-button

Scenarios button

timeframe-toolbar-button

Timeframe button

filter-toolbar-button

Filters button

filter-clear-all-button

Clear icon on the Filters button

Top Bar

These controls are in Toolio's top bar, outside mfp-toolbar. Find them from page.

Test id

Element

save-edits-button

Save for unsaved edits

cancel-edits-button

Cancel for unsaved edits

task-manager-button

Task Manager

Filters

Test id

Element

filter-panel

The open Filters menu

filter-row

One applied filter. data-test-key is the field key, for example department. Dynamic group filters add __dg to the key.

filter-label

Field name in a row

filter-operator-input

Operator select (is, is not, …)

filter-value-input

Value control

filter-remove-button

Removes a row

filter-add-button

Add Filter

filter-search-input

Search box in the field list

filter-field-option

A field in the list. data-test-key is the field key, as on filter-row.

Timeframe

Test id

Element

timeframe-menu

The open timeframe list

timeframe-option-custom

Custom option

timeframe-custom-start-year-input

Start year select

timeframe-custom-start-period-input

Start period select

timeframe-custom-end-year-input

End year select

timeframe-custom-end-period-input

End period select

timeframe-custom-apply-button

Select in the custom range

timeframe-custom-cancel-button

Cancel in the custom range

Scenarios

Test id

Element

scenario-change-menu-item

Change Scenarios in the Scenarios menu

scenario-search-input

Scenario search box

scenario-option

A scenario in the list. data-test-key is the scenario's id.

actualize-scenario-checkbox

Actualize checkbox

To pick a scenario by name, type it into the search box and filter the options by text:

await page.getByTestId("scenario-search-input").locator("input").fill("Working Plan");
await page.getByTestId("scenario-option").filter({ hasText: "Working Plan" }).click();

Seed

Test id

Element

seed-menu-item

Seed in the Scenarios menu

seed-plan-dialog

The Seed dialog. Use it as the container for the dialog's own Filters and timeframe controls.

seed-source-scenario-input

Source scenario

seed-target-scenario-input

Target scenario

seed-confirm-button

Seed

seed-cancel-button

Cancel

Confirmation Dialogs

The three dialogs below have their own ids. Any other confirmation in the planning view uses confirm-dialog. All of them share the same button ids.

Test id

Element

validation-warning-dialog

Validation Warning

data-changed-dialog

Data Changed

reset-plan-values-dialog

Reset Plan Values

confirm-dialog

Any other confirmation dialog

confirm-dialog-confirm

The dialog's main action

confirm-dialog-cancel

Cancel

confirm-dialog-ignore

The third option, when the dialog has one, for example Ignore

Leaving the plan with unsaved edits opens the browser's own confirmation, not one of these dialogs. See Handle the Browser's Own Confirmation in Automating UI Tests in Toolio.

Grid and Cells

Test id

Element

mfp-grid

The planning grid. aria-busy is "true" while data loads and "false" when it is ready.

grid-loading-overlay

Loading overlay over the grid

cell-tooltip

Cell tooltip

cell-tooltip-value

A section of the tooltip. data-test-key is edited, locked, or warning.

cell-tooltip-undo-button

Undo in the tooltip

Edited cells also carry the edited-cell class, and the plan URL keeps its query parameters. Both are part of this contract.

❗ mfp-grid reports aria-busy="true" until its first load finishes or fails. Click Load Data before you wait for "false", and give the wait a timeout.

What Is Not Covered

  • Individual grid cells. Use the grid's column ids and row index.

  • The Save With Comments dialog and the scenario section headings in the Scenarios menu.

  • CSS classes other than edited-cell, labels, placeholder text, and icons.

FAQs

Why does filter-toolbar-button match two elements?

The Seed dialog has its own Filters and timeframe controls. Start from mfp-toolbar or seed-plan-dialog.

Which button loads the new data in the Data Changed dialog?

confirm-dialog-confirm is Load New Data (or Load New Data & Apply Changes when you have unsaved edits), and confirm-dialog-cancel is Cancel. The ids follow the action, not the button's position. Scope both to data-changed-dialog.

Did this answer your question?