Merge pull request #3937 from benjiwheeler/alert-text
use blue creating screen for new projects; revised alert text for copy/remix
This commit is contained in:
7 files changed
+145
-36
No files matched your search
@@ -107,8 +107,9 @@ test('related alerts can clear each other', () => {
|
||||
};
|
||||
const action = showStandardAlert('saveSuccess');
|
||||
const resultState = alertsReducer(initialState, action);
|
||||
expect(resultState.alertsList.length).toBe(1);
|
||||
expect(resultState.alertsList[0].alertId).toBe('saveSuccess');
|
||||
expect(resultState.alertsList.length).toBe(2);
|
||||
expect(resultState.alertsList[0].alertId).toBe('creating');
|
||||
expect(resultState.alertsList[1].alertId).toBe('saveSuccess');
|
||||
});
|
||||
|
||||
test('several related alerts can be cleared at once', () => {
|
||||
|
||||
@@ -178,7 +178,7 @@ describe('projectSaverHOC', () => {
|
||||
});
|
||||
|
||||
test('if we enter remixing state, vm project should be requested, and alert should show', () => {
|
||||
const mockedShowCreatingAlert = jest.fn();
|
||||
const mockedShowCreatingRemixAlert = jest.fn();
|
||||
const Component = () => <div />;
|
||||
const WrappedComponent = projectSaverHOC(Component);
|
||||
const mockedStoreProject = jest.fn(() => Promise.resolve());
|
||||
@@ -197,7 +197,7 @@ describe('projectSaverHOC', () => {
|
||||
reduxProjectId={'100'}
|
||||
store={store}
|
||||
vm={vm}
|
||||
onShowCreatingAlert={mockedShowCreatingAlert}
|
||||
onShowCreatingRemixAlert={mockedShowCreatingRemixAlert}
|
||||
/>
|
||||
);
|
||||
mounted.setProps({
|
||||
@@ -205,11 +205,11 @@ describe('projectSaverHOC', () => {
|
||||
loadingState: LoadingState.REMIXING
|
||||
});
|
||||
expect(mockedStoreProject).toHaveBeenCalled();
|
||||
expect(mockedShowCreatingAlert).toHaveBeenCalled();
|
||||
expect(mockedShowCreatingRemixAlert).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
test('if we enter creating copy state, vm project should be requested, and alert should show', () => {
|
||||
const mockedShowCreatingAlert = jest.fn();
|
||||
const mockedShowCreatingCopyAlert = jest.fn();
|
||||
const Component = () => <div />;
|
||||
const WrappedComponent = projectSaverHOC(Component);
|
||||
const mockedStoreProject = jest.fn(() => Promise.resolve());
|
||||
@@ -228,7 +228,7 @@ describe('projectSaverHOC', () => {
|
||||
reduxProjectId={'100'}
|
||||
store={store}
|
||||
vm={vm}
|
||||
onShowCreatingAlert={mockedShowCreatingAlert}
|
||||
onShowCreatingCopyAlert={mockedShowCreatingCopyAlert}
|
||||
/>
|
||||
);
|
||||
mounted.setProps({
|
||||
@@ -236,7 +236,7 @@ describe('projectSaverHOC', () => {
|
||||
loadingState: LoadingState.CREATING_COPY
|
||||
});
|
||||
expect(mockedStoreProject).toHaveBeenCalled();
|
||||
expect(mockedShowCreatingAlert).toHaveBeenCalled();
|
||||
expect(mockedShowCreatingCopyAlert).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
test('if we enter updating/saving state, vm project should be requested', () => {
|
||||
|
||||
Reference in new issue
Block a user