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