-
Notifications
You must be signed in to change notification settings - Fork 19
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
[To Feature ] DESENG-605 - Adding Unit test #2518
[To Feature ] DESENG-605 - Adding Unit test #2518
Conversation
…o DESENG-605-TenantBackend
…o DESENG-605-TenantBackend
…o DESENG-605-TenantBackend
…o DESENG-605-TenantBackend
…o DESENG-605-TenantBackend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work here! Looks good; approved
@@ -188,6 +188,8 @@ const config: Config.InitialOptions = { | |||
|
|||
// Whether to use watchman for file crawling | |||
// watchman: true, | |||
|
|||
testTimeout: 10000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were these tests timing out when running locally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sometimes old tests also timing out locally
); | ||
|
||
const loadingTexts = screen.getAllByText('Loading...'); | ||
expect(loadingTexts.length).toBeGreaterThan(0); // Adjust based on expected occurrences |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this left in intentionally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
expect(screen.getByText('Contact One')).toBeVisible(); | ||
expect(screen.getByText('contactone@example.com')).toBeVisible(); | ||
expect(screen.getByText('Photographer One')).toBeVisible(); | ||
expect(screen.getByText('Logo Description One')).toBeVisible(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate how thorough these tests are :)
import * as reactRouter from 'react-router'; | ||
import * as tenantService from 'services/tenantService'; | ||
import TenantDetail from '../../../../src/components/tenantManagement/Detail'; | ||
import { MemoryRouter, Route, Routes, useParams } from 'react-router-dom'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed this unused import :p
import { MemoryRouter, Route, Routes, useParams } from 'react-router-dom'; | |
import { MemoryRouter, Route, Routes} from 'react-router-dom'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
import * as reactRedux from 'react-redux'; | ||
import * as reactRouter from 'react-router'; | ||
import * as tenantService from 'services/tenantService'; | ||
import { draftEngagement } from '../factory'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is unused too 🙃
import { draftEngagement } from '../factory'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
Quality Gate passedIssues Measures |
* [To Feature Branch] - DESENG-605 - Tenant backend api (#2508) * DESENG-605: Tenant API and Unit test * DESENG-605 - Add Tenant - Frontend UI (#2510) * DESENG-605 - Tenant detail page (#2511) * DESENG-605: Tenant API and Unit test * DESENG-605: Tenant detail page * DESENG-606: Add tenant edit page (#2513) * DESENG-605: Delete tenant flow * DESENG-605 - Delete tenant functionality (#2515) * DESENG-605 - Adding Unit test (#2518) * DESENG-605: Tenant unit test for listing and detail * Multi tenancy - UX Pass 1 (#2519) * DESENG-605-606-unit-tests (#2522) * Frontend unit tests * Update changelog --------- Co-authored-by: Ratheesh kumar R <ratheesh.kumar@aot-technologies.com>
Issue #: https://apps.itsm.gov.bc.ca/jira/browse/DESENG-605
Description of changes:
Added unit test for Tenant listing and Tenant Detail page
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the met-public license (Apache 2.0).