-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: updated tests and stories with new context provider
- Loading branch information
Showing
11 changed files
with
829 additions
and
56 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { render } from '@testing-library/react'; | ||
import Memori from '../MemoriWidget/MemoriWidget'; | ||
import { integration, memori, tenant } from '../../mocks/data'; | ||
import I18nWrapper from '../../I18nWrapper'; | ||
import { VisemeProvider } from '../../context/visemeContext'; | ||
Object.defineProperty(window, 'matchMedia', { | ||
writable: true, | ||
value: jest.fn().mockImplementation(query => ({ | ||
matches: false, | ||
media: query, | ||
onchange: null, | ||
addListener: jest.fn(), // Deprecated | ||
removeListener: jest.fn(), // Deprecated | ||
addEventListener: jest.fn(), | ||
removeEventListener: jest.fn(), | ||
dispatchEvent: jest.fn(), | ||
})), | ||
}); | ||
|
||
it('renders HIDDEN_CHAT layout unchanged', () => { | ||
const { container } = render( | ||
<I18nWrapper> | ||
<VisemeProvider> | ||
<Memori | ||
showShare={true} | ||
showSettings={true} | ||
memori={memori} | ||
tenant={tenant} | ||
tenantID="aisuru.com" | ||
integration={integration} | ||
layout="HIDDEN_CHAT" | ||
/> | ||
</VisemeProvider> | ||
</I18nWrapper> | ||
); | ||
expect(container).toMatchSnapshot(); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { render } from '@testing-library/react'; | ||
import Memori from '../MemoriWidget/MemoriWidget'; | ||
import { integration, memori, tenant } from '../../mocks/data'; | ||
import I18nWrapper from '../../I18nWrapper'; | ||
import { VisemeProvider } from '../../context/visemeContext'; | ||
Object.defineProperty(window, 'matchMedia', { | ||
writable: true, | ||
value: jest.fn().mockImplementation(query => ({ | ||
matches: false, | ||
media: query, | ||
onchange: null, | ||
addListener: jest.fn(), // Deprecated | ||
removeListener: jest.fn(), // Deprecated | ||
addEventListener: jest.fn(), | ||
removeEventListener: jest.fn(), | ||
dispatchEvent: jest.fn(), | ||
})), | ||
}); | ||
|
||
it('renders ZOOMED_FULL_BODY layout unchanged', () => { | ||
const { container } = render( | ||
<I18nWrapper> | ||
<VisemeProvider> | ||
<Memori | ||
showShare={true} | ||
showSettings={true} | ||
memori={memori} | ||
tenant={tenant} | ||
tenantID="aisuru.com" | ||
integration={integration} | ||
layout="ZOOMED_FULL_BODY" | ||
/> | ||
</VisemeProvider> | ||
</I18nWrapper> | ||
); | ||
expect(container).toMatchSnapshot(); | ||
}); |
Oops, something went wrong.