-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Remove invalid url's and id's from media fixtures #14625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove invalid url's and id's from media fixtures #14625
Conversation
4455244 to
17ac886
Compare
17ac886 to
2f2d3d6
Compare
| ) | ||
| ) | ||
| ); | ||
| const fileBasenames = getAvailableBlockFixturesBasenames(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about you update the failing test (https://travis-ci.com/WordPress/gutenberg/jobs/187619473#L1011):
Block transforms › should contain the expected transforms
to perform more relaxed check using toMatchObject:
expect(
transforms
). toMatchObject( EXPECTED_TRANSFORMS ); There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this locally and it seems to work:
it( 'example', () => {
const actual = {
core__gallery__columns: {
availableTransforms: [
'Slideshow',
'Image',
],
originalBlock: 'Gallery',
},
};
const expected = {
core__gallery__columns: {
availableTransforms: expect.arrayContaining( [
'Image',
] ),
originalBlock: 'Gallery',
},
};
expect( actual ).toMatchObject( expected );
} );2f2d3d6 to
1e39d49
Compare
… the generic transforms test.
1e39d49 to
dec1e40
Compare
gziolo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed it the other day. Now that it is rebased with the latest fix merged to allow us to skip tests when 3rd party plugins are installed, this should be good to go 👍
| const maybeDescribe = process.env.POPULAR_PLUGINS ? | ||
| describe : | ||
| describe.skip; | ||
| describe.skip : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha 🥇
This PR removes invalid URLs and ID's from the fixtures of media blocks making sure we can use these fixtures in the block transforms test case.
A temporary solution to not execute the transforms test cases for these blocks was removed.
Depends on: #14632
How has this been tested?
Verify the end 2 end tests pass.
Verify the fixture test cases pass
npm run test-unit test/integration/full-content/full-content.spec.js.