2018-04-21 07:33:42 +00:00
|
|
|
import {
|
2018-06-07 22:26:21 +00:00
|
|
|
getBodyClassList,
|
2018-04-21 07:33:42 +00:00
|
|
|
settingsNavButton
|
|
|
|
} from '../utils'
|
2018-05-26 20:51:41 +00:00
|
|
|
import { loginAsFoobar } from '../roles'
|
2018-04-21 07:33:42 +00:00
|
|
|
import { Selector as $ } from 'testcafe'
|
|
|
|
|
|
|
|
fixture`020-themes.js`
|
|
|
|
.page`http://localhost:4002`
|
|
|
|
|
|
|
|
test('can set a theme', async t => {
|
2018-05-26 20:51:41 +00:00
|
|
|
await loginAsFoobar(t)
|
|
|
|
await t
|
2018-04-21 07:33:42 +00:00
|
|
|
.click(settingsNavButton)
|
|
|
|
.click($('a[href="/settings/instances"]'))
|
|
|
|
.click($('a[href="/settings/instances/localhost:3000"]'))
|
2018-06-07 22:26:21 +00:00
|
|
|
.expect(getBodyClassList()).eql([])
|
2018-04-21 07:33:42 +00:00
|
|
|
.click($('input[value="scarlet"]'))
|
2018-06-07 22:26:21 +00:00
|
|
|
.expect(getBodyClassList()).eql(['theme-scarlet'])
|
2018-04-21 07:33:42 +00:00
|
|
|
.click($('input[value="default"]'))
|
2018-06-07 22:26:21 +00:00
|
|
|
.expect(getBodyClassList()).eql([])
|
2018-04-21 07:33:42 +00:00
|
|
|
})
|