From 397c7d724a0c34390a0ab4d763f933fc1f70ba5f Mon Sep 17 00:00:00 2001 From: Thiago Dallacqua Date: Fri, 18 Oct 2024 18:57:48 -0300 Subject: [PATCH] feat: Update move experiment test with correct workspace and project names. --- webui/react/src/e2e/tests/experimentList.spec.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/webui/react/src/e2e/tests/experimentList.spec.ts b/webui/react/src/e2e/tests/experimentList.spec.ts index 052805880ee8..a4cd76f7c25c 100644 --- a/webui/react/src/e2e/tests/experimentList.spec.ts +++ b/webui/react/src/e2e/tests/experimentList.spec.ts @@ -607,23 +607,21 @@ test.describe('Experiment List', () => { await backgroundApiWorkspace.deleteWorkspace(destinationWorkspace.id); }); - test('move experiment', async () => { + test('move experiment', async ({ newWorkspace: { response: { workspace } } }) => { if (experimentId === undefined) return; const newExperimentRow = await projectDetailsPage.f_experimentList.dataGrid.getRowByColumnValue('ID', experimentId.toString()); const menuMove = await newExperimentRow.experimentActionDropdown.open(); + console.log(destinationProject.workspaceName) await menuMove.menuItem('Move').pwLocator.click(); - await menuMove.moveModal.destinationWorkspace.pwLocator.fill(destinationProject.workspaceName ?? ''); + await menuMove.moveModal.destinationWorkspace.pwLocator.fill(workspace.name); + await menuMove.moveModal.destinationWorkspace.selectMenuOption(workspace.name); await menuMove.moveModal.destinationProject.pwLocator.waitFor({ state: 'visible' }); await menuMove.moveModal.destinationProject.pwLocator.fill(destinationProject.name); + await menuMove.moveModal.destinationWorkspace.selectMenuOption(destinationProject.name); await menuMove.moveModal.footer.submit.pwLocator.click(); - // TODO: check why it's failing on submit (somehow the check bellow isn' passing) - /** - * const handleSubmit = async () => { - if (workspaceId === sourceWorkspaceId && projectId === sourceProjectId) { - */ await menuMove.moveModal.pwLocator.waitFor({ state: 'hidden' }); await newExperimentRow.pwLocator.waitFor({ state: 'hidden' });