Skip to content

Commit 8a2f2a0

Browse files
Disable zoneless mode (#954)
* Add zoneless flag * Fix test using threshold * Fix test * Update image snapshot
1 parent 180b985 commit 8a2f2a0

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

packages/devextreme-cli/src/applications/application.angular.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const { extractToolingVersion, toolingVersionOptionName } = require('../utility/
1111
const schematicsVersion = latestVersions['devextreme-schematics'] || 'latest';
1212

1313
const minNgCliVersion = new semver('17.0.0');
14+
const ngCliWithZoneless = new semver('20.0.0');
1415

1516
async function runSchematicCommand(schematicCommand, options, evaluatingOptions) {
1617
const collectionName = 'devextreme-schematics';
@@ -76,6 +77,7 @@ const install = async(options) => {
7677

7778
const create = async(appName, options) => {
7879
const layout = await getLayoutInfo(options.layout);
80+
const currentNgVersion = ngVersion.getNgCliVersion().version;
7981

8082
const commandArguments = [
8183
'new',
@@ -88,6 +90,10 @@ const create = async(appName, options) => {
8890
'--ssr=false'
8991
];
9092

93+
if(ngCliWithZoneless.compare(currentNgVersion) <= 0) {
94+
commandArguments.push('--zoneless=false');
95+
}
96+
9197
await runNgCommand(commandArguments, options);
9298

9399
const appPath = path.join(process.cwd(), appName);
10 Bytes
Loading

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,11 @@ module.exports = (env) => {
278278
await page.waitForTimeout(3000);
279279
const image = await takeScreenshot();
280280

281-
compareSnapshot(image, 'create-account');
281+
compareSnapshot(image, 'create-account', {
282+
failureThreshold: 1,
283+
failureThresholdType: 'pixel',
284+
threshold: 0.1
285+
});
282286
});
283287

284288
it('Reset password page', async() => {

0 commit comments

Comments
 (0)