Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions packages/devextreme-cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 13 additions & 29 deletions packages/devextreme-cli/testing/app-template.test.shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,16 @@ module.exports = (env, { port = 8080, urls = {} } = {}) => {
await page.waitForTimeout(500);
}

const customConfig = { threshold: 0.012 };
const customConfig = {
threshold: 0.3,
thresholdType: 'percent',
failureThreshold: 0.02,
failureThresholdType: 'percent',
customDiffConfig: {
includeAA: false,
threshold: 0.05,
}
};

function compareSnapshot(image, name, overrideConfig = {}) {
expect(image).toMatchImageSnapshot({
Expand Down Expand Up @@ -125,31 +134,7 @@ module.exports = (env, { port = 8080, urls = {} } = {}) => {
await page.waitForTimeout(3000);
}

// TODO: The footer text is antialiased differently in Angular and React,
// so we are hiding the footer before taking screenshots to prevent
// false failures. Moving forward, we need to investigate the cause
// of this effect.
async function hideFooter() {
await page.evaluate(() => {
/* eslint-disable no-undef */
const footer = document.getElementsByTagName('app-footer')[0]
|| document.getElementsByTagName('footer')[0];

if(footer) {
footer.style = {
...(footer.style || {}),
transition: 'none',
display: 'none'
};
footer.className += ' dx-state-invisible';
}
/* eslint-enable no-undef */
});
await page.waitForTimeout(3000);
}

async function takeScreenshot(options) {
await hideFooter();
return await page.screenshot({
...(options || {}),
captureBeyondViewport: false
Expand Down Expand Up @@ -189,10 +174,9 @@ module.exports = (env, { port = 8080, urls = {} } = {}) => {

compareSnapshot(image, 'profile');

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

await compareThemeModeSnapshot('profile', 'light');
});
Expand Down
Loading