packages/insomnia-smoke-test/playwright/pages/README.md
This directory contains the Insomnia smoke-test Page Object Model (POM). The goal is to keep tests stable, readable, and selector-safe.
InsomniaApp: root facade. It wires page objects and shared components.Page object: route-level surface (for example, project page).Component object: reusable or bounded UI region (for example, statusbar, tabbar, sidebar).Page object.Component.Page composes its own components.InsomniaApp composes top-level pages/components and exposes shortcuts.page.getBy... is only acceptable for gaps that are not modeled yet.root getter.xxxLocator(...) method naming when the locator needs parameters (for example, list row by name).root, plusButton), expose it as a getter directly.root whenever possible to reduce collisions.closeTab, openAddTabMenu.Instantiate once per test and use composed objects:
test('example test', async ({ insomnia }) => {
await insomnia.projectPage.createCollection();
await insomnia.tabbar.closeTab('New Request');
await expect.soft(insomnia.tabbar.tabLocator('foo')).toHaveAttribute('data-selected', 'true');
});