Skip to content

Commit

Permalink
change: [M3-8153] - Rename to Choose an OS in Linode Create flow (#10554
Browse files Browse the repository at this point in the history
)

## Description 📝
Rename `Choose a Distribution` to `Choose an OS` in the Linode Create flow. The tab will stay as Distribution for now.

## How to test 🧪
### Verification steps
(How to verify changes)
- Go to `/linodes/create?type=Distributions`
  • Loading branch information
hana-akamai authored Jun 13, 2024
1 parent ee2707c commit c50ab9f
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 35 deletions.
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-10554-changed-1718122854647.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Changed
---

Rename to 'Choose a Distribution' to 'Choose an OS' in Linode Create flow ([#10554](https://github.com/linode/manager/pull/10554))
3 changes: 1 addition & 2 deletions packages/manager/cypress/support/ui/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export interface Page {
// List of Routes and validator of the route
export const pages: Page[] = [
{
assertIsLoaded: () =>
cy.findByText('Choose a Distribution').should('be.visible'),
assertIsLoaded: () => cy.findByText('Choose an OS').should('be.visible'),
goWithUI: [
{
go: () => {
Expand Down
60 changes: 30 additions & 30 deletions packages/manager/cypress/support/ui/pages/linode-create-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,13 @@ import { ui } from 'support/ui';
* Page utilities for interacting with the Linode create page.
*/
export const linodeCreatePage = {
/**
* Sets the Linode's label.
*
* @param linodeLabel - Linode label to set.
*/
setLabel: (linodeLabel: string) => {
cy.findByLabelText('Linode Label').type(`{selectall}{del}${linodeLabel}`);
},

/**
* Sets the Linode's root password.
*
* @param linodePassword - Root password to set.
*/
setRootPassword: (linodePassword: string) => {
cy.findByLabelText('Root Password').as('rootPasswordField').click();

cy.get('@rootPasswordField').type(linodePassword, { log: false });
},

/**
* Selects the Image with the given name.
*
* @param imageName - Name of Image to select.
*/
selectImage: (imageName: string) => {
cy.findByText('Choose a Distribution')
cy.findByText('Choose an OS')
.closest('[data-qa-paper]')
.within(() => {
ui.autocomplete.find().click();
Expand All @@ -46,15 +26,6 @@ export const linodeCreatePage = {
});
},

/**
* Select the Region with the given ID.
*
* @param regionId - ID of Region to select.
*/
selectRegionById: (regionId: string) => {
ui.regionSelect.find().click().type(`${regionId}{enter}`);
},

/**
* Select the given Linode plan.
*
Expand Down Expand Up @@ -91,4 +62,33 @@ export const linodeCreatePage = {
cy.get('@selectionCard').click();
});
},

/**
* Select the Region with the given ID.
*
* @param regionId - ID of Region to select.
*/
selectRegionById: (regionId: string) => {
ui.regionSelect.find().click().type(`${regionId}{enter}`);
},

/**
* Sets the Linode's label.
*
* @param linodeLabel - Linode label to set.
*/
setLabel: (linodeLabel: string) => {
cy.findByLabelText('Linode Label').type(`{selectall}{del}${linodeLabel}`);
},

/**
* Sets the Linode's root password.
*
* @param linodePassword - Root password to set.
*/
setRootPassword: (linodePassword: string) => {
cy.findByLabelText('Root Password').as('rootPasswordField').click();

cy.get('@rootPasswordField').type(linodePassword, { log: false });
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Distributions', () => {
component: <Distributions />,
});

const header = getByText('Choose a Distribution');
const header = getByText('Choose an OS');

expect(header).toBeVisible();
expect(header.tagName).toBe('H2');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const Distributions = () => {

return (
<Paper>
<Typography variant="h2">Choose a Distribution</Typography>
<Typography variant="h2">Choose an OS</Typography>
<ImageSelectv2
disabled={isCreateLinodeRestricted}
errorText={fieldState.error?.message}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ export class LinodeCreate extends React.PureComponent<
<FromImageContent
accountBackupsEnabled={accountBackupsEnabled}
error={hasErrorFor.image}
imagePanelTitle="Choose a Distribution"
imagePanelTitle="Choose an OS"
imagesData={imagesData!}
regionsData={regionsData!}
typesData={typesData!}
Expand Down

0 comments on commit c50ab9f

Please sign in to comment.