-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RHOAIENG-6321] Home Page Microcopy Updates
- Loading branch information
1 parent
3aa9f3b
commit 5d57671
Showing
14 changed files
with
344 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 76 additions & 28 deletions
104
frontend/src/__tests__/cypress/cypress/e2e/home/homeAIFlows.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,138 @@ | ||
import { initHomeIntercepts } from '~/__tests__/cypress/cypress/e2e/home/homeUtils'; | ||
import { homePage } from '~/__tests__/cypress/cypress/pages/home'; | ||
|
||
describe('Home page AI Flows', () => { | ||
it('should show the appropriate AI flow cards', () => { | ||
initHomeIntercepts({ disableHome: false }); | ||
cy.visit('/'); | ||
homePage.initHomeIntercepts({ disableHome: false }); | ||
homePage.visit(); | ||
|
||
cy.findByTestId('ai-flow-projects-card').should('be.visible'); | ||
cy.findByTestId('ai-flow-train-card').should('be.visible'); | ||
cy.findByTestId('ai-flow-models-card').should('be.visible'); | ||
}); | ||
it('should show the appropriate info cards', () => { | ||
initHomeIntercepts({ disableHome: false }); | ||
cy.visit('/'); | ||
homePage.initHomeIntercepts({ disableHome: false }); | ||
homePage.visit(); | ||
|
||
cy.findByTestId('ai-flow-projects-card').click(); | ||
homePage.getProjectsFlowCard().click(); | ||
cy.findByTestId('ai-flows-projects-info').should('be.visible'); | ||
cy.findByTestId('ai-flows-connections-info').should('be.visible'); | ||
cy.findByTestId('ai-flows-storage-info').should('be.visible'); | ||
|
||
cy.findByTestId('ai-flow-train-card').click(); | ||
homePage.getTrainFlowCard().click(); | ||
cy.findByTestId('ai-flows-workbenches-info').should('be.visible'); | ||
cy.findByTestId('ai-flows-pipelines-info').should('be.visible'); | ||
cy.findByTestId('ai-flows-runs-info').should('be.visible'); | ||
|
||
cy.findByTestId('ai-flow-models-card').click(); | ||
homePage.getModelsFlowCard().click(); | ||
cy.findByTestId('ai-flows-model-servers-info').should('be.visible'); | ||
cy.findByTestId('ai-flows-model-deploy-info').should('be.visible'); | ||
}); | ||
it('should close the info cards on re-click', () => { | ||
initHomeIntercepts({ disableHome: false }); | ||
cy.visit('/'); | ||
homePage.initHomeIntercepts({ disableHome: false }); | ||
homePage.visit(); | ||
|
||
cy.findByTestId('ai-flow-projects-card').click(); | ||
homePage.getProjectsFlowCard().click(); | ||
cy.findByTestId('ai-flows-projects-info').should('be.visible'); | ||
cy.findByTestId('ai-flows-connections-info').should('be.visible'); | ||
cy.findByTestId('ai-flows-storage-info').should('be.visible'); | ||
|
||
cy.findByTestId('ai-flow-projects-card').click(); | ||
homePage.getProjectsFlowCard().click(); | ||
cy.findByTestId('ai-flows-projects-info').should('not.exist'); | ||
cy.findByTestId('ai-flows-connections-info').should('not.exist'); | ||
cy.findByTestId('ai-flows-storage-info').should('not.exist'); | ||
}); | ||
it('should close the info cards on close button click', () => { | ||
initHomeIntercepts({ disableHome: false }); | ||
cy.visit('/'); | ||
homePage.initHomeIntercepts({ disableHome: false }); | ||
homePage.visit(); | ||
|
||
cy.findByTestId('ai-flow-projects-card').click(); | ||
homePage.getProjectsFlowCard().click(); | ||
cy.findByTestId('ai-flows-projects-info').should('be.visible'); | ||
cy.findByTestId('ai-flows-connections-info').should('be.visible'); | ||
cy.findByTestId('ai-flows-storage-info').should('be.visible'); | ||
|
||
cy.findByTestId('ai-flows-close-info').click(); | ||
homePage.clickAIFlowClose(); | ||
cy.findByTestId('ai-flows-projects-info').should('not.exist'); | ||
cy.findByTestId('ai-flows-connections-info').should('not.exist'); | ||
cy.findByTestId('ai-flows-storage-info').should('not.exist'); | ||
}); | ||
it('should hide sections that are disabled', () => { | ||
initHomeIntercepts({ | ||
homePage.initHomeIntercepts({ | ||
disableHome: false, | ||
disableProjects: true, | ||
}); | ||
cy.visit('/'); | ||
cy.findByTestId('home-page').should('be.visible'); | ||
homePage.visit(); | ||
|
||
cy.findByTestId('ai-flow-projects-card').should('not.exist'); | ||
homePage.getProjectsFlowCard().should('not.exist'); | ||
|
||
initHomeIntercepts({ | ||
homePage.initHomeIntercepts({ | ||
disableHome: false, | ||
disableModelServing: true, | ||
}); | ||
cy.visit('/'); | ||
cy.findByTestId('home-page').should('be.visible'); | ||
cy.findByTestId('ai-flow-models-card').should('not.exist'); | ||
homePage.visit(); | ||
|
||
homePage.getModelsFlowCard().should('not.exist'); | ||
}); | ||
it('should hide info cards that are disabled', () => { | ||
initHomeIntercepts({ | ||
homePage.initHomeIntercepts({ | ||
disableHome: false, | ||
disablePipelines: true, | ||
}); | ||
cy.visit('/'); | ||
cy.findByTestId('home-page').should('be.visible'); | ||
homePage.visit(); | ||
|
||
cy.findByTestId('ai-flow-train-card').click(); | ||
homePage.getTrainFlowCard().click(); | ||
|
||
cy.findByTestId('ai-flows-workbenches-info').should('be.visible'); | ||
cy.findByTestId('ai-flows-pipelines-info').should('not.exist'); | ||
cy.findByTestId('ai-flows-runs-info').should('not.exist'); | ||
}); | ||
it('should render projects content specific to feature availability', () => { | ||
homePage.initHomeIntercepts({ | ||
disableHome: false, | ||
}); | ||
homePage.visit(); | ||
|
||
homePage.getProjectsFlowCard().click(); | ||
cy.findByTestId('project-workbenches--trailer-model-mesh').scrollIntoView(); | ||
|
||
homePage.initHomeIntercepts({ | ||
disableHome: false, | ||
disableModelMesh: true, | ||
}); | ||
homePage.visit(); | ||
homePage.getProjectsFlowCard().click(); | ||
cy.findByTestId('project-workbenches--trailer-no-model-mesh').scrollIntoView(); | ||
|
||
homePage.initHomeIntercepts({ | ||
disableHome: false, | ||
disableModelServing: true, | ||
}); | ||
homePage.visit(); | ||
homePage.getProjectsFlowCard().click(); | ||
cy.findByTestId('project-workbenches--trailer-no-model-serving').scrollIntoView(); | ||
|
||
homePage.initHomeIntercepts({ | ||
disableHome: false, | ||
disablePipelines: true, | ||
}); | ||
homePage.visit(); | ||
homePage.getProjectsFlowCard().click(); | ||
cy.findByTestId('project-workbenches--trailer-no-pipelines').scrollIntoView(); | ||
}); | ||
it('should render workbenches content specific to feature availability', () => { | ||
homePage.initHomeIntercepts({ | ||
disableHome: false, | ||
}); | ||
homePage.visit(); | ||
|
||
homePage.getTrainFlowCard().click(); | ||
cy.findByTestId('create-and-train-pipelines-trailer').scrollIntoView(); | ||
|
||
homePage.initHomeIntercepts({ | ||
disableHome: false, | ||
disablePipelines: true, | ||
}); | ||
homePage.visit(); | ||
homePage.getTrainFlowCard().click(); | ||
cy.findByTestId('create-and-train-no-pipelines-trailer').scrollIntoView(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.