Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lakshz committed Dec 3, 2023
1 parent 8718486 commit 257c94c
Showing 1 changed file with 0 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,37 +267,4 @@ describe('Testing OrganizationNavbar Component [User Portal]', () => {

localStorage.removeItem('talawaPlugins');
});

test('Component should be rendered properly if plugins without view are present in localStorage', async () => {
const testPlugins = [
{
pluginName: 'TestPlugin1',
alias: 'testPlugin1',
link: '/testPlugin1',
translated: 'Test Plugin 1',
view: false,
},
];
localStorage.setItem('talawaPlugins', JSON.stringify(testPlugins));

render(
<MockedProvider addTypename={false} link={link}>
<BrowserRouter>
<Provider store={store}>
<I18nextProvider i18n={i18nForTest}>
<OrganizationNavbar {...navbarProps} />
</I18nextProvider>
</Provider>
</BrowserRouter>
</MockedProvider>
);

await wait();

testPlugins.forEach((plugin) => {
expect(screen.getByText(plugin.translated)).not.toBeInTheDocument();
});

localStorage.removeItem('talawaPlugins');
});
});

0 comments on commit 257c94c

Please sign in to comment.