mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
[Codemod] Rename react unsafe lifecycles (#8143)
* [Codemod] Rename react unsafe lifecycles * Fix lint errors * [Codemod] Rename react unsafe lifecycles * Fix lint errors
This commit is contained in:
@@ -160,7 +160,7 @@ describe('Dashboard', () => {
|
||||
it('should call addSliceToDashboard if a new slice is added to the layout', () => {
|
||||
const wrapper = setup();
|
||||
const spy = sinon.spy(props.actions, 'addSliceToDashboard');
|
||||
wrapper.instance().componentWillReceiveProps({
|
||||
wrapper.instance().UNSAFE_componentWillReceiveProps({
|
||||
...props,
|
||||
layout: layoutWithExtraChart,
|
||||
});
|
||||
@@ -174,7 +174,7 @@ describe('Dashboard', () => {
|
||||
const nextLayout = { ...layoutWithExtraChart };
|
||||
delete nextLayout[1001];
|
||||
|
||||
wrapper.instance().componentWillReceiveProps({
|
||||
wrapper.instance().UNSAFE_componentWillReceiveProps({
|
||||
...props,
|
||||
layout: nextLayout,
|
||||
});
|
||||
|
||||
@@ -109,7 +109,7 @@ describe('SliceAdder', () => {
|
||||
});
|
||||
|
||||
it('fetch slices should update state', () => {
|
||||
wrapper.instance().componentWillReceiveProps({
|
||||
wrapper.instance().UNSAFE_componentWillReceiveProps({
|
||||
...props,
|
||||
lastUpdated: new Date().getTime(),
|
||||
});
|
||||
@@ -122,7 +122,7 @@ describe('SliceAdder', () => {
|
||||
});
|
||||
|
||||
it('select slices should update state', () => {
|
||||
wrapper.instance().componentWillReceiveProps({
|
||||
wrapper.instance().UNSAFE_componentWillReceiveProps({
|
||||
...props,
|
||||
selectedSliceIds: [127],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user