diff --git a/core/http/react-ui/e2e/no-horizontal-overflow.spec.js b/core/http/react-ui/e2e/no-horizontal-overflow.spec.js index 06c14bec85..2df05f90df 100644 --- a/core/http/react-ui/e2e/no-horizontal-overflow.spec.js +++ b/core/http/react-ui/e2e/no-horizontal-overflow.spec.js @@ -16,8 +16,9 @@ import { mockLedger, GALLERY } from './ledger-fixtures.js' const WIDTHS = [390, 768] // Boxes that scroll on their own, by selector. -// The strips are one row of tabs or chips that scroll on a phone by design. -const SCROLLS_INSIDE = ['pre', 'code', 'table', '.ag-pre', '.wk-shortcuts__chips', '.st-groups'] +// The strips are one row of tabs or chips that scroll on a phone by design +// (the Settings tabs outgrow 390 px with a wider font). +const SCROLLS_INSIDE = ['pre', 'code', 'table', '.ag-pre', '.wk-shortcuts__chips', '.st-groups', '.dk-hubtabs'] const join = (n, s) => Array.from({ length: n }, (_, i) => `${s}${i}`).join('_') const WORD = join(9, 'unbroken_name_segment') diff --git a/core/http/react-ui/e2e/studio-addon.js b/core/http/react-ui/e2e/studio-addon.js index 15a2a3ca58..a3017e1fa8 100644 --- a/core/http/react-ui/e2e/studio-addon.js +++ b/core/http/react-ui/e2e/studio-addon.js @@ -38,14 +38,20 @@ function build(id) { return built.get(id) } +// The text of a manifest field: a plain string, or a language map. The apps +// list sends the English text in title and description, and the whole map in +// titles and descriptions. +const english = v => (v && typeof v === 'object' ? v.en : v) +const languages = v => (v && typeof v === 'object' ? v : undefined) + export function packagedApp(id, over = {}) { const manifest = JSON.parse(fs.readFileSync(path.join(addons, id, 'manifest.json'), 'utf8')) const ui = manifest.capabilities.ui const base = `/api/addons/${id}/assets/${DIGEST}` return app({ - id, name: id, title: ui.title, description: ui.description, icon: undefined, generation: 1, version: manifest.version, + id, name: id, title: english(ui.title), description: english(ui.description), titles: languages(ui.title), descriptions: languages(ui.description), icon: undefined, generation: 1, version: manifest.version, mainPage: `/app/addons/${id}/${ui.mainPage}`, tools: [], toolCount: 0, - ui: { entry: `${base}/${ui.entry}`, css: ui.css.map(c => `${base}/${c}`), sdk: ui.sdk, pages: ui.pages, navigation: ui.navigation, modelActions: ui.modelActions, homeCommands: ui.homeCommands?.map(c => ({ ...c, page: c.page || ui.mainPage, label: c.label || ui.title, icon: c.icon || 'puzzle' })) }, + ui: { entry: `${base}/${ui.entry}`, css: ui.css.map(c => `${base}/${c}`), sdk: ui.sdk, pages: ui.pages, navigation: ui.navigation, modelActions: ui.modelActions, homeCommands: ui.homeCommands?.map(c => ({ ...c, page: c.page || ui.mainPage, label: c.label || english(ui.title), icon: c.icon || 'puzzle' })) }, ...over, }) }