Skip to content

Commit

Permalink
added changes for cypress tests
Browse files Browse the repository at this point in the history
Signed-off-by: sumukhswamy <[email protected]>
  • Loading branch information
sumukhswamy committed Jul 22, 2024
1 parent e8d78ad commit 4ce090b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
17 changes: 0 additions & 17 deletions .cypress/integration/notebooks_test/notebooks.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,6 @@ describe('Testing notebooks table', () => {
cy.contains(TEST_NOTEBOOK).should('exist');
});

it('Duplicates a notebook', () => {
cy.get('.euiCheckbox__input[title="Select this row"]').eq(0).click();
cy.get('button[data-test-subj="notebookTableActionBtn"]').click();
cy.get('button[data-test-subj="duplicateNotebookBtn"]').click();
cy.get('button[data-test-subj="custom-input-modal-confirm-button"]').click();

cy.get('.euiCheckbox__input[title="Select this row"]').eq(1).click();
});

it('Renames a notebook', () => {
cy.get('.euiCheckbox__input[title="Select this row"]').eq(0).click();
cy.get('button[data-test-subj="notebookTableActionBtn"]').click();
cy.get('button[data-test-subj="renameNotebookBtn"]').click();
cy.get('input[data-test-subj="custom-input-modal-input"]').focus().type(' (rename)');
cy.get('button[data-test-subj="custom-input-modal-confirm-button"]').click();
});

it('Searches existing notebooks', () => {
cy.get('input.euiFieldSearch').focus().type('this notebook should not exist');
cy.get('.euiTableCellContent__text').contains('No items found').should('exist');
Expand Down
4 changes: 3 additions & 1 deletion server/routes/notebooks/paraRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ export function registerParaRoute(router: IRouter) {
paragraphInput: schema.string(),
paragraphType: schema.string(),
dataSourceMDSId: schema.maybe(schema.string({ defaultValue: '' })),
dataSourceMDSLabel: schema.string(),
dataSourceMDSLabel: schema.maybe(schema.string({ defaultValue: '' })),
}),
},
},
Expand Down Expand Up @@ -459,6 +459,8 @@ export function registerParaRoute(router: IRouter) {
dateCreated: schema.string(),
dateModified: schema.string(),
id: schema.string(),
dataSourceMDSId: schema.maybe(schema.string({ defaultValue: '' })),
dataSourceMDSLabel: schema.maybe(schema.string({ defaultValue: '' })),
})
),
}),
Expand Down

0 comments on commit 4ce090b

Please sign in to comment.