-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #438 from bartoval/refactor_core_test_folder
Refactor core test folder
- Loading branch information
Showing
127 changed files
with
393 additions
and
425 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...onents/ResourceIcon/ResourceIcon.spec.tsx → src/__tests__/core/ResourceIcon.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
...ckeyChart/__tests__/SankeyFIlter.spec.tsx → src/__tests__/core/SKSankeyFIlter.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...onents/SkBreadcrumb/SkBreadcrumb.spec.tsx → src/__tests__/core/SkBreadcrumb.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 7 additions & 9 deletions
16
...e/components/EmptyData/EmptyData.spec.tsx → src/__tests__/core/SkEmptyData.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,28 @@ | ||
import { render, screen } from '@testing-library/react'; | ||
|
||
import { EmptyDataLabels } from './EmptyData.enum'; | ||
import SKEmptyData, { SkEmptyDataLabels } from '@core/components/SkEmptyData'; | ||
|
||
import EmptyData from './index'; | ||
|
||
describe('EmptyData component', () => { | ||
describe('SkEmptyData', () => { | ||
it('should render with default message', () => { | ||
render(<EmptyData />); | ||
expect(screen.getByText(EmptyDataLabels.Default)).toBeInTheDocument(); | ||
render(<SKEmptyData />); | ||
expect(screen.getByText(SkEmptyDataLabels.Default)).toBeInTheDocument(); | ||
}); | ||
|
||
it('should render with custom message', () => { | ||
render(<EmptyData message="Custom Message" />); | ||
render(<SKEmptyData message="Custom Message" />); | ||
expect(screen.getByText('Custom Message')).toBeInTheDocument(); | ||
}); | ||
|
||
it('should render with description', () => { | ||
render(<EmptyData description="This is a description" />); | ||
render(<SKEmptyData description="This is a description" />); | ||
expect(screen.getByText('This is a description')).toBeInTheDocument(); | ||
}); | ||
|
||
it('should render with custom icon', () => { | ||
const CustomIcon = function () { | ||
return <div>Custom Icon</div>; | ||
}; | ||
render(<EmptyData icon={CustomIcon} />); | ||
render(<SKEmptyData icon={CustomIcon} />); | ||
expect(screen.getByText('Custom Icon')).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 7 additions & 8 deletions
15
...ents/LinkCell/__tests__/LinkCell.spec.tsx → src/__tests__/core/SkLinkCell.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
...keyChart/__tests__/SkSankeyChart.spec.tsx → src/__tests__/core/SkSankeyChart.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
...Filter/services/__tests__/service.spec.ts → ...sts__/core/SkSearchFilter-service.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...hFilter/__tests__/SkSerachFilter.spec.tsx → src/__tests__/core/SkSearchFilter.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...ton/__tests__/SkUpdateDataButton.spec.tsx → ..._tests__/core/SkUpdateDataButton.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ilsCell/__tests__/ViewDetailCell.spec.tsx → src/__tests__/core/SkViewDetailCell.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/core/utils/convertToPercentage.spec.ts → ...__/core/utils/convertToPercentage.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...re/utils/deepMergeWithJSONObjects.spec.ts → ...re/utils/deepMergeWithJSONObjects.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/core/utils/formatBytes.spec.ts → src/__tests__/core/utils/formatBytes.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.