-
-
Save weaverryan/64cae3f603529641dcad781eeb0cdcd9 to your computer and use it in GitHub Desktop.
Functional test Encore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it.only('Vue.js is compiled correctly', (done) => { | |
const appDir = testSetup.createTestAppDir(); | |
const config = testSetup.createWebpackConfig(appDir, 'www/build', 'dev'); | |
config.setPublicPath('/build'); | |
config.addEntry('main', './vuejs/main'); | |
config.enableVueJsLoader(); | |
testSetup.runWebpack(config, (webpackAssert) => { | |
expect(config.outputPath).to.be.a.directory().with.deep.files([ | |
'main.js', | |
'main.css', | |
'images/logo.png', | |
'manifest.json' | |
]); | |
testSetup.requestTestPage( | |
path.join(config.getContext(), 'www'), | |
[ | |
'build/main.js' | |
], | |
(browser) => { | |
// assert that the vue.js app rendered | |
browser.assert.text('#app h1', 'Welcome to Your Vue.js App'); | |
// make sure the styles are not inlined | |
browser.assert.elements('style', 0); | |
done(); | |
} | |
); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment