-
{{ loggedInMessage }}
+
{{ loggedInMessage }}
From 4630cadd8b5cbe6006adf60f054b16682e9bae53 Mon Sep 17 00:00:00 2001
From: andrej romanov <50377758+auumgn@users.noreply.github.com>
Date: Mon, 13 May 2024 15:13:14 +0300
Subject: [PATCH 5/7] tweak pagination test
---
ui/cypress/e2e/retention/ui-pagination.cy.js | 67 +++++++++++---------
1 file changed, 37 insertions(+), 30 deletions(-)
diff --git a/ui/cypress/e2e/retention/ui-pagination.cy.js b/ui/cypress/e2e/retention/ui-pagination.cy.js
index 625729118..5a7c73bbe 100644
--- a/ui/cypress/e2e/retention/ui-pagination.cy.js
+++ b/ui/cypress/e2e/retention/ui-pagination.cy.js
@@ -1,51 +1,58 @@
///
-import data from '../../fixtures/test-data.json';
-import credentials from '../../fixtures/credentials.json';
+import data from "../../fixtures/test-data.json";
+import credentials from "../../fixtures/credentials.json";
-describe('Test pagination', () => {
+describe("Test pagination", () => {
beforeEach(() => {
- cy.programmaticSignin(data.paginationMember.users.owner.email, credentials.password);
- })
+ cy.programmaticSignin(
+ data.paginationMember.users.owner.email,
+ credentials.password,
+ );
+ });
afterEach(() => {
cy.programmaticSignout();
- })
+ });
- it('Test the "Manage users" page', function() {
- cy.visit('/user');
+ it('Test the "Manage users" page', function () {
+ cy.visit("ui/en/users");
/*
cy.get('.container-fluid').within(() => {
cy.get('p')
.contains('Showing 1 - 20 of 22 items')
})*/
- cy.get('tbody').children().should('have.length', 20);
- cy.get('.pagination').contains("1");
- cy.get('.pagination').contains("3").should('not.exist');
- cy.get('.pagination').contains("2").click();
- cy.get('tbody').children().should('have.length', 2);
- cy.get('tbody').within(() => {
- cy.get('td').contains(data.paginationMember.assertionEmail1).should('not.exist');
- cy.get('td').contains(data.paginationMember.assertionEmail2);
- cy.get('td').contains(data.paginationMember.assertionEmail3);
- })
+ cy.get("tbody").children().should("have.length", 20);
+ cy.get(".pagination").contains("1");
+ cy.get(".pagination").contains("3").should("not.exist");
+ cy.get(".pagination").contains("2").click();
+ cy.get("tbody").children().should("have.length", 2);
+ cy.get("tbody").within(() => {
+ cy.get("td")
+ .contains(data.paginationMember.assertionEmail1)
+ .should("not.exist");
+ cy.get("td").contains(data.paginationMember.assertionEmail2);
+ cy.get("td").contains(data.paginationMember.assertionEmail3);
+ });
});
- it('Test the "Affiliations" page', function() {
- cy.visit('/assertion');
+ it('Test the "Affiliations" page', function () {
+ cy.visit("ui/en/affiliations");
/*
cy.get('.container-fluid').within(() => {
cy.get('p')
.contains('Showing 1 - 20 of 22 items')
})*/
- cy.get('tbody').children().should('have.length', 20);
- cy.get('.pagination').contains("1");
- cy.get('.pagination').contains("2");
- cy.get('.pagination').contains("4").should('not.exist');
- cy.get('.pagination').contains("3").click();
- cy.get('tbody').children().should('have.length', 2);
- cy.get('tbody').within(() => {
- cy.get('td').contains(data.paginationMember.assertionData1).should('not.exist');
- cy.get('td').contains(data.paginationMember.assertionData2);
- })
+ cy.get("tbody").children().should("have.length", 20);
+ cy.get(".pagination").contains("1");
+ cy.get(".pagination").contains("2");
+ cy.get(".pagination").contains("4").should("not.exist");
+ cy.get(".pagination").contains("3").click();
+ cy.get("tbody").children().should("have.length", 2);
+ cy.get("tbody").within(() => {
+ cy.get("td")
+ .contains(data.paginationMember.assertionData1)
+ .should("not.exist");
+ cy.get("td").contains(data.paginationMember.assertionData2);
+ });
});
});
From 6f5b43c3c7cdddf0fdbb1bc5fe3ee4c6e54f77b1 Mon Sep 17 00:00:00 2001
From: andrej romanov <50377758+auumgn@users.noreply.github.com>
Date: Mon, 13 May 2024 16:22:15 +0300
Subject: [PATCH 6/7] tweak login test
---
ui/cypress/e2e/retention/ui-login.cy.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/cypress/e2e/retention/ui-login.cy.js b/ui/cypress/e2e/retention/ui-login.cy.js
index 10cbd2a3c..56175b2ed 100644
--- a/ui/cypress/e2e/retention/ui-login.cy.js
+++ b/ui/cypress/e2e/retention/ui-login.cy.js
@@ -4,7 +4,7 @@ import credentials from "../../fixtures/credentials.json";
describe("Test sign in form", () => {
it("Sign in", function () {
- cy.visit(`/`);
+ cy.visit(`ui/en/`);
cy.get("#username").clear().type(data.member.users.owner.email);
cy.get("#password").type(credentials.password);
cy.get("button").filter('[type="submit"]').click();
From 0e4fbc2af224a44bfc839904a168d615b264d9ad Mon Sep 17 00:00:00 2001
From: andrej romanov <50377758+auumgn@users.noreply.github.com>
Date: Mon, 13 May 2024 16:53:47 +0300
Subject: [PATCH 7/7] partial homepage fix
---
ui/cypress/e2e/retention/ui-homepage.cy.js | 33 +++++++++-------------
1 file changed, 14 insertions(+), 19 deletions(-)
diff --git a/ui/cypress/e2e/retention/ui-homepage.cy.js b/ui/cypress/e2e/retention/ui-homepage.cy.js
index e629c277c..1abc04e97 100644
--- a/ui/cypress/e2e/retention/ui-homepage.cy.js
+++ b/ui/cypress/e2e/retention/ui-homepage.cy.js
@@ -8,15 +8,15 @@ describe("Test homepage", () => {
data.homepageTestMembers.directMemberEmail,
credentials.password,
);
- cy.visit("/");
+ cy.visit("ui/en/");
cy.get("app-member-info", { timeout: 20000 });
- cy.get("app-generic-landing").should("not.exist");
cy.get(".side-bar").contains("Public details");
cy.get(".side-bar").contains("Website");
cy.get(".side-bar").contains("Email");
cy.get(".side-bar").contains("https://orcid.org");
cy.get(".side-bar").contains("orcid@orcid.org");
- cy.get(".main-section").contains("Membership: Active");
+ cy.get(".main-section").first().contains("Membership:");
+ cy.get(".main-section").first().contains("Active");
cy.get(".main-section").contains("Fly and Mighty");
cy.get(".main-section").contains("Contacts");
cy.get(".main-section").contains("Main relationship contact (OFFICIAL)");
@@ -28,19 +28,18 @@ describe("Test homepage", () => {
data.homepageTestMembers.consortiumLeadEmail,
credentials.password,
);
- cy.visit("/");
+ cy.visit("ui/en/");
cy.get("app-member-info", { timeout: 20000 });
- cy.get("app-generic-landing").should("not.exist");
cy.get(".side-bar").contains("Public details");
cy.get(".side-bar").contains("Website");
cy.get(".side-bar").contains("Email");
- cy.get(".side-bar").contains("No website added");
- cy.get(".side-bar").contains("No email added");
+ cy.get(".side-bar").contains("https://www.testtest1.com");
+ cy.get(".side-bar").contains("mambono5@mailinator.com");
cy.get(".main-section").contains("Consortium lead");
- cy.get(".main-section").contains("Mambo No 5");
- cy.get(".main-section").contains("Consortium Members (4)");
+ cy.get(".main-section").contains("Mambo no 5");
+ cy.get(".main-section").contains("Consortium Members (2)");
cy.get(".main-section").contains("Member name");
- cy.get(".main-section").contains("Almonds Forest");
+ cy.get(".main-section").contains("A Public Hot Metro");
cy.get(".main-section").contains("Contacts");
cy.get(".main-section").contains("Main relationship contact (OFFICIAL)");
cy.get(".main-section").contains("first.last@orcid.org");
@@ -51,9 +50,8 @@ describe("Test homepage", () => {
data.homepageTestMembers.consortiumMember.email,
credentials.password,
);
- cy.visit("/");
+ cy.visit("ui/en/");
cy.get("app-member-info", { timeout: 20000 });
- cy.get("app-generic-landing").should("not.exist");
cy.get(".side-bar").contains("Public details");
cy.get(".side-bar").contains("Website");
cy.get(".side-bar").contains("Email");
@@ -75,9 +73,8 @@ describe("Test homepage", () => {
data.homepageTestMembers.consortiumMemberEmail2,
credentials.password,
);
- cy.visit("/");
+ cy.visit("ui/en/");
cy.get("app-member-info", { timeout: 20000 });
- cy.get("app-generic-landing").should("not.exist");
cy.get(".side-bar").contains("Public details");
cy.get(".side-bar").contains("Website");
cy.get(".side-bar").contains("Email");
@@ -95,9 +92,8 @@ describe("Test homepage", () => {
data.homepageTestMembers.consortiumLeadAndMember.email,
credentials.password,
);
- cy.visit("/");
+ cy.visit("ui/en/");
cy.get("app-member-info", { timeout: 20000 });
- cy.get("app-generic-landing").should("not.exist");
cy.get(".side-bar").contains("Public details");
cy.get(".side-bar").contains("Website");
cy.get(".side-bar").contains("Email");
@@ -118,10 +114,9 @@ describe("Test homepage", () => {
data.homepageTestMembers.inactiveConsortiumMemberEmail,
credentials.password,
);
- cy.visit("/");
- cy.get("app-generic-landing", { timeout: 20000 }).contains(
+ cy.visit("ui/en/");
+ cy.get("app-member-info", { timeout: 20000 }).contains(
"Something has gone wrong...",
);
- cy.get("app-member-info").should("not.exist");
});
});