Skip to content
Open
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
37 changes: 22 additions & 15 deletions tests/tests/lightspeed-install.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -554,32 +554,23 @@ spec:
.should('not.include.text', 'Logs');
});

it('Test attach options on pod details page', () => {
it('Test attaching YAML', () => {
pages.goToPodDetails('openshift-console', podNamePrefix);
cy.get(mainButton).click();
cy.get(popover).should('exist');

// There should be not prompt attachments initially
cy.get(attachments).should('be.empty');

// Test that the context menu now has options
cy.get(attachButton).click();
cy.get(attachMenu, { timeout: MINUTE })
cy.get(attachMenu)
.should('include.text', 'Full YAML file')
.should('include.text', 'Filtered YAML')
.should('include.text', 'Events')
.should('include.text', 'Logs')
.should('include.text', 'Upload from computer');
});

it('Test attaching YAML', () => {
pages.goToPodDetails('openshift-console', podNamePrefix);
cy.get(mainButton).click();
cy.get(popover).should('exist');

// Test attaching pod YAML
cy.get(attachButton).click();
cy.get(attachMenu).find('li:first-of-type button').contains('Full YAML file').click();
cy.get(attachMenu).find('button').contains('Full YAML file').click();
cy.get(attachments)
.should('include.text', podNamePrefix)
.should('include.text', 'YAML')
Expand All @@ -597,7 +588,6 @@ spec:
.click();
cy.get(promptInput).type('Test{enter}');

// Test attaching pod YAML status section
cy.get(attachButton).click();
cy.get(attachMenu).find('button').contains('Filtered YAML').click();
cy.get(attachments)
Expand All @@ -623,9 +613,14 @@ spec:
cy.get(mainButton).click();
cy.get(popover).should('exist');

// Test attaching pod YAML
cy.get(attachButton).click();
cy.get(attachMenu).find('li:first-of-type button').contains('Full YAML file').click();
cy.get(attachMenu)
.should('include.text', 'Full YAML file')
.should('include.text', 'Filtered YAML')
.should('include.text', 'Events')
.should('include.text', 'Logs')
.should('include.text', 'Upload from computer');
cy.get(attachMenu).find('button').contains('Full YAML file').click();
cy.get(promptAttachment).click();
cy.get(modal).find('button').contains('Dismiss').click();
cy.get(promptAttachment).click();
Expand All @@ -652,6 +647,12 @@ spec:
cy.get(popover).should('exist');

cy.get(attachButton).click();
cy.get(attachMenu)
.should('include.text', 'Full YAML file')
.should('include.text', 'Filtered YAML')
.should('include.text', 'Events')
.should('include.text', 'Logs')
.should('include.text', 'Upload from computer');
cy.get(attachMenu).find('button').contains('Events').click();
cy.get(modal).should('include.text', 'Configure events attachment');
cy.get(modal).find('button').contains('Attach').click();
Expand Down Expand Up @@ -701,6 +702,12 @@ spec:
cy.get(popover).should('exist');

cy.get(attachButton).click();
cy.get(attachMenu)
.should('include.text', 'Full YAML file')
.should('include.text', 'Filtered YAML')
.should('include.text', 'Events')
.should('include.text', 'Logs')
.should('include.text', 'Upload from computer');
cy.get(attachMenu).find('button').contains('Logs').click();
cy.get(modal)
.should('include.text', 'Configure log attachment')
Expand Down