Skip to content

Commit 06bf4a8

Browse files
committed
test threshhold
1 parent 6c1cd15 commit 06bf4a8

File tree

3 files changed

+1
-26
lines changed

3 files changed

+1
-26
lines changed
-622 Bytes
Loading

packages/devextreme-cli/testing/app-template.test.shared.js

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ module.exports = (env, { port = 8080, urls = {} } = {}) => {
8585
}
8686

8787
const customConfig = {
88-
threshold: 0.3,
88+
threshold: 0.012,
8989
thresholdType: 'percent',
9090
failureThreshold: 0.02,
9191
failureThresholdType: 'percent',
@@ -134,31 +134,7 @@ module.exports = (env, { port = 8080, urls = {} } = {}) => {
134134
await page.waitForTimeout(3000);
135135
}
136136

137-
// TODO: The footer text is antialiased differently in Angular and React,
138-
// so we are hiding the footer before taking screenshots to prevent
139-
// false failures. Moving forward, we need to investigate the cause
140-
// of this effect.
141-
// async function hideFooter() {
142-
// await page.evaluate(() => {
143-
// /* eslint-disable no-undef */
144-
// const footer = document.getElementsByTagName('app-footer')[0]
145-
// || document.getElementsByTagName('footer')[0];
146-
147-
// if(footer) {
148-
// footer.style = {
149-
// ...(footer.style || {}),
150-
// transition: 'none',
151-
// display: 'none'
152-
// };
153-
// footer.className += ' dx-state-invisible';
154-
// }
155-
// /* eslint-enable no-undef */
156-
// });
157-
// await page.waitForTimeout(3000);
158-
// }
159-
160137
async function takeScreenshot(options) {
161-
// await hideFooter();
162138
return await page.screenshot({
163139
...(options || {}),
164140
captureBeyondViewport: false
@@ -198,7 +174,6 @@ module.exports = (env, { port = 8080, urls = {} } = {}) => {
198174

199175
compareSnapshot(image, 'profile');
200176

201-
// TODO: fix false positive screenshot failure and uncomment
202177
await switchTheme();
203178
await compareThemeModeSnapshot('profile', 'dark');
204179
await switchTheme();

0 commit comments

Comments
 (0)