From 798b83e6431fc8e05f10943d2a4a73cc345ca33c Mon Sep 17 00:00:00 2001 From: Kuno Vercammen Date: Tue, 23 Apr 2024 11:39:29 +0200 Subject: [PATCH] 114599: Added e2e test to test the newly added loading component after creating com/col --- cypress/e2e/collection-create.cy.ts | 13 +++++++++++++ cypress/e2e/community-create.cy.ts | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 cypress/e2e/collection-create.cy.ts create mode 100644 cypress/e2e/community-create.cy.ts diff --git a/cypress/e2e/collection-create.cy.ts b/cypress/e2e/collection-create.cy.ts new file mode 100644 index 00000000000..bd0aa7c64ef --- /dev/null +++ b/cypress/e2e/collection-create.cy.ts @@ -0,0 +1,13 @@ +beforeEach(() => { + cy.visit('/collections/create'); + cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); +}); + +it('should show loading component while saving', () => { + const title = 'Test Collection Title'; + cy.get('#title').type(title); + + cy.get('button[type="submit"]').click(); + + cy.get('ds-themed-loading').should('be.visible'); +}); diff --git a/cypress/e2e/community-create.cy.ts b/cypress/e2e/community-create.cy.ts new file mode 100644 index 00000000000..e727a67be5d --- /dev/null +++ b/cypress/e2e/community-create.cy.ts @@ -0,0 +1,13 @@ +beforeEach(() => { + cy.visit('/communities/create'); + cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); +}); + +it('should show loading component while saving', () => { + const title = 'Test Community Title'; + cy.get('#title').type(title); + + cy.get('button[type="submit"]').click(); + + cy.get('ds-themed-loading').should('be.visible'); +});