Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-10167-tests-1709236661581.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Add Cypress test to check empty state in Images landing page ([#10167](https://github.com/linode/manager/pull/10167))
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { ui } from 'support/ui';
import { mockGetAllImages } from 'support/intercepts/images';

describe('Images empty landing page', () => {
/**
* - Confirms Images landing page empty state is shown when no Images are present:
* - Confirms that "Getting Started Guides" and "Video Playlist" are listed on landing page.
* - Confirms that clicking "Create Image" navigates user to image create page.
*/
it('shows the empty state when there are no images', () => {
mockGetAllImages([]).as('getImages');

cy.visitWithLogin('/images');
cy.wait(['@getImages']);

// confirms helper text
cy.findByText(
'Store your own custom Linux images, enabling you to rapidly deploy Linode Compute Instances preconfigured with the software and settings you require.'
).should('be.visible');

// checks that guides are visible
cy.findByText('Getting Started Guides').should('be.visible');
cy.findByText('Overview of Custom Images').should('be.visible');
cy.findByText('Getting Started with Custom Images').should('be.visible');
cy.findByText('Capture an Image from a Linode').should('be.visible');
cy.findByText('Upload a Custom Image').should('be.visible');
cy.findByText('View additional Images guides').should('be.visible');

// checks that videos are visible
cy.findByText('Video Playlist').should('be.visible');
cy.findByText(
'How to use Linode Images | Learn how to Create, Upload, and Deploy Custom Images on Linode'
).should('be.visible');
cy.findByText(
'Custom Images on Linode | Create, Upload, and Deploy Custom iso Images to Deploy on Linode'
).should('be.visible');
cy.findByText('Using Images and Backups on Linode').should('be.visible');
cy.findByText('View our YouTube channel').should('be.visible');

// confirms clicking on 'Create Image' button
ui.button
.findByTitle('Create Image')
.should('be.visible')
.should('be.enabled')
.click();

cy.url().should('endWith', '/images/create');
});
});