feat: support compact and luggage relation tags
This commit is contained in:
@@ -101,10 +101,16 @@ test('a cloned Glass Harbor level can be solved without modifying its template',
|
||||
await expect(relationTag).toHaveAttribute('aria-expanded', 'true')
|
||||
await relationTag.click()
|
||||
await expect(page.getByText('Edit red thread')).toBeVisible()
|
||||
await page.locator('.tag-style-picker input[value="compact"]').check()
|
||||
await waitForSave(page, () => page.getByRole('button', { name: 'SAVE THREAD', exact: true }).click())
|
||||
await expect(relationTag).toHaveClass(/\bcompact\b/)
|
||||
await expect(relationTag).not.toHaveClass(/\bluggage-tag\b/)
|
||||
await relationTag.click()
|
||||
await expect(page.getByText('Edit red thread')).toBeVisible()
|
||||
await page.getByRole('button', { name: 'Close thread editor', exact: true }).click()
|
||||
|
||||
const solved = await (await request.get(`/api/levels/${playable.id}`)).json()
|
||||
expect(solved.connections).toContainEqual(expect.objectContaining({ label: 'Proof Elias is the driver', tightness: 85 }))
|
||||
expect(solved.connections).toContainEqual(expect.objectContaining({ label: 'Proof Elias is the driver', tightness: 85, tagStyle: 'compact' }))
|
||||
|
||||
const template = await (await request.get('/api/templates')).json() as { slug: string; currentVersion: number }[]
|
||||
expect(template).toContainEqual(expect.objectContaining({ slug: 'glass-harbor', currentVersion: 1 }))
|
||||
|
||||
Reference in New Issue
Block a user