Skip to content

Commit

Permalink
Merge branch 'master' into fav_empty_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
epwinchell authored Jul 8, 2024
2 parents 141917f + 7a19bed commit 7f38a99
Show file tree
Hide file tree
Showing 12 changed files with 1,494 additions and 45 deletions.
25 changes: 19 additions & 6 deletions cypress/component/NotificationDrawer/NotificationDrawer.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ const notificationDrawerData: NotificationData[] = [
read: false,
created: new Date().toString(),
description: 'This is a test notification',
source: 'openshift',
bundle: 'rhel',
source: 'rhel',
bundle: 'openshift',
},
{
id: '2',
title: 'Notification 2',
read: false,
created: new Date().toString(),
description: 'This is a test notification',
source: 'console',
bundle: 'rhel',
source: 'rhel',
bundle: 'console',
},
{
id: '3',
title: 'Notification 3',
read: false,
created: new Date().toString(),
description: 'This is a test notification',
source: 'console',
bundle: 'rhel',
source: 'rhel',
bundle: 'console',
},
];

Expand Down Expand Up @@ -138,6 +138,19 @@ describe('Notification Drawer', () => {
});

it('should select console filter', () => {
cy.intercept('GET', 'http://localhost:8080/api/notifications/v1/notifications/facets/bundles', {
statusCode: 200,
body: [
{
name: 'console',
displayName: 'Console',
},
{
name: 'openshift',
displayName: 'OpenShift',
},
],
});
cy.mount(<DrawerLayout />);
cy.get('#populate-notifications').click();
cy.get('#drawer-toggle').click();
Expand Down
2 changes: 2 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,7 @@ module.exports = {
moduleNameMapper: {
'\\.(css|scss)$': 'identity-obj-proxy',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/src/__mocks__/fileMock.js',
'react-markdown': '<rootDir>/src/__mocks__/empty-mock.js',
'remark-gfm': '<rootDir>/src/__mocks__/empty-mock.js',
},
};
Loading

0 comments on commit 7f38a99

Please sign in to comment.