Conversation
There was a problem hiding this comment.
There is a typo in the file name. Also, the test seem to be incomplete
There was a problem hiding this comment.
Oh oops I forgot about that one. Looking at the failed test screenshot, it looks like the ErrorBoundary doesn't get rendered. Not sure what's going on there.
| import InvalidObject from '../../packages/module/dist/dynamic/InvalidObject'; | ||
|
|
||
| describe('InvalidObject', () => { | ||
| /* eslint-disable no-console */ |
There was a problem hiding this comment.
oh 😅 the problem of copy-paste. I took these out.
| import ShortcutGrid from '../../packages/module/dist/dynamic/ShortcutGrid'; | ||
|
|
||
| describe('ShortcutGrid', () => { | ||
| /* eslint-disable no-console */ |
There was a problem hiding this comment.
| /* eslint-disable no-console */ |
| import SkeletonTable from '../../packages/module/dist/dynamic/SkeletonTable'; | ||
|
|
||
| describe('SkeletonTable', () => { | ||
| /* eslint-disable no-console */ |
There was a problem hiding this comment.
| /* eslint-disable no-console */ |
cypress/component/Ansible.cy.tsx
Outdated
|
|
||
| describe('Ansible', () => { | ||
| it('renders supported Ansible', () => { | ||
| /* eslint-disable no-console */ |
There was a problem hiding this comment.
| /* eslint-disable no-console */ |
cypress/component/Ansible.cy.tsx
Outdated
| cy.get('i').should('have.class', 'ansibleSupported-0-2-2'); | ||
| }); | ||
| it('renders unsupported Ansible', () => { | ||
| /* eslint-disable no-console */ |
There was a problem hiding this comment.
| /* eslint-disable no-console */ |
| /* eslint-disable no-console */ | ||
| it('renders the Close button', () => { | ||
| cy.mount(<ErrorState errorTitle='Sample error title' errorDescription='Sample error description' />); | ||
| cy.get('h4').should('have.text', 'Sample error title'); |
There was a problem hiding this comment.
Can you please check also the description?
| it('renders InvalidObject', () => { | ||
| cy.mount(<InvalidObject />) | ||
| cy.get('[class="pf-v5-c-empty-state"]').should('exist') | ||
| cy.get('h1').should('have.text', 'We lost that page'); |
There was a problem hiding this comment.
Could you please also check the description and button?
| describe('LogSnippet', () => { | ||
| it('renders LogSnippet', () => { | ||
| cy.mount(<LogSnippet logSnippet='test test code' message='A test message'/>) | ||
| cy.get('div div p').should('have.text', 'A test message'); |
There was a problem hiding this comment.
the code content could be tested as well
| serviceName="Test bundle" | ||
| prevPageButtonText="Go to previous page" | ||
| />); | ||
| cy.get('div div div h5').should('have.text', 'You do not have access to Test bundle'); |
There was a problem hiding this comment.
Can you please also add the description check?
| it('renders UnavailableContent', () => { | ||
| cy.mount(<UnavailableContent />) | ||
| cy.get('[class="pf-v5-c-empty-state__content"').should('exist'); | ||
| cy.get('div div div h5').should('have.text', 'This page is temporarily unavailable'); |
There was a problem hiding this comment.
can you please check the description?
|
@InsaneZein it looks good, just posted some smaller comments. It looks good as a base. It would probably require follow-up tickets to cover all variants of multi-content card and warning modal callbacks. What do you think? |
|
I agree @fhlavac I tried going through the whole document, but had to miss a couple because of lack of bandwidth. |
| describe('ErrorBoundary', () => { | ||
| it('renders the ErrorBoundary ', () => { | ||
| cy.mount(<ErrorBoundary headerTitle="My app header" errorTitle="Something wrong happened"/>) | ||
| // cy.get('div h1').should('have.text', 'Something wrong happened'); |
There was a problem hiding this comment.
Why is the assertion commented out? Without it we probably even don't need to run the test
There was a problem hiding this comment.
For some reason ErrorBoundary is not getting rendered. I'm not sure what's going on. Could we make fixing this as part of the next ticket?
There was a problem hiding this comment.
@InsaneZein sounds good, can you please add a description of the issue to that ticket? Thank you
No problem, I've opened a follow-up ticket RHCLOUD-32488 to cover the rest from the document |
| @@ -0,0 +1,9 @@ | |||
| import React from 'react'; | |||
| import ErrorBoundary from '../../packages/module/dist/esm/ErrorBoundary'; | |||
There was a problem hiding this comment.
| import ErrorBoundary from '../../packages/module/dist/esm/ErrorBoundary'; | |
| import ErrorBoundary from '../../packages/module/dist/dynamic/ErrorBoundary'; |
|
🎉 This PR is included in version 5.2.0-prerelease.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
part of RHCLOUD-31955