Update testcafe to the latest version 🚀 (#370)
* chore(package): update testcafe to version 0.20.3 * package-lock update * make theme test pass
This commit is contained in:
parent
4d3161cc95
commit
708340502d
File diff suppressed because it is too large
Load Diff
|
@ -101,7 +101,7 @@
|
||||||
"eslint-plugin-html": "^4.0.3",
|
"eslint-plugin-html": "^4.0.3",
|
||||||
"now": "^11.2.1",
|
"now": "^11.2.1",
|
||||||
"standard": "^11.0.1",
|
"standard": "^11.0.1",
|
||||||
"testcafe": "0.19.1"
|
"testcafe": "0.20.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import {
|
import {
|
||||||
|
getBodyClassList,
|
||||||
settingsNavButton
|
settingsNavButton
|
||||||
} from '../utils'
|
} from '../utils'
|
||||||
import { loginAsFoobar } from '../roles'
|
import { loginAsFoobar } from '../roles'
|
||||||
|
@ -13,9 +14,9 @@ test('can set a theme', async t => {
|
||||||
.click(settingsNavButton)
|
.click(settingsNavButton)
|
||||||
.click($('a[href="/settings/instances"]'))
|
.click($('a[href="/settings/instances"]'))
|
||||||
.click($('a[href="/settings/instances/localhost:3000"]'))
|
.click($('a[href="/settings/instances/localhost:3000"]'))
|
||||||
.expect($('body').getAttribute('class')).eql(undefined)
|
.expect(getBodyClassList()).eql([])
|
||||||
.click($('input[value="scarlet"]'))
|
.click($('input[value="scarlet"]'))
|
||||||
.expect($('body').getAttribute('class')).eql('theme-scarlet')
|
.expect(getBodyClassList()).eql(['theme-scarlet'])
|
||||||
.click($('input[value="default"]'))
|
.click($('input[value="default"]'))
|
||||||
.expect($('body').getAttribute('class')).eql('')
|
.expect(getBodyClassList()).eql([])
|
||||||
})
|
})
|
||||||
|
|
|
@ -86,6 +86,8 @@ export const getComposeSelectionStart = exec(() => composeInput().selectionStart
|
||||||
dependencies: { composeInput }
|
dependencies: { composeInput }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
export const getBodyClassList = exec(() => Array.prototype.slice.apply(document.body.classList))
|
||||||
|
|
||||||
export const scrollContainerToTop = exec(() => {
|
export const scrollContainerToTop = exec(() => {
|
||||||
document.getElementsByClassName('container')[0].scrollTop = 0
|
document.getElementsByClassName('container')[0].scrollTop = 0
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue