Skip to content

Test cases scheduler UI #95

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

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
26274cb
refactor jv-scheduler: add test cases
anthomba-tibco Oct 29, 2024
ce98476
refactor jv-scheduler: add test cases
anthomba-tibco Oct 30, 2024
71a8419
refactor jv-scheduler : add test cases for scheduleValidator file
anthomba-tibco Nov 18, 2024
2b6e88e
refactor jv-scheduler : add test cases for scheduleValidator file
anthomba-tibco Nov 21, 2024
f68d5b1
refactor jv-scheduler : add test cases for actions file
anthomba-tibco Nov 26, 2024
5506ce1
refactor jv-scheduler : add test cases
anthomba-tibco Nov 27, 2024
68ec44c
refactor jv-scheduler : add test cases
anthomba-tibco Nov 27, 2024
acc39ca
refactor jv-scheduler : add test cases
anthomba-tibco Nov 27, 2024
e4f1abc
refactor jv-scheduler : add test cases
anthomba-tibco Nov 28, 2024
3b64f01
Merge remote-tracking branch 'origin/main' into test-cases-scheduler-ui
anthomba-tibco Nov 28, 2024
493216a
refactor jv-scheduler : add test cases
anthomba-tibco Dec 2, 2024
e8f6f2c
refactor jv-scheduler : add test cases
anthomba-tibco Dec 2, 2024
cfd4864
refactor jv-scheduler : add test cases
anthomba-tibco Dec 2, 2024
1f698c5
refactor jv-scheduler : add test cases
anthomba-tibco Dec 2, 2024
85578b7
refactor jv-scheduler : add test cases
anthomba-tibco Dec 2, 2024
a68ead7
refactor jv-scheduler : add test cases
anthomba-tibco Dec 2, 2024
063e967
refactor jv-scheduler : add test cases
anthomba-tibco Dec 2, 2024
067ebb8
refactor jv-scheduler : add test cases
anthomba-tibco Dec 3, 2024
3815778
refactor jv-scheduler : add test cases
anthomba-tibco Dec 3, 2024
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
5 changes: 1 addition & 4 deletions packages/jv-scheduler/jest.config.ts
Original file line number Diff line number Diff line change
@@ -5,10 +5,7 @@ const conf: Config = {
watchPathIgnorePatterns: ["node_modules", "dist", "coverage", "build"],
testEnvironment: "jsdom",
transform: {
"^.+\\.([tj]s|[tj]sx)$": "ts-jest",
},
moduleNameMapper: {
"\\.(css|less)$": "<rootDir>/styleMock.js",
"^.+\\.tsx?$": "ts-jest",
},
};

5 changes: 4 additions & 1 deletion packages/jv-scheduler/package.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,8 @@
"scripts": {
"audit:all": "yarn audit",
"audit:runtime": "yarn audit --groups dependencies",
"test": "jest",
"test": "jest -- action.test.ts",
"coverage": "jest --coverage -- action.test.ts",
"build": "vite build",
"clean": "rm -rf ./dist"
},
@@ -44,6 +45,7 @@
"@testing-library/react": "^13.3.0",
"@types/jest": "^28.1.6",
"@types/react": "^18.0.15",
"@types/redux-mock-store": "^1.5.0",
"@types/xregexp": "^4.4.0",
"@vitejs/plugin-react": "^4.3.1",
"i18next": "^23.11.5",
@@ -54,6 +56,7 @@
"jest-css-modules-transform": "^4.4.2",
"jest-environment-jsdom": "^29.7.0",
"path": "^0.12.7",
"redux-mock-store": "^1.5.5",
"ts-jest": "^29.1.5",
"ts-node": "^10.9.2",
"typescript": "^4.7.4",
Original file line number Diff line number Diff line change
@@ -109,7 +109,7 @@ export const OutputStepDefaultMessage = () => {
),
timezones = useSelector((state: IState) => state.userTimeZones);

const currentTimezone = timezones.filter(
const currentTimezone = timezones?.filter(
(item: { code: string }) => item.code === outputTimezone,
),
OutputTimeZone = `${currentTimezone[0]?.code} - ${currentTimezone[0]?.description}`;
14 changes: 12 additions & 2 deletions packages/jv-scheduler/src/components/Stepper/StepIcon.tsx
Original file line number Diff line number Diff line change
@@ -19,46 +19,56 @@ type CommonIconProps = {
dataName: string;
};

const CommonIcon = ({ icon, className, dataName }: CommonIconProps) => {
const CommonIcon = ({
icon,
className,
dataName,
...rest
}: CommonIconProps) => {
return (
<JVIcon
icon={icon}
className={`jv-mStepper-icon ${className}`}
data-name={dataName}
{...rest}
/>
);
};

export const StepIcon = (props: any) => {
const { icon } = props;
const { icon, ...rest } = props;
return (
<div>
{icon === SUCCESS_STATE && (
<CommonIcon
icon="checkmarkRound"
className="jv-uColor-success"
dataName=""
{...rest}
/>
)}
{icon === ERROR_STATE && (
<CommonIcon
icon="warningRound"
className="jv-uColor-error"
dataName=""
{...rest}
/>
)}
{icon === INCOMPLETE_DEFAULT_STATE && (
<CommonIcon
icon="checkmarkRound"
className="jv-uColor-incomplete"
dataName=""
{...rest}
/>
)}
{icon === INCOMPLETE_STATE && (
<CommonIcon
icon="circleSolid"
className="jv-uColor-incomplete"
dataName=""
{...rest}
/>
)}
</div>
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ import {
OUTPUT_TAB,
OUTPUT_TIME_ZONE,
} from "../../../constants/schedulerConstants";
import { MessageAPIError } from "../../apiFailureError/scheduleAPIError";
import { MessageAPIError } from "../../apiFailureError/MessageAPIError";
import { IState, translationProps } from "../../../types/scheduleType";
import { updateChangeToStore } from "../../../utils/schedulerUtils";
import i18nScheduler from "../../../i18n";
8 changes: 4 additions & 4 deletions packages/jv-scheduler/src/utils/configurationUtils.ts
Original file line number Diff line number Diff line change
@@ -36,20 +36,20 @@ const checkAvailabilityOfBasicConfig = (
contextPath: string,
) => {
const error: { [key: string]: string } = {};
if (!resourceURI) {
if (!resourceURI || resourceURI.length === 0) {
error["resource.uri.missing.configuration"] =
"resourceURI is required in the configuration";
} else if (!server) {
} else if (!server || server.length === 0) {
error["server.missing.configuration"] =
"server is required in the configuration";
} else if (!contextPath) {
} else if (!contextPath || contextPath.length === 0) {
error["contextPath.missing.configuration"] =
"contextPath is required in the configuration";
}
return error;
};

const checkRequiredDataForHiddenTabs = (tabName: string, tabData: any) => {
const checkRequiredDataForHiddenTabs = (tabName: string, tabData: any = {}) => {
const error: { [key: string]: string } = {};
switch (tabName) {
case SCHEDULE_TAB: {
Loading