Ember CLI Page Object is an Ember CLI addon that streamlines the creation and maintenance of page objects for acceptance and integration tests within Ember applications. Following the Page Object design pattern, it abstracts UI interactions and assertions into reusable objects, significantly reducing code duplication and making tests more resilient to UI changes. The current stable version is 2.3.2, released as part of a continuous development cycle with frequent bug fixes and enhancements. Recent efforts have focused on progressively removing jQuery dependencies to modernize the codebase while maintaining backward compatibility. It differentiates itself by providing a dedicated, mature testing pattern specifically tailored for the Ember ecosystem, offering a structured approach to testing complex UIs compared to raw `@ember/test-helpers` usage.
npm install ember-cli-page-objectVerified import paths — ran on the pinned version, not inferred.
Demonstrates defining a page object for a user listing page and using it in an acceptance test.
Review page object definitions and remove direct jQuery dependencies. Utilize native DOM selectors and Ember's test helpers where possible.
Upgrade your Ember.js, Ember CLI, and Node.js environments to meet the minimum specified versions.
Upgrade to `ember-cli-page-object` v2.3.2 or newer to ensure correct module resolution behavior. Verify your `tsconfig.json` or bundler configuration for module resolution if issues persist.
Ensure that the page object property has a `scope` or `selector` defined, or that the action is called on a specific element within the page object hierarchy. E.g., `button: clickable('.my-button')` then `page.button.click()`.Verify the import path for macros (e.g., `import { text } from 'ember-cli-page-object/macros';`). Ensure `ember-cli-page-object` is at least v2.3.2 to benefit from `package.json` exports fixes.Ensure that `await` is used before any page object action that triggers async behavior (e.g., `await UsersPage.visit();`). Double-check selectors and the rendered HTML for accuracy. Use `await settled()` or `debug()` from `@ember/test-helpers` to inspect the DOM state during tests.