-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: cypress directory common and utils test method
- Loading branch information
1 parent
b8bfcfa
commit 75f4799
Showing
20 changed files
with
57 additions
and
200 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { visitH5Demo, visitTaroDemo } from '../utils/visit-demo.js' | ||
import data from '../../../src/config.json' | ||
|
||
const { nav } = data | ||
export const checkH5Blank = () => { | ||
const componentArr = nav | ||
.map((i) => i.packages) | ||
.flat(Infinity) | ||
.filter((i) => i.show) | ||
.map((i) => i.name) | ||
|
||
it('check h5 demos blank', () => { | ||
componentArr.forEach((com) => { | ||
visitH5Demo(com) | ||
}) | ||
}) | ||
} | ||
export const checkTaroBlank = () => { | ||
it('check taro demos blank', () => { | ||
nav.forEach((item) => { | ||
const path = item.enName | ||
item.packages | ||
.filter((i) => i.show && i.taro && i.version === '3.0.0') | ||
.forEach((i) => { | ||
visitTaroDemo(path, i.name) | ||
}) | ||
}) | ||
}) | ||
} | ||
Cypress.on('uncaught:exception', (err, runnable) => { | ||
return false | ||
}) |
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import './base.cy' | ||
import './layout.cy' | ||
import './nav.cy' | ||
import './dentry.cy' | ||
import './bussiness.cy' | ||
import './exhibition.cy' | ||
import './feedback.cy' | ||
import { checkH5Blank } from '../common/pageWhiteTest.cy' | ||
|
||
// import './base.cy' | ||
// import './layout.cy' | ||
// import './nav.cy' | ||
// import './dentry.cy' | ||
// import './bussiness.cy' | ||
// import './exhibition.cy' | ||
// import './feedback.cy' | ||
|
||
checkH5Blank() // 全部组件demo的白屏测试 |
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,3 @@ | ||
import './base.cy' | ||
import './layout.cy' | ||
import './nav.cy' | ||
import './dentry.cy' | ||
import './bussiness.cy' | ||
import './exhibition.cy' | ||
import './feedback.cy' | ||
import { checkTaroBlank } from '../common/pageWhiteTest.cy' | ||
|
||
Cypress.on('uncaught:exception', (err, runnable) => { | ||
return false | ||
}) | ||
checkTaroBlank() // 全部组件demo的白屏测试 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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