Skip to content

Commit

Permalink
chore(RHIF-222) Update /beta to /preview (#1826)
Browse files Browse the repository at this point in the history
To test, you can run via /beta or /preview. We previously had issues with the local app being served. To ensure that it is properly being served, run the app via beta and make a change in the code or add a console log and ensure that you're getting local changes.

Co-authored-by: Michael Johnson <[email protected]>
Co-authored-by: Adonis Puente <[email protected]>
  • Loading branch information
3 people authored Apr 20, 2023
1 parent e299426 commit 528d761
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ There is a [comprehensive quick start guide in the Storybook Documentation](http
## Running locally
1. Install dependencies with `npm install`
2. Run development server with `npm run start:proxy:beta`
3. Local version of the app will be available at https://stage.foo.redhat.com:1337/beta/insights/inventory/
3. Local version of the app will be available at https://stage.foo.redhat.com:1337/preview/insights/inventory/

## Running with another app

Expand Down
2 changes: 1 addition & 1 deletion config/dev.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { config: webpackConfig, plugins } = config({
env: `${process.env.ENVIRONMENT || 'stage'}-${
process.env.BETA ? 'beta' : 'stable'
}`, // for accessing prod-beta start your app with ENVIRONMENT=prod and BETA=true
appUrl: process.env.BETA ? '/beta/insights/inventory' : '/insights/inventory',
appUrl: process.env.BETA ? ['/beta/insights/inventory', '/preview/insights/inventory'] : '/insights/inventory',
routes: {
...(process.env.CONFIG_PORT && {
[`${process.env.BETA ? '/beta' : ''}/config`]: {
Expand Down
4 changes: 2 additions & 2 deletions config/spandx.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ module.exports = {
...acc,
[`/apps/${appName}`]: { host: `${protocol}://localhost:${appPort}` },
[`/insights/${appName}`]: { host: `${protocol}://localhost:${appPort}` },
[`/beta/insights/${appName}`]: { host: `${protocol}://localhost:${appPort}` },
[`/beta/apps/${appName}`]: { host: `${protocol}://localhost:${appPort}` }
[`/preview/insights/${appName}`]: { host: `${protocol}://localhost:${appPort}` },
[`/preview/apps/${appName}`]: { host: `${protocol}://localhost:${appPort}` }
};
}, {})
}
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@patternfly/react-table": "^4.111.45",
"@redhat-cloud-services/frontend-components": "^3.9.33",
"@redhat-cloud-services/frontend-components-notifications": "^3.2.12",
"@redhat-cloud-services/frontend-components-utilities": "^3.3.13",
"@redhat-cloud-services/frontend-components-utilities": "^3.5.0",
"@redhat-cloud-services/host-inventory-client": "1.0.116",
"@unleash/proxy-client-react": "^3.5.0",
"awesome-debounce-promise": "^2.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/InventoryGroupDetail/GroupDetailInfo.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('group detail information page', () => {

it('in beta environment', () => {
mountPage({ chrome: { isBeta: () => true } });
cy.get('a').should('have.attr', 'href', '/beta/iam/user-access');
cy.get('a').should('have.attr', 'href', '/preview/iam/user-access');
});
});
});
2 changes: 1 addition & 1 deletion src/components/InventoryGroupDetail/GroupDetailInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import PropTypes from 'prop-types';
import ChromeLoader from '../../Utilities/ChromeLoader';

const GroupDetailInfo = ({ chrome }) => {
const path = `${chrome.isBeta() ? '/beta' : ''}/iam/user-access`;
const path = `${chrome.isBeta() ? '/preview' : ''}/iam/user-access`;

return (
<Card>
Expand Down

0 comments on commit 528d761

Please sign in to comment.