Skip to content

Commit

Permalink
Merge pull request #4105 from dlabrecq/capitalization
Browse files Browse the repository at this point in the history
Fix component capitalization
  • Loading branch information
dlabrecq authored Nov 8, 2024
2 parents 223d8fc + 9be12cc commit 0f80441
Show file tree
Hide file tree
Showing 8 changed files with 297 additions and 290 deletions.
138 changes: 69 additions & 69 deletions locales/data.json

Large diffs are not rendered by default.

128 changes: 64 additions & 64 deletions locales/translations.json

Large diffs are not rendered by default.

266 changes: 133 additions & 133 deletions src/locales/messages.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/routes/components/page/noProviders/noProviders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const NoProviders = () => {
<div style={styles.headerDesc}>
{intl.formatMessage(messages.noProvidersDesc, {
ocp: <b>{intl.formatMessage(messages.ocp)}</b>,
aws: <b>{intl.formatMessage(messages.aws)}</b>,
aws: <b>{intl.formatMessage(messages.awsAlt)}</b>,
gcp: <b>{intl.formatMessage(messages.gcp)}</b>,
oci: <b>{intl.formatMessage(messages.oci)}</b>,
azure: <b>{intl.formatMessage(messages.azure)}</b>,
Expand Down
9 changes: 8 additions & 1 deletion src/routes/details/ocpDetails/ocpDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,14 @@ class OcpDetails extends React.Component<OcpDetailsProps, OcpDetailsState> {
);
}
}

const test = true;
if (test) {
return isProviderEmptyStateToggleEnabled ? (
<NoProviders />
) : (
<NoProvidersOld providerType={ProviderType.ocp} title={title} />
);
}
return (
<div style={styles.ocpDetails}>
<DetailsHeader
Expand Down
26 changes: 13 additions & 13 deletions src/routes/settings/costModels/components/addPriceList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ describe('add-a-new-rate', () => {
await user.type(screen.getByLabelText('Description'), 'regular rate test');

// select first option for metric
await user.click(screen.getByLabelText('Select Metric'));
await user.click(screen.getByLabelText('Select metric'));
options = await screen.findAllByRole('option');
await user.click(options[0]);

// select first option for measurement
await user.click(screen.getByLabelText('Select Measurement'));
await user.click(screen.getByLabelText('Select measurement'));
options = await screen.findAllByRole('option');
await user.click(options[3]); // Previous select options are not being removed from page

Expand All @@ -142,7 +142,7 @@ describe('add-a-new-rate', () => {
// selecting a different measurement does not reset cost type to default
await user.click(screen.getByLabelText(qr.supplradio));

await user.click(screen.getByLabelText('Select Measurement'));
await user.click(screen.getByLabelText('Select measurement'));
options = await screen.findAllByRole('option');
await user.click(options[1]);

Expand All @@ -151,13 +151,13 @@ describe('add-a-new-rate', () => {
// selecting metric will reset both measurement and cost type
await user.click(screen.getByLabelText(qr.infraradio));

await user.click(screen.getByLabelText('Select Metric'));
await user.click(screen.getByLabelText('Select metric'));
options = await screen.findAllByRole('option');
await user.click(options[1]);

expect(screen.getByText(regExp(messages.costModelsRequiredField))).not.toBeNull();

await user.click(screen.getByLabelText('Select Measurement'));
await user.click(screen.getByLabelText('Select measurement'));
options = await screen.findAllByRole('option');
await user.click(options[3]); // Previous select options are not being removed from page

Expand Down Expand Up @@ -198,11 +198,11 @@ describe('add-a-new-rate', () => {

await user.type(screen.getByLabelText('Description'), 'tag rate test');

await user.click(screen.getByLabelText('Select Metric'));
await user.click(screen.getByLabelText('Select metric'));
options = await screen.findAllByRole('option');
await user.click(options[0]);

await user.click(screen.getByLabelText('Select Measurement'));
await user.click(screen.getByLabelText('Select measurement'));
options = await screen.findAllByRole('option');
await user.click(options[3]); // Previous select options are not being removed from page

Expand Down Expand Up @@ -269,11 +269,11 @@ describe('add-a-new-rate', () => {

render(<RenderFormDataUI submit={submit} cancel={cancel} />);

await user.click(screen.getByLabelText('Select Metric'));
await user.click(screen.getByLabelText('Select metric'));
options = await screen.findAllByRole('option');
await user.click(options[1]);

await user.click(screen.getByLabelText('Select Measurement'));
await user.click(screen.getByLabelText('Select measurement'));
options = await screen.findAllByRole('option');
await user.click(options[3]); // Previous select options are not being removed from page

Expand All @@ -291,13 +291,13 @@ describe('add-a-new-rate', () => {
await user.type(tagKeyInput, '{backspace}');
expect(screen.getByText(regExp(messages.priceListDuplicate))).not.toBeNull();

await user.click(screen.getByLabelText('Select Measurement'));
await user.click(screen.getByLabelText('Select measurement'));
options = await screen.findAllByRole('option');
await user.click(options[1]);

expect(screen.queryByText(regExp(messages.priceListDuplicate))).toBeNull();

await user.click(screen.getByLabelText('Select Measurement'));
await user.click(screen.getByLabelText('Select measurement'));
options = await screen.findAllByRole('option');
await user.click(options[3]);

Expand All @@ -312,11 +312,11 @@ describe('add-a-new-rate', () => {

await render(<RenderFormDataUI submit={submit} cancel={cancel} />);

await user.click(screen.getByLabelText('Select Metric'));
await user.click(screen.getByLabelText('Select metric'));
options = await screen.findAllByRole('option');
await user.click(options[2]);

await user.click(screen.getByLabelText('Select Measurement'));
await user.click(screen.getByLabelText('Select measurement'));
options = await screen.findAllByRole('option');
await user.click(options[0]);
expect(screen.queryAllByLabelText(regExp(messages.costModelsEnterTagRate))).toHaveLength(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,41 +283,41 @@ describe('update-rate', () => {
expect(saveButton.getAttribute('disabled')).not.toBeNull();
});

test('Select Measurement', async () => {
test('Select measurement', async () => {
const user = userEvent.setup({ advanceTimers: jest.advanceTimersByTime });
let options = null;

render(<RenderFormDataUI index={0} />);

const saveButton = screen.getByText(regExp(messages.save));

await user.click(screen.getByLabelText('Select Measurement'));
await user.click(screen.getByLabelText('Select measurement'));
options = await screen.findAllByRole('option');
await user.click(options[1]);

expect(saveButton.getAttribute('disabled')).toBeNull();

await user.click(screen.getByLabelText('Select Measurement'));
await user.click(screen.getByLabelText('Select measurement'));
options = await screen.findAllByRole('option');
await user.click(options[0]);

expect(saveButton.getAttribute('disabled')).not.toBeNull();

await user.click(screen.getByLabelText('Select Metric'));
await user.click(screen.getByLabelText('Select metric'));
options = await screen.findAllByRole('option');
await user.click(options[1]);

await user.click(screen.getByLabelText('Select Measurement'));
await user.click(screen.getByLabelText('Select measurement'));
options = await screen.findAllByRole('option');
await user.click(options[5]); // Previous select options are not being removed from page

expect(saveButton.getAttribute('disabled')).toBeNull();

await user.click(screen.getByLabelText('Select Metric'));
await user.click(screen.getByLabelText('Select metric'));
options = await screen.findAllByRole('option');
await user.click(options[0]);

await user.click(screen.getByLabelText('Select Measurement'));
await user.click(screen.getByLabelText('Select measurement'));
options = await screen.findAllByRole('option');
await user.click(options[0]);

Expand Down Expand Up @@ -393,7 +393,7 @@ describe('update-rate', () => {
let options = null;
render(<RenderFormDataUI index={0} />);

await user.click(screen.getByLabelText('Select Measurement'));
await user.click(screen.getByLabelText('Select measurement'));
options = await screen.findAllByRole('option');
await user.click(options[1]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class GeneralInformation extends React.Component<GeneralInformationProps, any> {
const { intl } = this.props;
const sourceTypeOptions = [
{
label: messages.costModelsWizardOnboardAws,
label: messages.awsAlt,
value: 'AWS',
},
{
Expand Down

0 comments on commit 0f80441

Please sign in to comment.