Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! chore: upgrade react and re…
Browse files Browse the repository at this point in the history
…act-redux packages
  • Loading branch information
akurinnoy committed Nov 12, 2024
1 parent e027072 commit fc89379
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright (c) 2018-2024 Red Hat, Inc.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
*/

import React from 'react';

import { Props, State } from '@/pages/WorkspaceDetails/DevfileEditorTab';

export default class DevfileEditorTab extends React.PureComponent<Props, State> {
render(): React.ReactNode {
return <div>DevfileEditorTab</div>;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright (c) 2018-2024 Red Hat, Inc.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
*/

import React from 'react';

import { Props } from '@/pages/WorkspaceDetails/Header';

export default class Header extends React.PureComponent<Props> {
render(): React.ReactNode {
return <div>Header</div>;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
WorkspaceStatus,
} from '@/services/helpers/types';

type Props = {
export type Props = {
workspacesLink: string;
status: WorkspaceStatus | DevWorkspaceStatus | DeprecatedWorkspaceStatus;
workspaceName: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const mockOnSave = jest.fn();

jest.mock('@/pages/WorkspaceDetails/DevfileEditorTab');
jest.mock('@/pages/WorkspaceDetails/OverviewTab');
jest.mock('@/pages/WorkspaceDetails/Header');
jest.mock('@/components/WorkspaceLogs');
jest.mock('@/components/WorkspaceEvents');

Expand Down Expand Up @@ -98,32 +99,6 @@ describe('Workspace Details page', () => {
});
});

describe('Old workspace link', () => {
it('should NOT show the link', () => {
const workspace = constructWorkspace(devWorkspaceBuilder.build());
renderComponent({
workspace,
});
expect(screen.queryByRole('link', { name: 'Show Original Devfile' })).toBeFalsy();
});

it('should show the link', () => {
const workspace = constructWorkspace(devWorkspaceBuilder.build());
const oldWorkspacePath: Location = {
key: 'old-workspace-key',
hash: '',
pathname: '/workspace/che-user/che-wksp',
search: '',
state: undefined,
};
renderComponent({
workspace,
oldWorkspaceLocation: oldWorkspacePath,
});
expect(screen.queryByRole('link', { name: 'Show Original Devfile' })).toBeTruthy();
});
});

it('should handle the onSave event', async () => {
const workspace = constructWorkspace(devWorkspaceBuilder.build());
renderComponent({
Expand Down

0 comments on commit fc89379

Please sign in to comment.