@verdaccio/e2e-ui 2.8.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -8
- package/build/cjs/commands/index.cjs +1 -2
- package/build/cjs/features.cjs +6 -2
- package/build/cjs/features.cjs.map +1 -1
- package/build/cjs/index.cjs +6 -2
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/tasks/publish.cjs +1 -2
- package/build/cjs/tasks/publish.cjs.map +1 -1
- package/build/cjs/testIds.cjs +3 -2
- package/build/cjs/testIds.cjs.map +1 -1
- package/build/cjs/tests/change-password.cjs +1 -2
- package/build/cjs/tests/detail.cjs +1 -2
- package/build/cjs/tests/failure-modes.cjs +1 -2
- package/build/cjs/tests/home-detail-ux.cjs +1 -2
- package/build/cjs/tests/home.cjs +1 -2
- package/build/cjs/tests/i18n-keys.cjs +1 -2
- package/build/cjs/tests/index.cjs +4 -0
- package/build/cjs/tests/layout.cjs +1 -2
- package/build/cjs/tests/manifest-rendering.cjs +1 -2
- package/build/cjs/tests/prefixed-routing.cjs +53 -0
- package/build/cjs/tests/prefixed-routing.cjs.map +1 -0
- package/build/cjs/tests/provenance.cjs +133 -0
- package/build/cjs/tests/provenance.cjs.map +1 -0
- package/build/cjs/tests/publish.cjs +1 -2
- package/build/cjs/tests/search.cjs +1 -2
- package/build/cjs/tests/session.cjs +1 -2
- package/build/cjs/tests/settings.cjs +1 -2
- package/build/cjs/tests/signin.cjs +1 -2
- package/build/cjs/tests/signup.cjs +1 -2
- package/build/esm/commands/index.js +1 -2
- package/build/esm/features.js +6 -2
- package/build/esm/features.js.map +1 -1
- package/build/esm/index.js +5 -3
- package/build/esm/index.js.map +1 -1
- package/build/esm/tasks/publish.js +1 -2
- package/build/esm/testIds.js +3 -2
- package/build/esm/testIds.js.map +1 -1
- package/build/esm/tests/change-password.js +1 -2
- package/build/esm/tests/detail.js +1 -2
- package/build/esm/tests/failure-modes.js +1 -2
- package/build/esm/tests/home-detail-ux.js +1 -2
- package/build/esm/tests/home.js +1 -2
- package/build/esm/tests/i18n-keys.js +1 -2
- package/build/esm/tests/index.js +3 -1
- package/build/esm/tests/layout.js +1 -2
- package/build/esm/tests/manifest-rendering.js +1 -2
- package/build/esm/tests/prefixed-routing.js +53 -0
- package/build/esm/tests/prefixed-routing.js.map +1 -0
- package/build/esm/tests/provenance.js +133 -0
- package/build/esm/tests/provenance.js.map +1 -0
- package/build/esm/tests/publish.js +1 -2
- package/build/esm/tests/search.js +1 -2
- package/build/esm/tests/session.js +1 -2
- package/build/esm/tests/settings.js +1 -2
- package/build/esm/tests/signin.js +1 -2
- package/build/esm/tests/signup.js +1 -2
- package/build/features.d.ts +12 -0
- package/build/index.d.ts +1 -1
- package/build/testIds.d.ts +4 -0
- package/build/tests/index.d.ts +2 -0
- package/build/tests/prefixed-routing.d.ts +2 -0
- package/build/tests/provenance.d.ts +13 -0
- package/package.json +2 -2
package/build/esm/testIds.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testIds.js","names":[],"sources":["../../src/testIds.ts"],"sourcesContent":["/**\n * Configurable DOM selectors used by the e2e-ui test suites.\n *\n * The Verdaccio UI is a moving target — data-testids can and do change\n * between majors — so every selector referenced by a test lives here\n * and can be overridden by consumers of `@verdaccio/e2e-ui` via\n * `createRegistryConfig({ testIds, selectors })`.\n *\n * The defaults below match Verdaccio 6.x as of the last time we audited\n * the ui-components source. If a selector moves, override just the\n * affected field instead of forking the suite.\n */\n\n/**\n * Map of data-testid values used by the test suites, grouped by UI\n * section. Each field holds the bare testid string (no `data-testid=\"…\"`\n * wrapping) — the test helpers pass it through `cy.getByTestId(...)`.\n */\nexport interface TestIds {\n home: {\n /** Help card shown on the empty-registry landing page. */\n helpCard: string;\n /** 404 \"not found\" container. */\n notFound: string;\n /** Filter / scope / sort bar above the package list (9.x). */\n packageListToolbar: string;\n /** Text filter input inside the toolbar. */\n packageListFilter: string;\n /** Native input of the scope select (only with more than one scope). */\n packageListScope: string;\n /** Message shown when the filter matches no package. */\n packageListNoMatch: string;\n /** Prefix of the welcome card setup tabs: `<prefix><manager>`. */\n helpSetupTabPrefix: string;\n /** Note on the welcome card explaining cached uplink packages. */\n helpUplinksNote: string;\n /** Step list of the publishing guide, in the welcome card and the settings (9.x). */\n helpGuide: string;\n };\n header: {\n /** Outermost `<NavBar>` element. */\n container: string;\n /** Inner wrapper inside the nav bar. */\n innerNavBar: string;\n /** Right-side action cluster wrapper. */\n right: string;\n /** Wrapper around the header search input. */\n searchContainer: string;\n /** Default SVG Verdaccio logo. */\n defaultLogo: string;\n /** Custom (user-provided) logo image. */\n customLogo: string;\n /** \"Login\" button shown when logged out. */\n loginButton: string;\n /** Gear icon that opens the settings dialog. */\n settingsTooltip: string;\n /** \"Publishing\" tab of the settings dialog (9.x). */\n settingsPublishTab: string;\n /** Panel of the \"Publishing\" tab (9.x). */\n settingsPublishPanel: string;\n /** Info icon that opens the registry info dialog. */\n infoTooltip: string;\n /**\n * Theme switch button shown while in LIGHT mode (clicking it\n * flips to dark). The underlying component swaps between this\n * and `themeSwitchDark` based on `isDarkMode`.\n */\n themeSwitchLight: string;\n /** Theme switch button shown while in DARK mode. */\n themeSwitchDark: string;\n /** Menu icon shown after login (opens the logged-in menu). */\n logInDialogIcon: string;\n /** \"Log out\" entry inside the logged-in menu. */\n logOutDialogIcon: string;\n /** \"Hi <username>\" label inside the logged-in menu. */\n greetingsLabel: string;\n };\n footer: {\n /** Outer footer wrapper. */\n container: string;\n /** \"Powered by\" version text on the right side of the footer. */\n version: string;\n };\n login: {\n /** Login dialog container (the MUI Dialog root). */\n dialog: string;\n /** DialogContent wrapper inside the login dialog. */\n dialogContent: string;\n /**\n * Error banner shown inside the login dialog when the server\n * rejects credentials (or any other `errors.root` message the form\n * sets). Renders inside the `LoginDialogFormError` component.\n */\n error: string;\n };\n package: {\n /** Wrapper around the list of packages on the home page. */\n itemList: string;\n /** Package name link in the package list (home + search results). */\n title: string;\n /** Version link of a package list item, to its version page (9.x). */\n versionLink: string;\n /** Readme container on the package detail page. */\n readme: string;\n /** Sidebar container on the package detail page. */\n sidebar: string;\n /** Install commands section list. */\n installList: string;\n /** Individual install line for npm. */\n installNpm: string;\n /** Individual install line for yarn. */\n installYarn: string;\n /** Individual install line for pnpm. */\n installPnpm: string;\n /** Individual install line for bun (9.x). */\n installBun: string;\n /** `.npmrc` registry line below the install commands (9.x). */\n installNpmrc: string;\n /** Copy button of the `.npmrc` registry line. */\n installNpmrcCopy: string;\n /** Tab that shows the readme. */\n readmeTab: string;\n /** Keyword list below the install section. */\n keywordList: string;\n /** Tab that reveals the dependencies view. */\n dependenciesTab: string;\n /** Dependencies list wrapper (one entry per dep). */\n dependencies: string;\n /** Tab that reveals the versions view. */\n versionsTab: string;\n /** \"latest\" tag row inside the versions view. */\n tagLatest: string;\n /** Tab that reveals the uplinks view. */\n uplinksTab: string;\n /** Empty-state message when the package has no uplinks. */\n noUplinks: string;\n /** Action-bar tarball download FAB. */\n downloadTarballBtn: string;\n /** Package list tarball download button. */\n downloadTarball: string;\n /** Action-bar \"view raw manifest\" FAB. */\n rawBtn: string;\n /** Full-screen dialog that opens when `rawBtn` is clicked. */\n rawViewerDialog: string;\n /** Close button inside the raw viewer dialog. */\n closeRawViewer: string;\n };\n search: {\n /** Prefix of the origin group headers: `<prefix>private|cached|remote`. */\n groupPrefix: string;\n /** Prefix of the origin icon on each result: `<prefix>private|...`. */\n originPrefix: string;\n };\n errors: {\n /**\n * Generic error page shown when a data request fails without a\n * specific status (5xx, network failure). Added by\n * verdaccio/verdaccio#6210 — only present on builds with that fix.\n */\n genericError: string;\n };\n}\n\n/**\n * CSS selectors (not data-testids) used by the test suites. These are\n * things like form-field IDs and framework-specific class names that\n * Verdaccio's UI exposes as plain selectors rather than testids.\n */\nexport interface Selectors {\n /** Class applied to the parsed README markdown body. */\n markdownBody: string;\n loginDialog: {\n /** Username text input inside the login dialog. */\n usernameInput: string;\n /** Password text input inside the login dialog. */\n passwordInput: string;\n /** Submit button inside the login dialog. */\n submitButton: string;\n };\n signup: {\n /** Username input on /-/web/add-user (shares ids with the login form). */\n usernameInput: string;\n /** Password input on /-/web/add-user. */\n passwordInput: string;\n /** Email input on /-/web/add-user (only email-typed input on the page). */\n emailInput: string;\n /** Submit button on /-/web/add-user. */\n submitButton: string;\n };\n}\n\n/**\n * Defaults matching Verdaccio 6.x (bundled ui-theme@9.0.0-next-9.x).\n * Overridable via `createRegistryConfig({ testIds: { ... } })`.\n */\nexport const DEFAULT_TEST_IDS: TestIds = {\n home: {\n helpCard: 'help-card',\n notFound: '404',\n packageListToolbar: 'package-list-toolbar',\n packageListFilter: 'package-list-filter',\n packageListScope: 'package-list-scope',\n packageListNoMatch: 'package-list-no-match',\n helpSetupTabPrefix: 'help-setup-',\n helpUplinksNote: 'help-uplinks-note',\n helpGuide: 'help-guide',\n },\n header: {\n container: 'header',\n innerNavBar: 'inner-nav-bar',\n right: 'header-right',\n searchContainer: 'search-container',\n defaultLogo: 'default-logo',\n customLogo: 'custom-logo',\n loginButton: 'header--button-login',\n settingsTooltip: 'header--tooltip-settings',\n settingsPublishTab: 'settings-publish-tab',\n settingsPublishPanel: 'settings-publish',\n infoTooltip: 'header--tooltip-info',\n themeSwitchLight: 'header--button--light',\n themeSwitchDark: 'header--button--dark',\n logInDialogIcon: 'logInDialogIcon',\n logOutDialogIcon: 'logOutDialogIcon',\n greetingsLabel: 'greetings-label',\n },\n footer: {\n container: 'footer',\n version: 'version-footer',\n },\n login: {\n dialog: 'login--dialog',\n dialogContent: 'dialogContentLogin',\n error: 'error',\n },\n package: {\n itemList: 'package-item-list',\n title: 'package-title',\n versionLink: 'package-version-link',\n readme: 'readme',\n sidebar: 'sidebar',\n installList: 'installList',\n installNpm: 'installListItem-npm',\n installYarn: 'installListItem-yarn',\n installPnpm: 'installListItem-pnpm',\n installBun: 'installListItem-bun',\n installNpmrc: 'install-npmrc',\n installNpmrcCopy: 'installNpmrc',\n readmeTab: 'readme-tab',\n keywordList: 'keyword-list',\n dependenciesTab: 'dependencies-tab',\n dependencies: 'dependencies',\n versionsTab: 'versions-tab',\n tagLatest: 'tag-latest',\n uplinksTab: 'uplinks-tab',\n noUplinks: 'no-uplinks',\n downloadTarballBtn: 'download-tarball-btn',\n downloadTarball: 'download-tarball',\n rawBtn: 'raw-btn',\n rawViewerDialog: 'rawViewer--dialog',\n closeRawViewer: 'close-raw-viewer',\n },\n search: {\n groupPrefix: 'search-group-',\n originPrefix: 'search-origin-',\n },\n errors: {\n genericError: 'generic-error',\n },\n};\n\n/**\n * Defaults for non-testid CSS selectors. Overridable via\n * `createRegistryConfig({ selectors: { ... } })`.\n */\nexport const DEFAULT_SELECTORS: Selectors = {\n markdownBody: '.markdown-body',\n loginDialog: {\n usernameInput: '#login--dialog-username',\n passwordInput: '#login--dialog-password',\n submitButton: '#login--dialog-button-submit',\n },\n signup: {\n usernameInput: '#login--dialog-username',\n passwordInput: '#login--dialog-password',\n emailInput: 'input[type=\"email\"]',\n submitButton: 'button[type=\"submit\"]',\n },\n};\n\n/** Deep-partial helper — every field of a nested object becomes optional. */\nexport type DeepPartial<T> = {\n [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];\n};\n\n/**\n * Merge user overrides into the default testIds map. Merging is\n * per-section (one level deep): `overrides.header` replaces individual\n * fields under `defaults.header` without touching `defaults.footer`.\n * The shape is fixed and small, so we enumerate sections by hand\n * rather than relying on a recursive generic merger.\n */\nexport function mergeTestIds(defaults: TestIds, overrides?: DeepPartial<TestIds>): TestIds {\n if (!overrides) return defaults;\n return {\n home: { ...defaults.home, ...overrides.home },\n header: { ...defaults.header, ...overrides.header },\n footer: { ...defaults.footer, ...overrides.footer },\n login: { ...defaults.login, ...overrides.login },\n package: { ...defaults.package, ...overrides.package },\n search: { ...defaults.search, ...overrides.search },\n errors: { ...defaults.errors, ...overrides.errors },\n };\n}\n\n/** Same idea as `mergeTestIds`, for the CSS-selector block. */\nexport function mergeSelectors(defaults: Selectors, overrides?: DeepPartial<Selectors>): Selectors {\n if (!overrides) return defaults;\n return {\n markdownBody: overrides.markdownBody ?? defaults.markdownBody,\n loginDialog: { ...defaults.loginDialog, ...overrides.loginDialog },\n signup: { ...defaults.signup, ...overrides.signup },\n };\n}\n"],"mappings":";;;;;AAmMA,IAAa,mBAA4B;CACvC,MAAM;EACJ,UAAU;EACV,UAAU;EACV,oBAAoB;EACpB,mBAAmB;EACnB,kBAAkB;EAClB,oBAAoB;EACpB,oBAAoB;EACpB,iBAAiB;EACjB,WAAW;CACb;CACA,QAAQ;EACN,WAAW;EACX,aAAa;EACb,OAAO;EACP,iBAAiB;EACjB,aAAa;EACb,YAAY;EACZ,aAAa;EACb,iBAAiB;EACjB,oBAAoB;EACpB,sBAAsB;EACtB,aAAa;EACb,kBAAkB;EAClB,iBAAiB;EACjB,iBAAiB;EACjB,kBAAkB;EAClB,gBAAgB;CAClB;CACA,QAAQ;EACN,WAAW;EACX,SAAS;CACX;CACA,OAAO;EACL,QAAQ;EACR,eAAe;EACf,OAAO;CACT;CACA,SAAS;EACP,UAAU;EACV,OAAO;EACP,aAAa;EACb,QAAQ;EACR,SAAS;EACT,aAAa;EACb,YAAY;EACZ,aAAa;EACb,aAAa;EACb,YAAY;EACZ,cAAc;EACd,kBAAkB;EAClB,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,cAAc;EACd,aAAa;EACb,WAAW;EACX,YAAY;EACZ,WAAW;EACX,oBAAoB;EACpB,iBAAiB;EACjB,QAAQ;EACR,iBAAiB;EACjB,gBAAgB;CAClB;CACA,QAAQ;EACN,aAAa;EACb,cAAc;CAChB;CACA,QAAQ,EACN,cAAc,gBAChB;AACF;;;;;AAMA,IAAa,oBAA+B;CAC1C,cAAc;CACd,aAAa;EACX,eAAe;EACf,eAAe;EACf,cAAc;CAChB;CACA,QAAQ;EACN,eAAe;EACf,eAAe;EACf,YAAY;EACZ,cAAc;CAChB;AACF;;;;;;;;AAcA,SAAgB,aAAa,UAAmB,WAA2C;CACzF,IAAI,CAAC,WAAW,OAAO;CACvB,OAAO;EACL,MAAM;GAAE,GAAG,SAAS;GAAM,GAAG,UAAU;EAAK;EAC5C,QAAQ;GAAE,GAAG,SAAS;GAAQ,GAAG,UAAU;EAAO;EAClD,QAAQ;GAAE,GAAG,SAAS;GAAQ,GAAG,UAAU;EAAO;EAClD,OAAO;GAAE,GAAG,SAAS;GAAO,GAAG,UAAU;EAAM;EAC/C,SAAS;GAAE,GAAG,SAAS;GAAS,GAAG,UAAU;EAAQ;EACrD,QAAQ;GAAE,GAAG,SAAS;GAAQ,GAAG,UAAU;EAAO;EAClD,QAAQ;GAAE,GAAG,SAAS;GAAQ,GAAG,UAAU;EAAO;CACpD;AACF;;AAGA,SAAgB,eAAe,UAAqB,WAA+C;CACjG,IAAI,CAAC,WAAW,OAAO;CACvB,OAAO;EACL,cAAc,UAAU,gBAAgB,SAAS;EACjD,aAAa;GAAE,GAAG,SAAS;GAAa,GAAG,UAAU;EAAY;EACjE,QAAQ;GAAE,GAAG,SAAS;GAAQ,GAAG,UAAU;EAAO;CACpD;AACF"}
|
|
1
|
+
{"version":3,"file":"testIds.js","names":[],"sources":["../../src/testIds.ts"],"sourcesContent":["/**\n * Configurable DOM selectors used by the e2e-ui test suites.\n *\n * The Verdaccio UI is a moving target — data-testids can and do change\n * between majors — so every selector referenced by a test lives here\n * and can be overridden by consumers of `@verdaccio/e2e-ui` via\n * `createRegistryConfig({ testIds, selectors })`.\n *\n * The defaults below match Verdaccio 6.x as of the last time we audited\n * the ui-components source. If a selector moves, override just the\n * affected field instead of forking the suite.\n */\n\n/**\n * Map of data-testid values used by the test suites, grouped by UI\n * section. Each field holds the bare testid string (no `data-testid=\"…\"`\n * wrapping) — the test helpers pass it through `cy.getByTestId(...)`.\n */\nexport interface TestIds {\n home: {\n /** Help card shown on the empty-registry landing page. */\n helpCard: string;\n /** 404 \"not found\" container. */\n notFound: string;\n /** Filter / scope / sort bar above the package list (9.x). */\n packageListToolbar: string;\n /** Text filter input inside the toolbar. */\n packageListFilter: string;\n /** Native input of the scope select (only with more than one scope). */\n packageListScope: string;\n /** Message shown when the filter matches no package. */\n packageListNoMatch: string;\n /** Prefix of the welcome card setup tabs: `<prefix><manager>`. */\n helpSetupTabPrefix: string;\n /** Note on the welcome card explaining cached uplink packages. */\n helpUplinksNote: string;\n /** Step list of the publishing guide, in the welcome card and the settings (9.x). */\n helpGuide: string;\n };\n header: {\n /** Outermost `<NavBar>` element. */\n container: string;\n /** Inner wrapper inside the nav bar. */\n innerNavBar: string;\n /** Right-side action cluster wrapper. */\n right: string;\n /** Wrapper around the header search input. */\n searchContainer: string;\n /** Default SVG Verdaccio logo. */\n defaultLogo: string;\n /** Custom (user-provided) logo image. */\n customLogo: string;\n /** \"Login\" button shown when logged out. */\n loginButton: string;\n /** Gear icon that opens the settings dialog. */\n settingsTooltip: string;\n /** \"Publishing\" tab of the settings dialog (9.x). */\n settingsPublishTab: string;\n /** Panel of the \"Publishing\" tab (9.x). */\n settingsPublishPanel: string;\n /** Info icon that opens the registry info dialog. */\n infoTooltip: string;\n /**\n * Theme switch button shown while in LIGHT mode (clicking it\n * flips to dark). The underlying component swaps between this\n * and `themeSwitchDark` based on `isDarkMode`.\n */\n themeSwitchLight: string;\n /** Theme switch button shown while in DARK mode. */\n themeSwitchDark: string;\n /** Menu icon shown after login (opens the logged-in menu). */\n logInDialogIcon: string;\n /** \"Log out\" entry inside the logged-in menu. */\n logOutDialogIcon: string;\n /** \"Hi <username>\" label inside the logged-in menu. */\n greetingsLabel: string;\n };\n footer: {\n /** Outer footer wrapper. */\n container: string;\n /** \"Powered by\" version text on the right side of the footer. */\n version: string;\n };\n login: {\n /** Login dialog container (the MUI Dialog root). */\n dialog: string;\n /** DialogContent wrapper inside the login dialog. */\n dialogContent: string;\n /**\n * Error banner shown inside the login dialog when the server\n * rejects credentials (or any other `errors.root` message the form\n * sets). Renders inside the `LoginDialogFormError` component.\n */\n error: string;\n };\n package: {\n /** Wrapper around the list of packages on the home page. */\n itemList: string;\n /** Package name link in the package list (home + search results). */\n title: string;\n /** Version link of a package list item, to its version page (9.x). */\n versionLink: string;\n /** Readme container on the package detail page. */\n readme: string;\n /** Sidebar container on the package detail page. */\n sidebar: string;\n /** Install commands section list. */\n installList: string;\n /** Individual install line for npm. */\n installNpm: string;\n /** Individual install line for yarn. */\n installYarn: string;\n /** Individual install line for pnpm. */\n installPnpm: string;\n /** Individual install line for bun (9.x). */\n installBun: string;\n /** `.npmrc` registry line below the install commands (9.x). */\n installNpmrc: string;\n /** Copy button of the `.npmrc` registry line. */\n installNpmrcCopy: string;\n /** Chip of the \"Provenance\" sidebar section that opens the provenance dialog (9.x). */\n provenanceBadge: string;\n /** Root of the provenance dialog (shares the registry info dialog container). */\n provenanceDialog: string;\n /** Tab that shows the readme. */\n readmeTab: string;\n /** Keyword list below the install section. */\n keywordList: string;\n /** Tab that reveals the dependencies view. */\n dependenciesTab: string;\n /** Dependencies list wrapper (one entry per dep). */\n dependencies: string;\n /** Tab that reveals the versions view. */\n versionsTab: string;\n /** \"latest\" tag row inside the versions view. */\n tagLatest: string;\n /** Tab that reveals the uplinks view. */\n uplinksTab: string;\n /** Empty-state message when the package has no uplinks. */\n noUplinks: string;\n /** Action-bar tarball download FAB. */\n downloadTarballBtn: string;\n /** Package list tarball download button. */\n downloadTarball: string;\n /** Action-bar \"view raw manifest\" FAB. */\n rawBtn: string;\n /** Full-screen dialog that opens when `rawBtn` is clicked. */\n rawViewerDialog: string;\n /** Close button inside the raw viewer dialog. */\n closeRawViewer: string;\n };\n search: {\n /** Prefix of the origin group headers: `<prefix>private|cached|remote`. */\n groupPrefix: string;\n /** Prefix of the origin icon on each result: `<prefix>private|...`. */\n originPrefix: string;\n };\n errors: {\n /**\n * Generic error page shown when a data request fails without a\n * specific status (5xx, network failure). Added by\n * verdaccio/verdaccio#6210 — only present on builds with that fix.\n */\n genericError: string;\n };\n}\n\n/**\n * CSS selectors (not data-testids) used by the test suites. These are\n * things like form-field IDs and framework-specific class names that\n * Verdaccio's UI exposes as plain selectors rather than testids.\n */\nexport interface Selectors {\n /** Class applied to the parsed README markdown body. */\n markdownBody: string;\n loginDialog: {\n /** Username text input inside the login dialog. */\n usernameInput: string;\n /** Password text input inside the login dialog. */\n passwordInput: string;\n /** Submit button inside the login dialog. */\n submitButton: string;\n };\n signup: {\n /** Username input on /-/web/add-user (shares ids with the login form). */\n usernameInput: string;\n /** Password input on /-/web/add-user. */\n passwordInput: string;\n /** Email input on /-/web/add-user (only email-typed input on the page). */\n emailInput: string;\n /** Submit button on /-/web/add-user. */\n submitButton: string;\n };\n}\n\n/**\n * Defaults matching Verdaccio 6.x (bundled ui-theme@9.0.0-next-9.x).\n * Overridable via `createRegistryConfig({ testIds: { ... } })`.\n */\nexport const DEFAULT_TEST_IDS: TestIds = {\n home: {\n helpCard: 'help-card',\n notFound: '404',\n packageListToolbar: 'package-list-toolbar',\n packageListFilter: 'package-list-filter',\n packageListScope: 'package-list-scope',\n packageListNoMatch: 'package-list-no-match',\n helpSetupTabPrefix: 'help-setup-',\n helpUplinksNote: 'help-uplinks-note',\n helpGuide: 'help-guide',\n },\n header: {\n container: 'header',\n innerNavBar: 'inner-nav-bar',\n right: 'header-right',\n searchContainer: 'search-container',\n defaultLogo: 'default-logo',\n customLogo: 'custom-logo',\n loginButton: 'header--button-login',\n settingsTooltip: 'header--tooltip-settings',\n settingsPublishTab: 'settings-publish-tab',\n settingsPublishPanel: 'settings-publish',\n infoTooltip: 'header--tooltip-info',\n themeSwitchLight: 'header--button--light',\n themeSwitchDark: 'header--button--dark',\n logInDialogIcon: 'logInDialogIcon',\n logOutDialogIcon: 'logOutDialogIcon',\n greetingsLabel: 'greetings-label',\n },\n footer: {\n container: 'footer',\n version: 'version-footer',\n },\n login: {\n dialog: 'login--dialog',\n dialogContent: 'dialogContentLogin',\n error: 'error',\n },\n package: {\n itemList: 'package-item-list',\n title: 'package-title',\n versionLink: 'package-version-link',\n readme: 'readme',\n sidebar: 'sidebar',\n installList: 'installList',\n installNpm: 'installListItem-npm',\n installYarn: 'installListItem-yarn',\n installPnpm: 'installListItem-pnpm',\n installBun: 'installListItem-bun',\n installNpmrc: 'install-npmrc',\n installNpmrcCopy: 'installNpmrc',\n provenanceBadge: 'provenance-badge',\n provenanceDialog: 'registryInfo--dialog',\n readmeTab: 'readme-tab',\n keywordList: 'keyword-list',\n dependenciesTab: 'dependencies-tab',\n dependencies: 'dependencies',\n versionsTab: 'versions-tab',\n tagLatest: 'tag-latest',\n uplinksTab: 'uplinks-tab',\n noUplinks: 'no-uplinks',\n downloadTarballBtn: 'download-tarball-btn',\n downloadTarball: 'download-tarball',\n rawBtn: 'raw-btn',\n rawViewerDialog: 'rawViewer--dialog',\n closeRawViewer: 'close-raw-viewer',\n },\n search: {\n groupPrefix: 'search-group-',\n originPrefix: 'search-origin-',\n },\n errors: {\n genericError: 'generic-error',\n },\n};\n\n/**\n * Defaults for non-testid CSS selectors. Overridable via\n * `createRegistryConfig({ selectors: { ... } })`.\n */\nexport const DEFAULT_SELECTORS: Selectors = {\n markdownBody: '.markdown-body',\n loginDialog: {\n usernameInput: '#login--dialog-username',\n passwordInput: '#login--dialog-password',\n submitButton: '#login--dialog-button-submit',\n },\n signup: {\n usernameInput: '#login--dialog-username',\n passwordInput: '#login--dialog-password',\n emailInput: 'input[type=\"email\"]',\n submitButton: 'button[type=\"submit\"]',\n },\n};\n\n/** Deep-partial helper — every field of a nested object becomes optional. */\nexport type DeepPartial<T> = {\n [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];\n};\n\n/**\n * Merge user overrides into the default testIds map. Merging is\n * per-section (one level deep): `overrides.header` replaces individual\n * fields under `defaults.header` without touching `defaults.footer`.\n * The shape is fixed and small, so we enumerate sections by hand\n * rather than relying on a recursive generic merger.\n */\nexport function mergeTestIds(defaults: TestIds, overrides?: DeepPartial<TestIds>): TestIds {\n if (!overrides) return defaults;\n return {\n home: { ...defaults.home, ...overrides.home },\n header: { ...defaults.header, ...overrides.header },\n footer: { ...defaults.footer, ...overrides.footer },\n login: { ...defaults.login, ...overrides.login },\n package: { ...defaults.package, ...overrides.package },\n search: { ...defaults.search, ...overrides.search },\n errors: { ...defaults.errors, ...overrides.errors },\n };\n}\n\n/** Same idea as `mergeTestIds`, for the CSS-selector block. */\nexport function mergeSelectors(defaults: Selectors, overrides?: DeepPartial<Selectors>): Selectors {\n if (!overrides) return defaults;\n return {\n markdownBody: overrides.markdownBody ?? defaults.markdownBody,\n loginDialog: { ...defaults.loginDialog, ...overrides.loginDialog },\n signup: { ...defaults.signup, ...overrides.signup },\n };\n}\n"],"mappings":";;;;;AAuMA,IAAa,mBAA4B;CACvC,MAAM;EACJ,UAAU;EACV,UAAU;EACV,oBAAoB;EACpB,mBAAmB;EACnB,kBAAkB;EAClB,oBAAoB;EACpB,oBAAoB;EACpB,iBAAiB;EACjB,WAAW;CACb;CACA,QAAQ;EACN,WAAW;EACX,aAAa;EACb,OAAO;EACP,iBAAiB;EACjB,aAAa;EACb,YAAY;EACZ,aAAa;EACb,iBAAiB;EACjB,oBAAoB;EACpB,sBAAsB;EACtB,aAAa;EACb,kBAAkB;EAClB,iBAAiB;EACjB,iBAAiB;EACjB,kBAAkB;EAClB,gBAAgB;CAClB;CACA,QAAQ;EACN,WAAW;EACX,SAAS;CACX;CACA,OAAO;EACL,QAAQ;EACR,eAAe;EACf,OAAO;CACT;CACA,SAAS;EACP,UAAU;EACV,OAAO;EACP,aAAa;EACb,QAAQ;EACR,SAAS;EACT,aAAa;EACb,YAAY;EACZ,aAAa;EACb,aAAa;EACb,YAAY;EACZ,cAAc;EACd,kBAAkB;EAClB,iBAAiB;EACjB,kBAAkB;EAClB,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,cAAc;EACd,aAAa;EACb,WAAW;EACX,YAAY;EACZ,WAAW;EACX,oBAAoB;EACpB,iBAAiB;EACjB,QAAQ;EACR,iBAAiB;EACjB,gBAAgB;CAClB;CACA,QAAQ;EACN,aAAa;EACb,cAAc;CAChB;CACA,QAAQ,EACN,cAAc,gBAChB;AACF;;;;;AAMA,IAAa,oBAA+B;CAC1C,cAAc;CACd,aAAa;EACX,eAAe;EACf,eAAe;EACf,cAAc;CAChB;CACA,QAAQ;EACN,eAAe;EACf,eAAe;EACf,YAAY;EACZ,cAAc;CAChB;AACF;;;;;;;;AAcA,SAAgB,aAAa,UAAmB,WAA2C;CACzF,IAAI,CAAC,WAAW,OAAO;CACvB,OAAO;EACL,MAAM;GAAE,GAAG,SAAS;GAAM,GAAG,UAAU;EAAK;EAC5C,QAAQ;GAAE,GAAG,SAAS;GAAQ,GAAG,UAAU;EAAO;EAClD,QAAQ;GAAE,GAAG,SAAS;GAAQ,GAAG,UAAU;EAAO;EAClD,OAAO;GAAE,GAAG,SAAS;GAAO,GAAG,UAAU;EAAM;EAC/C,SAAS;GAAE,GAAG,SAAS;GAAS,GAAG,UAAU;EAAQ;EACrD,QAAQ;GAAE,GAAG,SAAS;GAAQ,GAAG,UAAU;EAAO;EAClD,QAAQ;GAAE,GAAG,SAAS;GAAQ,GAAG,UAAU;EAAO;CACpD;AACF;;AAGA,SAAgB,eAAe,UAAqB,WAA+C;CACjG,IAAI,CAAC,WAAW,OAAO;CACvB,OAAO;EACL,cAAc,UAAU,gBAAgB,SAAS;EACjD,aAAa;GAAE,GAAG,SAAS;GAAa,GAAG,UAAU;EAAY;EACjE,QAAQ;GAAE,GAAG,SAAS;GAAQ,GAAG,UAAU;EAAO;CACpD;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { maybeIt } from "../features.js";
|
|
2
|
-
|
|
2
|
+
// src/tests/change-password.ts
|
|
3
3
|
/**
|
|
4
4
|
* Tests for the Change Password page at /-/web/change-password.
|
|
5
5
|
*
|
|
@@ -140,7 +140,6 @@ function changePasswordTests(config) {
|
|
|
140
140
|
});
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
|
-
//#endregion
|
|
144
143
|
export { changePasswordTests };
|
|
145
144
|
|
|
146
145
|
//# sourceMappingURL=change-password.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { maybeIt } from "../features.js";
|
|
2
|
-
|
|
2
|
+
// src/tests/detail.ts
|
|
3
3
|
/**
|
|
4
4
|
* Package detail page tests: version-pinned URLs and the wire format of
|
|
5
5
|
* the UI's data requests.
|
|
@@ -100,7 +100,6 @@ function detailTests(config) {
|
|
|
100
100
|
});
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
|
-
//#endregion
|
|
104
103
|
export { detailTests };
|
|
105
104
|
|
|
106
105
|
//# sourceMappingURL=detail.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { maybeIt } from "../features.js";
|
|
2
|
-
|
|
2
|
+
// src/tests/failure-modes.ts
|
|
3
3
|
/**
|
|
4
4
|
* Failure-mode tests: what the UI shows when the backend misbehaves.
|
|
5
5
|
*
|
|
@@ -91,7 +91,6 @@ function failureModeTests(config) {
|
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
|
-
//#endregion
|
|
95
94
|
export { failureModeTests };
|
|
96
95
|
|
|
97
96
|
//# sourceMappingURL=failure-modes.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { maybeIt } from "../features.js";
|
|
2
|
-
|
|
2
|
+
// src/tests/home-detail-ux.ts
|
|
3
3
|
/**
|
|
4
4
|
* Home and package page UX that ships with the 9.x web UI: the package
|
|
5
5
|
* list toolbar, the tab in the address, the welcome guide, the install
|
|
@@ -160,7 +160,6 @@ function homeDetailUxTests(config) {
|
|
|
160
160
|
});
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
-
//#endregion
|
|
164
163
|
export { homeDetailUxTests };
|
|
165
164
|
|
|
166
165
|
//# sourceMappingURL=home-detail-ux.js.map
|
package/build/esm/tests/home.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/tests/home.ts
|
|
2
2
|
function homeTests(config) {
|
|
3
3
|
const { home, header, package: pkg } = config.testIds;
|
|
4
4
|
const { features } = config;
|
|
@@ -84,7 +84,6 @@ function homeTests(config) {
|
|
|
84
84
|
});
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
//#endregion
|
|
88
87
|
export { homeTests };
|
|
89
88
|
|
|
90
89
|
//# sourceMappingURL=home.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { maybeIt } from "../features.js";
|
|
2
|
-
|
|
2
|
+
// src/tests/i18n-keys.ts
|
|
3
3
|
/**
|
|
4
4
|
* Raw-i18n-key detector: no page may render untranslated keys like
|
|
5
5
|
* `security.addUser.title` as visible text.
|
|
@@ -68,7 +68,6 @@ function i18nKeyTests(config) {
|
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
//#endregion
|
|
72
71
|
export { i18nKeyTests };
|
|
73
72
|
|
|
74
73
|
//# sourceMappingURL=i18n-keys.js.map
|
package/build/esm/tests/index.js
CHANGED
|
@@ -12,4 +12,6 @@ import { signupTests } from "./signup.js";
|
|
|
12
12
|
import { manifestRenderingTests } from "./manifest-rendering.js";
|
|
13
13
|
import { sessionTests } from "./session.js";
|
|
14
14
|
import { homeDetailUxTests } from "./home-detail-ux.js";
|
|
15
|
-
|
|
15
|
+
import { provenanceTests } from "./provenance.js";
|
|
16
|
+
import { prefixedRoutingTests } from "./prefixed-routing.js";
|
|
17
|
+
export { changePasswordTests, detailTests, failureModeTests, homeDetailUxTests, homeTests, i18nKeyTests, layoutTests, manifestRenderingTests, prefixedRoutingTests, provenanceTests, publishTests, searchTests, sessionTests, settingsTests, signinTests, signupTests };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { maybeIt } from "../features.js";
|
|
2
|
-
|
|
2
|
+
// src/tests/layout.ts
|
|
3
3
|
/**
|
|
4
4
|
* Tests for the persistent page chrome: the header (nav bar, logo,
|
|
5
5
|
* search container, action buttons) and the footer (version marker).
|
|
@@ -75,7 +75,6 @@ function layoutTests(config) {
|
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
//#endregion
|
|
79
78
|
export { layoutTests };
|
|
80
79
|
|
|
81
80
|
//# sourceMappingURL=layout.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { maybeIt } from "../features.js";
|
|
2
|
-
|
|
2
|
+
// src/tests/manifest-rendering.ts
|
|
3
3
|
/**
|
|
4
4
|
* Manifest-shape rendering tests.
|
|
5
5
|
*
|
|
@@ -67,7 +67,6 @@ function manifestRenderingTests(config) {
|
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
//#endregion
|
|
71
70
|
export { manifestRenderingTests };
|
|
72
71
|
|
|
73
72
|
//# sourceMappingURL=manifest-rendering.js.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// src/tests/prefixed-routing.ts
|
|
2
|
+
function prefixedRoutingTests(config) {
|
|
3
|
+
describe("routing under a prefix with an asynchronous middleware plugin", () => {
|
|
4
|
+
const pkgName = "@verdaccio/routing-fixture";
|
|
5
|
+
let registryUrl;
|
|
6
|
+
let tempFolder;
|
|
7
|
+
before(() => {
|
|
8
|
+
cy.task("startRoutingRegistry").then(({ registryUrl: url, publishUrl }) => {
|
|
9
|
+
registryUrl = url.replace(/\/$/, "");
|
|
10
|
+
cy.task("publishPackage", {
|
|
11
|
+
registryUrl: publishUrl,
|
|
12
|
+
pkgName,
|
|
13
|
+
version: "1.0.0",
|
|
14
|
+
unique: true
|
|
15
|
+
}).then((result) => {
|
|
16
|
+
tempFolder = result.tempFolder;
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
after(() => {
|
|
21
|
+
if (tempFolder) cy.task("cleanupPublished", tempFolder);
|
|
22
|
+
cy.task("stopRoutingRegistry");
|
|
23
|
+
});
|
|
24
|
+
it("renders the published package and its detail using the prefixed web API", () => {
|
|
25
|
+
const { testIds } = config;
|
|
26
|
+
const prefix = new URL(registryUrl).pathname;
|
|
27
|
+
assert.notStrictEqual(prefix, "/", "the fixture must mount Verdaccio under a prefix");
|
|
28
|
+
cy.intercept("GET", `${registryUrl}/-/verdaccio/data/packages*`).as("routingPackages");
|
|
29
|
+
cy.intercept("GET", `${registryUrl}/-/verdaccio/data/sidebar/**`).as("routingSidebar");
|
|
30
|
+
cy.intercept("GET", `${registryUrl}/-/verdaccio/data/package/readme/**`).as("routingReadme");
|
|
31
|
+
cy.visit(`${registryUrl}/`);
|
|
32
|
+
cy.wait("@routingPackages").then(({ response }) => {
|
|
33
|
+
assert.strictEqual(response?.statusCode, 200);
|
|
34
|
+
assert.include(response?.body.map((pkg) => pkg.name), pkgName);
|
|
35
|
+
});
|
|
36
|
+
cy.contains(`[data-testid="${testIds.package.title}"]`, pkgName).should("be.visible").click();
|
|
37
|
+
cy.location("pathname").should("eq", `${prefix}/-/web/detail/${pkgName}`);
|
|
38
|
+
cy.wait("@routingSidebar").then(({ response }) => {
|
|
39
|
+
assert.strictEqual(response?.statusCode, 200);
|
|
40
|
+
assert.strictEqual(response?.body.latest.name, pkgName);
|
|
41
|
+
});
|
|
42
|
+
cy.wait("@routingReadme").then(({ response }) => {
|
|
43
|
+
assert.strictEqual(response?.statusCode, 200);
|
|
44
|
+
assert.isString(response?.body);
|
|
45
|
+
assert.isNotEmpty(response?.body);
|
|
46
|
+
});
|
|
47
|
+
cy.request(`${registryUrl}/-/ping`).its("status").should("eq", 200);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
export { prefixedRoutingTests };
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=prefixed-routing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefixed-routing.js","names":[],"sources":["../../../src/tests/prefixed-routing.ts"],"sourcesContent":["/// <reference types=\"cypress\" />\nimport type { RegistryConfig } from '../types';\n\nexport function prefixedRoutingTests(config: RegistryConfig) {\n describe('routing under a prefix with an asynchronous middleware plugin', () => {\n const pkgName = '@verdaccio/routing-fixture';\n let registryUrl: string;\n let tempFolder: string | undefined;\n\n before(() => {\n cy.task<{ registryUrl: string; publishUrl: string }>('startRoutingRegistry').then(\n ({ registryUrl: url, publishUrl }) => {\n registryUrl = url.replace(/\\/$/, '');\n cy.task('publishPackage', {\n registryUrl: publishUrl,\n pkgName,\n version: '1.0.0',\n unique: true,\n }).then((result) => {\n tempFolder = result.tempFolder;\n });\n }\n );\n });\n\n after(() => {\n if (tempFolder) cy.task('cleanupPublished', tempFolder);\n cy.task('stopRoutingRegistry');\n });\n\n it('renders the published package and its detail using the prefixed web API', () => {\n const { testIds } = config;\n const prefix = new URL(registryUrl).pathname;\n assert.notStrictEqual(prefix, '/', 'the fixture must mount Verdaccio under a prefix');\n cy.intercept('GET', `${registryUrl}/-/verdaccio/data/packages*`).as('routingPackages');\n cy.intercept('GET', `${registryUrl}/-/verdaccio/data/sidebar/**`).as('routingSidebar');\n cy.intercept('GET', `${registryUrl}/-/verdaccio/data/package/readme/**`).as('routingReadme');\n\n cy.visit(`${registryUrl}/`);\n cy.wait('@routingPackages').then(({ response }) => {\n assert.strictEqual(response?.statusCode, 200);\n assert.include(\n response?.body.map((pkg: { name: string }) => pkg.name),\n pkgName\n );\n });\n cy.contains(`[data-testid=\"${testIds.package.title}\"]`, pkgName).should('be.visible').click();\n cy.location('pathname').should('eq', `${prefix}/-/web/detail/${pkgName}`);\n cy.wait('@routingSidebar').then(({ response }) => {\n assert.strictEqual(response?.statusCode, 200);\n assert.strictEqual(response?.body.latest.name, pkgName);\n });\n cy.wait('@routingReadme').then(({ response }) => {\n assert.strictEqual(response?.statusCode, 200);\n assert.isString(response?.body);\n assert.isNotEmpty(response?.body);\n });\n cy.request(`${registryUrl}/-/ping`).its('status').should('eq', 200);\n });\n });\n}\n"],"mappings":";AAGA,SAAgB,qBAAqB,QAAwB;CAC3D,SAAS,uEAAuE;EAC9E,MAAM,UAAU;EAChB,IAAI;EACJ,IAAI;EAEJ,aAAa;GACX,GAAG,KAAkD,sBAAsB,CAAC,CAAC,MAC1E,EAAE,aAAa,KAAK,iBAAiB;IACpC,cAAc,IAAI,QAAQ,OAAO,EAAE;IACnC,GAAG,KAAK,kBAAkB;KACxB,aAAa;KACb;KACA,SAAS;KACT,QAAQ;IACV,CAAC,CAAC,CAAC,MAAM,WAAW;KAClB,aAAa,OAAO;IACtB,CAAC;GACH,CACF;EACF,CAAC;EAED,YAAY;GACV,IAAI,YAAY,GAAG,KAAK,oBAAoB,UAAU;GACtD,GAAG,KAAK,qBAAqB;EAC/B,CAAC;EAED,GAAG,iFAAiF;GAClF,MAAM,EAAE,YAAY;GACpB,MAAM,SAAS,IAAI,IAAI,WAAW,CAAC,CAAC;GACpC,OAAO,eAAe,QAAQ,KAAK,iDAAiD;GACpF,GAAG,UAAU,OAAO,GAAG,YAAY,4BAA4B,CAAC,CAAC,GAAG,iBAAiB;GACrF,GAAG,UAAU,OAAO,GAAG,YAAY,6BAA6B,CAAC,CAAC,GAAG,gBAAgB;GACrF,GAAG,UAAU,OAAO,GAAG,YAAY,oCAAoC,CAAC,CAAC,GAAG,eAAe;GAE3F,GAAG,MAAM,GAAG,YAAY,EAAE;GAC1B,GAAG,KAAK,kBAAkB,CAAC,CAAC,MAAM,EAAE,eAAe;IACjD,OAAO,YAAY,UAAU,YAAY,GAAG;IAC5C,OAAO,QACL,UAAU,KAAK,KAAK,QAA0B,IAAI,IAAI,GACtD,OACF;GACF,CAAC;GACD,GAAG,SAAS,iBAAiB,QAAQ,QAAQ,MAAM,KAAK,OAAO,CAAC,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM;GAC5F,GAAG,SAAS,UAAU,CAAC,CAAC,OAAO,MAAM,GAAG,OAAO,gBAAgB,SAAS;GACxE,GAAG,KAAK,iBAAiB,CAAC,CAAC,MAAM,EAAE,eAAe;IAChD,OAAO,YAAY,UAAU,YAAY,GAAG;IAC5C,OAAO,YAAY,UAAU,KAAK,OAAO,MAAM,OAAO;GACxD,CAAC;GACD,GAAG,KAAK,gBAAgB,CAAC,CAAC,MAAM,EAAE,eAAe;IAC/C,OAAO,YAAY,UAAU,YAAY,GAAG;IAC5C,OAAO,SAAS,UAAU,IAAI;IAC9B,OAAO,WAAW,UAAU,IAAI;GAClC,CAAC;GACD,GAAG,QAAQ,GAAG,YAAY,QAAQ,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,OAAO,MAAM,GAAG;EACpE,CAAC;CACH,CAAC;AACH"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { maybeIt } from "../features.js";
|
|
2
|
+
// src/tests/provenance.ts
|
|
3
|
+
/**
|
|
4
|
+
* "Provenance" sidebar section (9.x, verdaccio/verdaccio#6447).
|
|
5
|
+
*
|
|
6
|
+
* registry.npmjs.org attaches `dist.signatures` and `dist.attestations` to
|
|
7
|
+
* every version it signs; the UI shows them without verifying anything in
|
|
8
|
+
* the browser. The fixtures below publish those fields themselves (npm keeps
|
|
9
|
+
* extra `dist` fields on publish), so the suite runs offline and does not
|
|
10
|
+
* need an uplink. The build details come from the registry only when it
|
|
11
|
+
* announces the endpoint, so against this fixture the dialog ends at the
|
|
12
|
+
* summary.
|
|
13
|
+
*/
|
|
14
|
+
function provenanceTests(config) {
|
|
15
|
+
const { features } = config;
|
|
16
|
+
const { package: pkg } = config.testIds;
|
|
17
|
+
const attestations = {
|
|
18
|
+
url: "https://registry.npmjs.org/-/npm/v1/attestations/e2e-provenance@1.0.0",
|
|
19
|
+
provenance: { predicateType: "https://slsa.dev/provenance/v1" }
|
|
20
|
+
};
|
|
21
|
+
const signatures = [{
|
|
22
|
+
keyid: "SHA256:e2e-fixture-key",
|
|
23
|
+
sig: "MEUCIQDe2e"
|
|
24
|
+
}];
|
|
25
|
+
describe("provenance", () => {
|
|
26
|
+
describe("with provenance metadata", () => {
|
|
27
|
+
const pkgName = "@verdaccio/provenance-fixture";
|
|
28
|
+
let tempFolder = null;
|
|
29
|
+
beforeEach(() => {
|
|
30
|
+
cy.task("publishPackage", {
|
|
31
|
+
pkgName,
|
|
32
|
+
version: "1.0.0",
|
|
33
|
+
unique: true,
|
|
34
|
+
manifest: { dist: {
|
|
35
|
+
signatures,
|
|
36
|
+
attestations
|
|
37
|
+
} }
|
|
38
|
+
}).then((result) => {
|
|
39
|
+
tempFolder = result?.tempFolder ?? null;
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
afterEach(() => {
|
|
43
|
+
cy.task("unpublishPackage", {
|
|
44
|
+
pkgName,
|
|
45
|
+
tempFolder: tempFolder ?? void 0
|
|
46
|
+
});
|
|
47
|
+
if (tempFolder) cy.task("cleanupPublished", tempFolder);
|
|
48
|
+
tempFolder = null;
|
|
49
|
+
});
|
|
50
|
+
maybeIt(features.provenance.sidebarSection)("should show the provenance chip and open the dialog with the summary", () => {
|
|
51
|
+
cy.intercept("GET", `/-/verdaccio/data/sidebar/${pkgName}*`).as("sidebar");
|
|
52
|
+
cy.intercept("GET", `/-/verdaccio/data/package/provenance/${pkgName}*`).as("details");
|
|
53
|
+
cy.visit(`${config.registryUrl}/-/web/detail/${pkgName}`);
|
|
54
|
+
cy.wait("@sidebar", { timeout: 1e4 });
|
|
55
|
+
cy.getByTestId(pkg.provenanceBadge).scrollIntoView().should("be.visible").and("contain.text", "Provenance").and("contain.text", "SLSA v1");
|
|
56
|
+
cy.getByTestId(pkg.provenanceBadge).click();
|
|
57
|
+
cy.getByTestId(pkg.provenanceDialog).should("be.visible");
|
|
58
|
+
cy.getByTestId(pkg.provenanceDialog).within(() => {
|
|
59
|
+
cy.contains(`${pkgName}@`);
|
|
60
|
+
cy.contains("SLSA v1");
|
|
61
|
+
cy.contains(signatures[0].keyid);
|
|
62
|
+
cy.contains("registry.npmjs.org/-/npm/v1/attestations/e2e-provenance@1.0.0").should("have.attr", "href", attestations.url);
|
|
63
|
+
cy.contains("cryptographic verification has not been performed");
|
|
64
|
+
});
|
|
65
|
+
cy.wait("@details", { timeout: 1e4 }).then((interception) => {
|
|
66
|
+
expect(interception.response?.statusCode).to.equal(404);
|
|
67
|
+
});
|
|
68
|
+
cy.getByTestId(pkg.provenanceDialog).should("not.contain.text", "Built on");
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
describe("with a registry signature only", () => {
|
|
72
|
+
const pkgName = "@verdaccio/signature-fixture";
|
|
73
|
+
let tempFolder = null;
|
|
74
|
+
beforeEach(() => {
|
|
75
|
+
cy.task("publishPackage", {
|
|
76
|
+
pkgName,
|
|
77
|
+
version: "1.0.0",
|
|
78
|
+
unique: true,
|
|
79
|
+
manifest: { dist: { signatures } }
|
|
80
|
+
}).then((result) => {
|
|
81
|
+
tempFolder = result?.tempFolder ?? null;
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
afterEach(() => {
|
|
85
|
+
cy.task("unpublishPackage", {
|
|
86
|
+
pkgName,
|
|
87
|
+
tempFolder: tempFolder ?? void 0
|
|
88
|
+
});
|
|
89
|
+
if (tempFolder) cy.task("cleanupPublished", tempFolder);
|
|
90
|
+
tempFolder = null;
|
|
91
|
+
});
|
|
92
|
+
maybeIt(features.provenance.sidebarSection)("should show the registry signature chip without requesting build details", () => {
|
|
93
|
+
cy.intercept("GET", `/-/verdaccio/data/package/provenance/${pkgName}*`).as("details");
|
|
94
|
+
cy.visit(`${config.registryUrl}/-/web/detail/${pkgName}`);
|
|
95
|
+
cy.getByTestId(pkg.provenanceBadge).scrollIntoView().should("be.visible").and("contain.text", "Registry signature");
|
|
96
|
+
cy.getByTestId(pkg.provenanceBadge).click();
|
|
97
|
+
cy.getByTestId(pkg.provenanceDialog).within(() => {
|
|
98
|
+
cy.contains(signatures[0].keyid);
|
|
99
|
+
});
|
|
100
|
+
cy.get("@details.all").should("have.length", 0);
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
describe("without provenance metadata", () => {
|
|
104
|
+
const pkgName = "@verdaccio/plain-fixture";
|
|
105
|
+
let tempFolder = null;
|
|
106
|
+
beforeEach(() => {
|
|
107
|
+
cy.task("publishPackage", {
|
|
108
|
+
pkgName,
|
|
109
|
+
version: "1.0.0",
|
|
110
|
+
unique: true
|
|
111
|
+
}).then((result) => {
|
|
112
|
+
tempFolder = result?.tempFolder ?? null;
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
afterEach(() => {
|
|
116
|
+
cy.task("unpublishPackage", {
|
|
117
|
+
pkgName,
|
|
118
|
+
tempFolder: tempFolder ?? void 0
|
|
119
|
+
});
|
|
120
|
+
if (tempFolder) cy.task("cleanupPublished", tempFolder);
|
|
121
|
+
tempFolder = null;
|
|
122
|
+
});
|
|
123
|
+
maybeIt(features.provenance.sidebarSection)("should not render the section", () => {
|
|
124
|
+
cy.visit(`${config.registryUrl}/-/web/detail/${pkgName}`);
|
|
125
|
+
cy.getByTestId(pkg.sidebar).should("be.visible");
|
|
126
|
+
cy.getByTestId(pkg.provenanceBadge).should("not.exist");
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
export { provenanceTests };
|
|
132
|
+
|
|
133
|
+
//# sourceMappingURL=provenance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provenance.js","names":[],"sources":["../../../src/tests/provenance.ts"],"sourcesContent":["/// <reference types=\"cypress\" />\nimport { maybeIt } from '../features';\nimport { RegistryConfig } from '../types';\n\n/**\n * \"Provenance\" sidebar section (9.x, verdaccio/verdaccio#6447).\n *\n * registry.npmjs.org attaches `dist.signatures` and `dist.attestations` to\n * every version it signs; the UI shows them without verifying anything in\n * the browser. The fixtures below publish those fields themselves (npm keeps\n * extra `dist` fields on publish), so the suite runs offline and does not\n * need an uplink. The build details come from the registry only when it\n * announces the endpoint, so against this fixture the dialog ends at the\n * summary.\n */\nexport function provenanceTests(config: RegistryConfig) {\n const { features } = config;\n const { package: pkg } = config.testIds;\n\n const attestations = {\n url: 'https://registry.npmjs.org/-/npm/v1/attestations/e2e-provenance@1.0.0',\n provenance: { predicateType: 'https://slsa.dev/provenance/v1' },\n };\n const signatures = [{ keyid: 'SHA256:e2e-fixture-key', sig: 'MEUCIQDe2e' }];\n\n describe('provenance', () => {\n describe('with provenance metadata', () => {\n const pkgName = '@verdaccio/provenance-fixture';\n let tempFolder: string | null = null;\n\n beforeEach(() => {\n cy.task('publishPackage', {\n pkgName,\n version: '1.0.0',\n unique: true,\n manifest: { dist: { signatures, attestations } },\n }).then((result) => {\n tempFolder = result?.tempFolder ?? null;\n });\n });\n\n afterEach(() => {\n cy.task('unpublishPackage', { pkgName, tempFolder: tempFolder ?? undefined });\n if (tempFolder) {\n cy.task('cleanupPublished', tempFolder);\n }\n tempFolder = null;\n });\n\n maybeIt(features.provenance.sidebarSection)(\n 'should show the provenance chip and open the dialog with the summary',\n () => {\n cy.intercept('GET', `/-/verdaccio/data/sidebar/${pkgName}*`).as('sidebar');\n cy.intercept('GET', `/-/verdaccio/data/package/provenance/${pkgName}*`).as('details');\n\n cy.visit(`${config.registryUrl}/-/web/detail/${pkgName}`);\n cy.wait('@sidebar', { timeout: 10000 });\n\n // the sidebar scrolls on its own; bring the chip into its viewport first\n cy.getByTestId(pkg.provenanceBadge)\n .scrollIntoView()\n .should('be.visible')\n .and('contain.text', 'Provenance')\n .and('contain.text', 'SLSA v1');\n\n cy.getByTestId(pkg.provenanceBadge).click();\n cy.getByTestId(pkg.provenanceDialog).should('be.visible');\n cy.getByTestId(pkg.provenanceDialog).within(() => {\n cy.contains(`${pkgName}@`);\n cy.contains('SLSA v1');\n cy.contains(signatures[0].keyid);\n cy.contains('registry.npmjs.org/-/npm/v1/attestations/e2e-provenance@1.0.0').should(\n 'have.attr',\n 'href',\n attestations.url\n );\n cy.contains('cryptographic verification has not been performed');\n });\n\n // the build details are asked for only once the dialog is open; this\n // fixture has no uplink holding the bundle, so the registry answers 404\n // and the dialog keeps the summary\n cy.wait('@details', { timeout: 10000 }).then((interception: any) => {\n expect(interception.response?.statusCode).to.equal(404);\n });\n cy.getByTestId(pkg.provenanceDialog).should('not.contain.text', 'Built on');\n }\n );\n });\n\n describe('with a registry signature only', () => {\n const pkgName = '@verdaccio/signature-fixture';\n let tempFolder: string | null = null;\n\n beforeEach(() => {\n cy.task('publishPackage', {\n pkgName,\n version: '1.0.0',\n unique: true,\n manifest: { dist: { signatures } },\n }).then((result) => {\n tempFolder = result?.tempFolder ?? null;\n });\n });\n\n afterEach(() => {\n cy.task('unpublishPackage', { pkgName, tempFolder: tempFolder ?? undefined });\n if (tempFolder) {\n cy.task('cleanupPublished', tempFolder);\n }\n tempFolder = null;\n });\n\n maybeIt(features.provenance.sidebarSection)(\n 'should show the registry signature chip without requesting build details',\n () => {\n cy.intercept('GET', `/-/verdaccio/data/package/provenance/${pkgName}*`).as('details');\n\n cy.visit(`${config.registryUrl}/-/web/detail/${pkgName}`);\n\n cy.getByTestId(pkg.provenanceBadge)\n .scrollIntoView()\n .should('be.visible')\n .and('contain.text', 'Registry signature');\n cy.getByTestId(pkg.provenanceBadge).click();\n cy.getByTestId(pkg.provenanceDialog).within(() => {\n cy.contains(signatures[0].keyid);\n });\n // no attestation, so the dialog never asks the registry for build details\n cy.get('@details.all').should('have.length', 0);\n }\n );\n });\n\n describe('without provenance metadata', () => {\n const pkgName = '@verdaccio/plain-fixture';\n let tempFolder: string | null = null;\n\n beforeEach(() => {\n cy.task('publishPackage', { pkgName, version: '1.0.0', unique: true }).then((result) => {\n tempFolder = result?.tempFolder ?? null;\n });\n });\n\n afterEach(() => {\n cy.task('unpublishPackage', { pkgName, tempFolder: tempFolder ?? undefined });\n if (tempFolder) {\n cy.task('cleanupPublished', tempFolder);\n }\n tempFolder = null;\n });\n\n maybeIt(features.provenance.sidebarSection)('should not render the section', () => {\n cy.visit(`${config.registryUrl}/-/web/detail/${pkgName}`);\n cy.getByTestId(pkg.sidebar).should('be.visible');\n cy.getByTestId(pkg.provenanceBadge).should('not.exist');\n });\n });\n });\n}\n"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { maybeIt } from "../features.js";
|
|
2
|
-
|
|
2
|
+
// src/tests/publish.ts
|
|
3
3
|
function publishTests(config) {
|
|
4
4
|
const { header, package: pkg } = config.testIds;
|
|
5
5
|
const { markdownBody, loginDialog } = config.selectors;
|
|
@@ -186,7 +186,6 @@ function publishTests(config) {
|
|
|
186
186
|
});
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
|
-
//#endregion
|
|
190
189
|
export { publishTests };
|
|
191
190
|
|
|
192
191
|
//# sourceMappingURL=publish.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { maybeIt } from "../features.js";
|
|
2
|
-
|
|
2
|
+
// src/tests/search.ts
|
|
3
3
|
/**
|
|
4
4
|
* UI tests for the Verdaccio search box.
|
|
5
5
|
*
|
|
@@ -109,7 +109,6 @@ function getSearchInput() {
|
|
|
109
109
|
function anySearchAlias() {
|
|
110
110
|
return "@webSearch";
|
|
111
111
|
}
|
|
112
|
-
//#endregion
|
|
113
112
|
export { searchTests };
|
|
114
113
|
|
|
115
114
|
//# sourceMappingURL=search.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { maybeIt } from "../features.js";
|
|
2
|
-
|
|
2
|
+
// src/tests/session.ts
|
|
3
3
|
/**
|
|
4
4
|
* Session lifecycle tests around the token stored in localStorage.
|
|
5
5
|
*
|
|
@@ -43,7 +43,6 @@ function sessionTests(config) {
|
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
//#endregion
|
|
47
46
|
export { sessionTests };
|
|
48
47
|
|
|
49
48
|
//# sourceMappingURL=session.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { maybeIt } from "../features.js";
|
|
2
|
-
|
|
2
|
+
// src/tests/settings.ts
|
|
3
3
|
/**
|
|
4
4
|
* Tests for the header Settings dialog and the Translations (language)
|
|
5
5
|
* picker inside it.
|
|
@@ -93,7 +93,6 @@ function settingsTests(config) {
|
|
|
93
93
|
});
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
-
//#endregion
|
|
97
96
|
export { settingsTests };
|
|
98
97
|
|
|
99
98
|
//# sourceMappingURL=settings.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { maybeIt } from "../features.js";
|
|
2
|
-
|
|
2
|
+
// src/tests/signin.ts
|
|
3
3
|
function signinTests(config) {
|
|
4
4
|
const { header, login } = config.testIds;
|
|
5
5
|
const { loginDialog } = config.selectors;
|
|
@@ -54,7 +54,6 @@ function signinTests(config) {
|
|
|
54
54
|
});
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
//#endregion
|
|
58
57
|
export { signinTests };
|
|
59
58
|
|
|
60
59
|
//# sourceMappingURL=signin.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { maybeIt } from "../features.js";
|
|
2
|
-
|
|
2
|
+
// src/tests/signup.ts
|
|
3
3
|
/**
|
|
4
4
|
* Create-user (web signup) tests.
|
|
5
5
|
*
|
|
@@ -50,7 +50,6 @@ function signupTests(config) {
|
|
|
50
50
|
});
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
//#endregion
|
|
54
53
|
export { signupTests };
|
|
55
54
|
|
|
56
55
|
//# sourceMappingURL=signup.js.map
|
package/build/features.d.ts
CHANGED
|
@@ -271,6 +271,18 @@ export interface Features {
|
|
|
271
271
|
*/
|
|
272
272
|
settingsPublishTab: boolean;
|
|
273
273
|
};
|
|
274
|
+
provenance: {
|
|
275
|
+
/**
|
|
276
|
+
* Whether to run the "Provenance" sidebar section tests: a version
|
|
277
|
+
* carrying `dist.attestations` or `dist.signatures` shows a chip
|
|
278
|
+
* under "Distribution" that opens a dialog with the statement type,
|
|
279
|
+
* the signing key ids and a link to the attestation bundle, and the
|
|
280
|
+
* build details are only requested when the server announces the
|
|
281
|
+
* endpoint (`capabilities.provenance`). Ships with 9.x
|
|
282
|
+
* (verdaccio/verdaccio#6447) — probe, defaults to `false`.
|
|
283
|
+
*/
|
|
284
|
+
sidebarSection: boolean;
|
|
285
|
+
};
|
|
274
286
|
changePassword: {
|
|
275
287
|
/**
|
|
276
288
|
* Whether to run the happy-path test (submit valid change,
|
package/build/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type { Features } from './features';
|
|
|
6
6
|
export { DEFAULT_SELECTORS, DEFAULT_TEST_IDS } from './testIds';
|
|
7
7
|
export { DEFAULT_FEATURES, maybeIt } from './features';
|
|
8
8
|
export { publishPackage, cleanupPublished, unpublishPackage } from './tasks';
|
|
9
|
-
export { homeTests, signinTests, publishTests, searchTests, settingsTests, layoutTests, changePasswordTests, detailTests, failureModeTests, i18nKeyTests, manifestRenderingTests, sessionTests, signupTests, homeDetailUxTests, } from './tests';
|
|
9
|
+
export { homeTests, signinTests, publishTests, searchTests, settingsTests, layoutTests, changePasswordTests, detailTests, failureModeTests, i18nKeyTests, manifestRenderingTests, sessionTests, signupTests, homeDetailUxTests, provenanceTests, prefixedRoutingTests, } from './tests';
|
|
10
10
|
/**
|
|
11
11
|
* Build a full RegistryConfig from user-provided options with defaults.
|
|
12
12
|
*
|
package/build/testIds.d.ts
CHANGED
|
@@ -117,6 +117,10 @@ export interface TestIds {
|
|
|
117
117
|
installNpmrc: string;
|
|
118
118
|
/** Copy button of the `.npmrc` registry line. */
|
|
119
119
|
installNpmrcCopy: string;
|
|
120
|
+
/** Chip of the "Provenance" sidebar section that opens the provenance dialog (9.x). */
|
|
121
|
+
provenanceBadge: string;
|
|
122
|
+
/** Root of the provenance dialog (shares the registry info dialog container). */
|
|
123
|
+
provenanceDialog: string;
|
|
120
124
|
/** Tab that shows the readme. */
|
|
121
125
|
readmeTab: string;
|
|
122
126
|
/** Keyword list below the install section. */
|
package/build/tests/index.d.ts
CHANGED
|
@@ -12,3 +12,5 @@ export { signupTests } from './signup';
|
|
|
12
12
|
export { manifestRenderingTests } from './manifest-rendering';
|
|
13
13
|
export { sessionTests } from './session';
|
|
14
14
|
export { homeDetailUxTests } from './home-detail-ux';
|
|
15
|
+
export { provenanceTests } from './provenance';
|
|
16
|
+
export { prefixedRoutingTests } from './prefixed-routing';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RegistryConfig } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* "Provenance" sidebar section (9.x, verdaccio/verdaccio#6447).
|
|
4
|
+
*
|
|
5
|
+
* registry.npmjs.org attaches `dist.signatures` and `dist.attestations` to
|
|
6
|
+
* every version it signs; the UI shows them without verifying anything in
|
|
7
|
+
* the browser. The fixtures below publish those fields themselves (npm keeps
|
|
8
|
+
* extra `dist` fields on publish), so the suite runs offline and does not
|
|
9
|
+
* need an uplink. The build details come from the registry only when it
|
|
10
|
+
* announces the endpoint, so against this fixture the dialog ends at the
|
|
11
|
+
* summary.
|
|
12
|
+
*/
|
|
13
|
+
export declare function provenanceTests(config: RegistryConfig): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/e2e-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Cypress plugin for Verdaccio UI e2e tests — run against any registry",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "26.2.0",
|
|
35
35
|
"cypress": "15.20.1",
|
|
36
|
-
"vite": "8.2.
|
|
36
|
+
"vite": "8.2.4"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "vite build && tsc --emitDeclarationOnly -p tsconfig.build.json",
|