mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 12:08:01 +00:00
feat: Sets up portal public views with rails ERB and tailwind (#5309)
* feat: Sets up portal public views with rails ERB and tailwind * linter fixes * Remove duplicate style file * Shows articles and categories * Specify layout for articles page * Updates public portal styles * Fixes blog content styles * Portal style updates for article page * Review fixes * Adds breadcrumbs * fix: rspec * fix: public portal spec * Code climate fixes * Adds test cases for missing files * Show only published articles * Updates help center routes * Review fixes * Render markdown content for aticle body * Update app/views/public/api/v1/portals/articles/index.html.erb Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: Sojan <sojan@pepalo.com> Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: tejaswini chile <tejaswini@chatwoot.com>
This commit is contained in:
committed by
GitHub
parent
a680b08251
commit
1ea289e8b7
23
app/javascript/portal/specs/portal.spec.js
Normal file
23
app/javascript/portal/specs/portal.spec.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import { navigateToLocalePage } from '../portalHelpers';
|
||||
|
||||
describe('#navigateToLocalePage', () => {
|
||||
it('returns correct cookie name', () => {
|
||||
const elemDiv = document.createElement('div');
|
||||
elemDiv.classList.add('locale-switcher');
|
||||
document.body.appendChild(elemDiv);
|
||||
|
||||
const allLocaleSwitcher = document.querySelector('.locale-switcher');
|
||||
|
||||
allLocaleSwitcher.addEventListener = jest
|
||||
.fn()
|
||||
.mockImplementationOnce((event, callback) => {
|
||||
callback({ target: { value: 1 } });
|
||||
});
|
||||
|
||||
navigateToLocalePage();
|
||||
expect(allLocaleSwitcher.addEventListener).toBeCalledWith(
|
||||
'change',
|
||||
expect.any(Function)
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user