// The setup checklist reads the selected org: an org with no model to run gets a // Model step that leads to the page that fixes it. const assert = require('node:assert/strict'); const { ORG, ABSENT, selectOrg } = require('./helpers/org-helpers.cjs'); module.exports = async ({ page, go, shot, settled, tolerate }) => { tolerate(ABSENT); await go('/'); await page.getByPlaceholder('Describe a task').waitFor(); assert.equal(await page.getByRole('link', { name: 'Model', exact: true }).count(), 0, 'an org with a model got a Model step'); assert.equal((await selectOrg(page, ORG.beta)).status(), 204); await go('/'); await page.getByText('Setup', { exact: true }).waitFor(); const model = page.getByRole('link', { name: 'Model', exact: true }); await model.waitFor(); assert.equal(await model.getAttribute('href'), '/org/models'); await shot('beta-dashboard'); await model.click(); await settled('/org/models'); await shot('model-page'); };