-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2672 from RedHatInsights/master
[stable] Update build
- Loading branch information
Showing
36 changed files
with
1,255 additions
and
1,187 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import React from 'react'; | ||
import AllServices from '../../../src/layouts/AllServices'; | ||
import { BrowserRouter } from 'react-router-dom'; | ||
import { IntlProvider } from 'react-intl'; | ||
import { Provider } from 'react-redux'; | ||
import { createStore } from 'redux'; | ||
import { ScalprumProvider } from '@scalprum/react-core'; | ||
import { getVisibilityFunctions, initializeVisibilityFunctions } from '../../../src/utils/VisibilitySingleton'; | ||
import userFixture from '../../fixtures/testUser.json'; | ||
import { ChromeUser } from '@redhat-cloud-services/types'; | ||
|
||
describe('<AllServices />', () => { | ||
beforeEach(() => { | ||
// mock chrome and scalprum generic requests | ||
cy.intercept('http://localhost:8080/api/chrome-service/v1/static/stable/stage/services/services.json', { | ||
status: 200, | ||
fixture: 'services.json', | ||
}); | ||
cy.intercept('http://localhost:8080/entry?cacheBuster=*', ''); | ||
cy.intercept('http://localhost:8080/foo/bar.json', { | ||
foo: { | ||
entry: ['/entry'], | ||
}, | ||
}); | ||
cy.intercept('http://localhost:8080/api/chrome-service/v1/static/stable/stage/navigation/settings-navigation.json?ts=*', { | ||
status: 200, | ||
fixture: 'settings-navigation.json', | ||
}); | ||
// cy.intercept('http://localhost:8080/api/chrome-service/v1/static/stable/stage/navigation/*-navigation.json?ts=*', { | ||
// data: [], | ||
// }); | ||
}); | ||
|
||
it('should filter by service category title', () => { | ||
initializeVisibilityFunctions({ | ||
getToken: () => Promise.resolve(''), | ||
getUser: () => Promise.resolve(userFixture as unknown as ChromeUser), | ||
getUserPermissions: () => Promise.resolve([]), | ||
}); | ||
const visibilityFunctions = getVisibilityFunctions(); | ||
const store = createStore(() => ({ | ||
chrome: { | ||
moduleRoutes: [ | ||
{ | ||
path: '/test/link', | ||
scope: 'foo', | ||
module: 'bar', | ||
}, | ||
], | ||
}, | ||
})); | ||
cy.mount( | ||
<ScalprumProvider | ||
config={{}} | ||
api={{ | ||
chrome: { | ||
visibilityFunctions, | ||
}, | ||
}} | ||
> | ||
<BrowserRouter> | ||
<Provider store={store}> | ||
<IntlProvider locale="en"> | ||
<AllServices /> | ||
</IntlProvider> | ||
</Provider> | ||
</BrowserRouter> | ||
</ScalprumProvider> | ||
); | ||
|
||
cy.get('.pf-v5-c-text-input-group__text-input').type('consoleset'); | ||
cy.contains('Console Settings').should('exist'); | ||
}); | ||
}); |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.