pinafore/tests/spec/020-themes.js
Nolan Lawson e4d2934c67
fix themes (#199)
Fixes #194
2018-04-21 00:33:42 -07:00

21 lines
650 B
JavaScript

import {
settingsNavButton
} from '../utils'
import { foobarRole } from '../roles'
import { Selector as $ } from 'testcafe'
fixture`020-themes.js`
.page`http://localhost:4002`
test('can set a theme', async t => {
await t.useRole(foobarRole)
.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('')
})