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

[Backport 2.x] [Flow Framework] Add containsModels param to handle custom/empty template #1716

Merged
merged 1 commit into from
Feb 13, 2025
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ describe('Creating Workflows Using Various Methods', () => {
});

it('Create workflow from hybrid search template', () => {
createPreset('Hybrid Search');
createPreset('Hybrid Search', true);
});

it('Create workflow from multimodal template', () => {
createPreset('Multimodal Search');
createPreset('Multimodal Search', true);
});

it('Create workflow from custom template', () => {
createPreset('Custom Search');
createPreset('Custom Search', false);
});

after(() => {
Expand All @@ -188,7 +188,7 @@ describe('Creating Workflows Using Various Methods', () => {
});

// Reusable fn to check the preset exists, and able to create it, and navigate to its details page.
function createPreset(presetName) {
function createPreset(presetName, containsModels = false) {
cy.getElementByDataTestId('createWorkflowButton', { timeout: FF_TIMEOUT })
.should('be.visible')
.click();
Expand All @@ -205,8 +205,12 @@ function createPreset(presetName) {
.clear()
.type(presetName.toLowerCase().replace(/\s/g, ''));
});
cy.getElementByDataTestId('selectDeployedModel').should('be.visible').click();
cy.get('.euiSuperSelect__item').contains('BedRock').click();
if (containsModels) {
cy.getElementByDataTestId('selectDeployedModel')
.should('be.visible')
.click();
cy.get('.euiSuperSelect__item').contains('BedRock').click();
}
cy.getElementByDataTestId('quickConfigureCreateButton')
.should('be.visible')
.click();
Expand Down
Loading