Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change: [M3-8153] - Rename to Choose an OS in Linode Create flow #10554

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Changed
---

Rename to Choose an OS in Linode Create flow ([#10554](https://github.com/linode/manager/pull/10554))
hana-linode marked this conversation as resolved.
Show resolved Hide resolved
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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of questions:

  1. Was this change motivated by the name change to "distributed" for Gecko or something else?
  2. Did we opt for "OS" rather than "Operating System" because it's more concise and the term is widely understood? (We were spelling out Distribution rather than abbreviating it "Distro", for example, so just curious.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Yes, this change was motivated by the name change to distributed for Gecko
  2. Not exactly sure what UX's reasoning was for OS vs Operating System but I assume it was bc it's more concise and is a term that's widely understood

<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
Loading