Skip to content

Commit

Permalink
addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
prklm10 committed Sep 25, 2023
1 parent 2431107 commit fa8919e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 42 deletions.
3 changes: 1 addition & 2 deletions packages/core/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ export const configSchema = {
default: false
},
enableLayout: {
type: 'boolean',
default: false
type: 'boolean'
},
domTransformation: {
type: 'string'
Expand Down
37 changes: 0 additions & 37 deletions packages/core/test/discovery.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1932,28 +1932,7 @@ describe('Discovery', () => {
});

describe('Enable Layout =>', () => {
beforeEach(() => {
// global defaults
percy.config.snapshot.enableLayout = false;
});

describe('cli-snapshot =>', () => {
it('disabled by default', async () => {
percy.loglevel('debug');

await percy.snapshot({
name: 'test snapshot',
url: 'http://localhost:8000',
domSnapshot: ''
});

await percy.idle();

expect(logger.stderr).toEqual(jasmine.arrayContaining([
'[percy:core:snapshot] - enableLayout: false'
]));
});

it('enable when enableLayout: true', async () => {
percy.config.snapshot.enableLayout = true;
percy.loglevel('debug');
Expand All @@ -1973,22 +1952,6 @@ describe('Discovery', () => {
});

describe('percySnapshot with cli-exec =>', () => {
it('disabled by default', async () => {
percy.loglevel('debug');

await percy.snapshot({
name: 'test snapshot',
url: 'http://localhost:8000',
domSnapshot: testDOM
});

await percy.idle();

expect(logger.stderr).toEqual(jasmine.arrayContaining([
'[percy:core:snapshot] - enableLayout: false'
]));
});

it('enable when enableLayout: true', async () => {
percy.config.snapshot.enableLayout = true;
percy.loglevel('debug');
Expand Down
3 changes: 1 addition & 2 deletions packages/core/test/percy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ describe('Percy', () => {
percyCSS: '',
enableJavaScript: false,
disableShadowDOM: false,
cliEnableJavaScript: true,
enableLayout: false
cliEnableJavaScript: true
});
});

Expand Down
1 change: 0 additions & 1 deletion packages/dom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const domSnapshot = await page.evaluate(() => PercyDOM.serialize(options))
- `enableJavaScript` — When true, does not serialize some DOM elements
- `domTransformation` — Function to transform the DOM after serialization
- `disableShadowDOM` — disable shadow DOM capturing, this option can be passed to `percySnapshot` its part of per-snapshot config.
- `enableLayout` - When true, It enables layout testing.

## Serialized Content

Expand Down

0 comments on commit fa8919e

Please sign in to comment.