test(admin): passing custom css
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
#custom-css {
|
||||||
|
font-family: monospace;
|
||||||
|
background-image: url('/placeholder.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-css::after {
|
||||||
|
content: 'custom-css';
|
||||||
|
}
|
||||||
|
|||||||
@@ -643,6 +643,16 @@ describe('admin', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('Custom CSS', () => {
|
||||||
|
test('should see custom css in admin UI', async () => {
|
||||||
|
await page.goto(postsUrl.admin)
|
||||||
|
await page.waitForURL(postsUrl.admin)
|
||||||
|
await openNav(page)
|
||||||
|
const navControls = page.locator('#custom-css')
|
||||||
|
await expect(navControls).toHaveCSS('font-family', 'monospace')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe('list view', () => {
|
describe('list view', () => {
|
||||||
const tableRowLocator = 'table > tbody > tr'
|
const tableRowLocator = 'table > tbody > tr'
|
||||||
|
|
||||||
@@ -1182,15 +1192,6 @@ describe('admin', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('custom css', () => {
|
|
||||||
test('should see custom css in admin UI', async () => {
|
|
||||||
await page.goto(postsUrl.admin)
|
|
||||||
await openNav(page)
|
|
||||||
const navControls = page.locator('#custom-css')
|
|
||||||
await expect(navControls).toHaveCSS('font-family', 'monospace')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
// TODO: Troubleshoot flaky suite
|
// TODO: Troubleshoot flaky suite
|
||||||
describe('sorting', () => {
|
describe('sorting', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
#custom-css {
|
|
||||||
font-family: monospace;
|
|
||||||
background-image: url('/placeholder.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-css::after {
|
|
||||||
content: 'custom-css';
|
|
||||||
}
|
|
||||||
@@ -103,7 +103,6 @@ export async function openNav(page: Page): Promise<void> {
|
|||||||
if (await page.locator('.template-default.template-default--nav-open').isVisible()) return
|
if (await page.locator('.template-default.template-default--nav-open').isVisible()) return
|
||||||
// playwright: get first element with .nav-toggler which is VISIBLE (not hidden), could be 2 elements with .nav-toggler on mobile and desktop but only one is visible
|
// playwright: get first element with .nav-toggler which is VISIBLE (not hidden), could be 2 elements with .nav-toggler on mobile and desktop but only one is visible
|
||||||
await page.locator('.nav-toggler >> visible=true').click()
|
await page.locator('.nav-toggler >> visible=true').click()
|
||||||
|
|
||||||
await expect(page.locator('.template-default.template-default--nav-open')).toBeVisible()
|
await expect(page.locator('.template-default.template-default--nav-open')).toBeVisible()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user