mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
73 lines
1.9 KiB
JavaScript
73 lines
1.9 KiB
JavaScript
|
|
||
|
import * as selenium from "./selenium"
|
||
|
import path from "path"
|
||
|
import Gemini from "gemini"
|
||
|
|
||
|
export default (gulp, config) => {
|
||
|
return done => {
|
||
|
selenium.start(() => {
|
||
|
// const file = require(
|
||
|
// path.resolve(process.cwd(),
|
||
|
// config.tests.regression.geminiConfigPath,
|
||
|
// ".gemini-local.json"
|
||
|
// ))
|
||
|
|
||
|
const configx = {
|
||
|
"rootUrl": "http://localhost:8000",
|
||
|
"gridUrl": "http://localhost:4444/wd/hub",
|
||
|
"screenshotsDir": "./tests/regression/baseline/local",
|
||
|
"browsers": {
|
||
|
"chrome": {
|
||
|
"desiredCapabilities": {
|
||
|
"browserName": "chrome"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"system": {
|
||
|
"projectRoot": "../../../",
|
||
|
"sourceRoot": "src/assets/stylesheets"
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// https://www.npmjs.com/package/gemini-sauce
|
||
|
|
||
|
console.log("running gemini...")
|
||
|
const gemini = new Gemini(configx)
|
||
|
|
||
|
gemini.test("tests/regression/styleguide.js", {
|
||
|
reporters: ["html"]
|
||
|
})
|
||
|
.then(() => {
|
||
|
console.log("success")
|
||
|
selenium.stop()
|
||
|
done()
|
||
|
}, err => {
|
||
|
console.log("fail")
|
||
|
selenium.stop()
|
||
|
throw err
|
||
|
})
|
||
|
})
|
||
|
// selenium.start(() => {
|
||
|
// const geminiConfig = require(
|
||
|
// path.resolve(
|
||
|
// process.cwd(),
|
||
|
// config.tests.regression.geminiConfigPath,
|
||
|
// ".gemini-local.json"
|
||
|
// ))
|
||
|
// geminiConfig.rootUrl = `http://127.0.0.1:${config.patternlabServer.port}`
|
||
|
//
|
||
|
// const gemini = new Gemini(geminiConfig)
|
||
|
// gemini.test(config.tests.regression.patternlabToGeminiOutput, {
|
||
|
// reporters: ["html"]
|
||
|
// })
|
||
|
// .then(() => {
|
||
|
// selenium.stop()
|
||
|
// done()
|
||
|
// }, err => {
|
||
|
// selenium.stop()
|
||
|
// throw err
|
||
|
// })
|
||
|
// })
|
||
|
}
|
||
|
}
|