Skip to content
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

Fix e2e tests by removing unecessary assertions & properly installing deps in api-fetch package #21780

Merged
merged 6 commits into from
Apr 22, 2020
Merged
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
8 changes: 4 additions & 4 deletions package-lock.json

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

5 changes: 5 additions & 0 deletions packages/api-fetch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 3.8.1 (2019-04-22)

- Added deprecation to `useApiFetch` hook.
- Added `@wordpress/deprecation` package to add deprecation notice to `useApiFetch` hook.

## 3.8.0 (2019-12-19)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/api-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"react-native": "src/index",
"dependencies": {
"@babel/runtime": "^7.9.2",
"@wordpress/deprecated": "^2.8.0",
"@wordpress/deprecated": "file:../deprecated",
"@wordpress/element": "file:../element",
"@wordpress/i18n": "file:../i18n",
"@wordpress/url": "file:../url"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,7 @@ describe( 'Multi-entity save flow', () => {
const enabledButton = await page.waitForSelector(
activeSaveSiteSelector
);
expect( console ).toHaveWarnedWith(
'useApiFetch is deprecated and will be removed from Gutenberg in version 8.1.0. Please use apiFetch instead.'
);

expect( enabledButton ).not.toBeNull();
} );

Expand Down
12 changes: 0 additions & 12 deletions packages/e2e-tests/specs/experiments/navigation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,6 @@ describe( 'Navigation', () => {
);
await createFromExistingButton.click();

expect( console ).toHaveWarnedWith(
'useApiFetch is deprecated and will be removed from Gutenberg in version 8.1.0. Please use apiFetch instead.'
);

// Snapshot should contain the mocked pages.
expect( await getEditedPostContent() ).toMatchSnapshot();
} );
Expand Down Expand Up @@ -239,10 +235,6 @@ describe( 'Navigation', () => {
type: 'entity',
} );

expect( console ).toHaveWarnedWith(
'useApiFetch is deprecated and will be removed from Gutenberg in version 8.1.0. Please use apiFetch instead.'
);

// Expect a Navigation Block with two Navigation Links in the snapshot.
expect( await getEditedPostContent() ).toMatchSnapshot();
} );
Expand Down Expand Up @@ -323,10 +315,6 @@ describe( 'Navigation', () => {

expect( isInLinkRichText ).toBe( true );

expect( console ).toHaveWarnedWith(
'useApiFetch is deprecated and will be removed from Gutenberg in version 8.1.0. Please use apiFetch instead.'
);

// Expect a Navigation Block with a link for "A really long page name that will not exist".
expect( await getEditedPostContent() ).toMatchSnapshot();
} );
Expand Down