From 158c46b4106993172b40b6858963803d797e306f Mon Sep 17 00:00:00 2001 From: Jasper Lieber Date: Wed, 15 Nov 2023 11:51:03 -0800 Subject: [PATCH 1/7] redoing announcement-form.cy.js --- .../announcements/announcement-form.cy.js | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 tests/cypress/cypress/e2e/accessmatch/announcements/announcement-form.cy.js diff --git a/tests/cypress/cypress/e2e/accessmatch/announcements/announcement-form.cy.js b/tests/cypress/cypress/e2e/accessmatch/announcements/announcement-form.cy.js new file mode 100644 index 000000000..5f8fcd3f6 --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/announcements/announcement-form.cy.js @@ -0,0 +1,51 @@ +/* + This test is specifically focused on the Announcements form tested for an authenticated user. + This test checks for major functions like: + Page Title, + Header text, + Form Functionality + + + The announcement is not finished a body needs to be added and Pecan Pie needs to become a coordinator +//cy.get("#edit-field-affinity-group-node-0-target-id").type( + //"ACCESS Support (327)" + //); + + */ + +describe("Authenticated user tests the Announcement Form without adding an Affinity Group", () => { + it("Should test Announcements Form for authenticated user", () => { + // login user with the "authenticated" role + cy.loginAs("administrator@amptesting.com", "b8QW]X9h7#5n"); + cy.visit("/node/add/access_news"); + + //Page Title + cy.get(".page-title").contains("Create ACCESS Announcements"); + + //Form Title Field + cy.get("#edit-title-0-value").type("Cypress-Created-Annoucement"); + + //Form Image Field + cy.get("#ajax-wrapper > .claro-details").contains("Featured Image"); + + //Tags + cy.get("#edit-field-tags-0-target-id").type("login (682)"); + + //Date for Announcement + cy.get( + "#edit-field-published-date-wrapper > .form-datetime-wrapper" + ).contains("Published Date"); + + //Affiliation Field + cy.get("#edit-field-affiliation").select("Community"); + + //Save As Field + cy.get('[name="moderation_state[0][state]"]').select("Published"); + + //Submission and confirmation + cy.get("#edit-submit").click(); + cy.contains( + "ACCESS Announcements Cypress-Created-Annoucement has been created." + ); + }); +}); From 2f44cdd0a6598ec3cc60d1ca0c196fdc5b98b050 Mon Sep 17 00:00:00 2001 From: Jasper Lieber Date: Wed, 15 Nov 2023 12:40:09 -0800 Subject: [PATCH 2/7] redoing hannah's tests --- .../announcements/announcements-page.cy.js | 47 +++++++++++++ .../e2e/accessmatch/ccep/ccep-details.cy.js | 27 ++++++++ .../cypress/e2e/accessmatch/ccep/ccep.cy.js | 49 ++++++++++++++ .../community-persona/add-interests.cy.js | 20 ++++++ .../community-persona/add-skills.cy.js | 22 +++++++ .../e2e/accessmatch/cssn/cssn-form.cy.js | 30 +++++++++ .../e2e/accessmatch/events/events-add.cy.js | 66 +++++++++++++++++++ .../e2e/accessmatch/events/events-page.cy.js | 66 +++++++++++++++++++ 8 files changed, 327 insertions(+) create mode 100644 tests/cypress/cypress/e2e/accessmatch/announcements/announcements-page.cy.js create mode 100644 tests/cypress/cypress/e2e/accessmatch/ccep/ccep-details.cy.js create mode 100644 tests/cypress/cypress/e2e/accessmatch/ccep/ccep.cy.js create mode 100644 tests/cypress/cypress/e2e/accessmatch/community-persona/add-interests.cy.js create mode 100644 tests/cypress/cypress/e2e/accessmatch/community-persona/add-skills.cy.js create mode 100644 tests/cypress/cypress/e2e/accessmatch/cssn/cssn-form.cy.js create mode 100644 tests/cypress/cypress/e2e/accessmatch/events/events-add.cy.js create mode 100644 tests/cypress/cypress/e2e/accessmatch/events/events-page.cy.js diff --git a/tests/cypress/cypress/e2e/accessmatch/announcements/announcements-page.cy.js b/tests/cypress/cypress/e2e/accessmatch/announcements/announcements-page.cy.js new file mode 100644 index 000000000..b16ee7f58 --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/announcements/announcements-page.cy.js @@ -0,0 +1,47 @@ +/* + This test is specifically focused on the Announcements page tested for an unauthenticated user. + This test checks for major functions like: + Filter Functionality, + Headers, + Testing created announcement + + +*/ +describe("Unauthenticated user tests the Announcements Page", () => { + it("Should test the Announcements page for unauthenticated user", () => { + cy.visit("/announcements"); + + // Look for title of the Announcements page + cy.get(".page-title").contains("Announcements"); + + // check breadcrumbs + const crumbs = [ + ["Support", "/"], + ["Announcements", null], + ]; + cy.checkBreadcrumbs(crumbs); + + //Filter Section on announcements + cy.get("#edit-field-affiliation-value--2").select("Community"); //Affiliation field + cy.get("#edit-tid--2").select("login"); //Tag field + cy.get("#edit-submit-access-news--2").click(); //Filter button + + //Created announcement through cypress + cy.get(".view-content > :nth-child(1)") + .contains("Cypress-Created-Annoucement") + .click(); + cy.get(".field__item > .font-normal").contains("login"); + cy.get(".field__label").contains("Affiliation"); + cy.get(".layout__region--second > .block > .field > .field__item").contains( + "Community" + ); + + //Testing another announcement + cy.visit("/announcements"); + cy.contains("Gateways 2023 Call for Participation").click(); + cy.get(".page-title > .field").contains( + "Gateways 2023 Call for Participation" + ); + cy.get(".clearfix").contains("https://sciencegateways.org/gateways2023"); + }); +}); diff --git a/tests/cypress/cypress/e2e/accessmatch/ccep/ccep-details.cy.js b/tests/cypress/cypress/e2e/accessmatch/ccep/ccep-details.cy.js new file mode 100644 index 000000000..97f4528f5 --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/ccep/ccep-details.cy.js @@ -0,0 +1,27 @@ +/* + This test is specifically focused on the CCEP page tested for an unauthenticated user. + This test checks for major functions like: + Page Title, + Header text, + and a segment of body paragraph + + +*/ + +describe("Unauthenticated user tests the CCEP Details Page", () => { + it("Should test CCEP Details page for unauthenticated user", () => { + cy.visit("/ccep-details"); + + //Verifying page title and paragraph + cy.get(".page-title > .field").contains("CCEP Details"); + cy.get("h2 > strong").contains("Important Fine Print:"); + cy.get(".block-field-blocknodepagebody > .clearfix").contains( + "All CSSN members (students, faculty, staff, or CI professionals) seeking CCEP rewards need to be affiliated" + ); + //Verifying Join CCEP Button + cy.get(".btn") + .contains("APPLY TO CCEP") + .should("have.attr", "href") + .and("contain", "https://forms.gle/u4d4kCtsYNQgzxjq5"); + }); +}); diff --git a/tests/cypress/cypress/e2e/accessmatch/ccep/ccep.cy.js b/tests/cypress/cypress/e2e/accessmatch/ccep/ccep.cy.js new file mode 100644 index 000000000..b7cddd7bd --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/ccep/ccep.cy.js @@ -0,0 +1,49 @@ +/* + This test is specifically focused on the CCEP page tested for an unauthenticated user. + This test checks for major functions like: + Page Title, + Testing accordion function, +*/ + +describe("Unauthenticated user tests the CCEP Page", () => { + it("Should test CCEP page for unauthenticated user", () => { + cy.visit("/ccep"); + + //Page Intro paragraph + cy.get("#about").contains( + "CCEP (CSSN Community Engagement Program) gives travel rewards to ANYONE" + ); + cy.get("#about > :nth-child(2)").contains( + "Submissions are reviewed once a month" + ); + + //Tier 1 Accordion Section + cy.get("#tier1 > h2").contains("Tier 1: $1,000"); + cy.get("#tier1 > :nth-child(2) > .bg-light-teal") + .contains("Intro to ACCESS lecture") + .click(); + cy.get('[open=""] > .bg-white').contains( + "Prepare an Intro to ACCESS lecture, tutorial, or slide deck for Basic, Intermediate, or Advanced User." + ); + + //Apply To CCEP Button + cy.get(".btn") + .contains("Apply to CCEP") + .should("have.attr", "href") + .and("contain", "https://forms.gle/u4d4kCtsYNQgzxjq5"); + + //Important Fine Print Section + cy.visit("/ccep"); + cy.get("#fine-print").contains( + "CCEP (CSSN Community Engagement Program) gives travel rewards to ANYONE for community engagement, feedback forums," + ); + + //Testing See All Details click function and Intro text of /ccep/ccep-details + cy.get(".container > :nth-child(3) > a") + .contains("See all the details") + .click(); + cy.get(".clearfix > ul > :nth-child(1)").contains( + "All CSSN members (students, faculty, staff" + ); + }); +}); diff --git a/tests/cypress/cypress/e2e/accessmatch/community-persona/add-interests.cy.js b/tests/cypress/cypress/e2e/accessmatch/community-persona/add-interests.cy.js new file mode 100644 index 000000000..685704b0f --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/community-persona/add-interests.cy.js @@ -0,0 +1,20 @@ +/* + This test is specifically focused on the Interests Page tested for an authenticated user. + This test checks for major functions like: + Page Title, + Top Level Tag text, + Adding a Tag Functionality + + */ + +describe("Authenticated user tests the Add Interests without adding an Affinity Group", () => { + it("Should test Add Interests Form for authenticated user", () => { + // login user with the "authenticated" role + + cy.loginAs("authenticated@amptesting.com", "6%l7iF}6(4tI"); + cy.visit("/community-persona/add-interest"); + + //Adding Tag + cy.contains("access-account").click(); + }); +}); diff --git a/tests/cypress/cypress/e2e/accessmatch/community-persona/add-skills.cy.js b/tests/cypress/cypress/e2e/accessmatch/community-persona/add-skills.cy.js new file mode 100644 index 000000000..eb752ee63 --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/community-persona/add-skills.cy.js @@ -0,0 +1,22 @@ +/* + This test is specifically focused on the Skills Page tested for an authenticated user. + This test checks for major functions like: + Page Title, + Top Level Tag text, + Adding a Tag Functionality + + + + */ + +describe("Authenticated user tests the Add Skills without adding an Affinity Group", () => { + it("Should test Add Skills Form for authenticated user", () => { + // login user with the "authenticated" role + + cy.loginAs("authenticated@amptesting.com", "6%l7iF}6(4tI"); + cy.visit("/community-persona/add-skill"); + + //Adding Tag + cy.contains("access-acount").click(); + }); +}); diff --git a/tests/cypress/cypress/e2e/accessmatch/cssn/cssn-form.cy.js b/tests/cypress/cypress/e2e/accessmatch/cssn/cssn-form.cy.js new file mode 100644 index 000000000..134360ea6 --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/cssn/cssn-form.cy.js @@ -0,0 +1,30 @@ +/* + This test is specifically focused on the CSSN form page tested for an authenticated user. + This test checks for major functions like: + Page Title, + Header text, + Form Functionality + +*/ + +describe("Authenticated user tests the CSSN Page", () => { + it("Should test CSSN page for authenticated user", () => { + // login user with the "authenticated" role + cy.loginAs("pecan@pie.org", "Pecan"); + cy.visit("/form/join-the-cssn-network"); + + //Page Title + cy.get(".page-title").contains("Join the CSSN Network"); + + //Selecting a CSSN Role + cy.get("#edit-i-am-joining-as-a-general-member").click(); + + //Submit Button and Submission confirmation + cy.get("#edit-actions-submit").click(); + cy.get(".messages--status").contains( + "Thanks for updating your CSSN membership." + ); + + //Testing role update in Community Persona Page? + }); +}); diff --git a/tests/cypress/cypress/e2e/accessmatch/events/events-add.cy.js b/tests/cypress/cypress/e2e/accessmatch/events/events-add.cy.js new file mode 100644 index 000000000..04adfa654 --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/events/events-add.cy.js @@ -0,0 +1,66 @@ +/* + This test is specifically focused on the Events form tested for an authenticated user. + This test checks for major functions like: + Page Title, + Header text, + Form Functionality + + + // cy.get("#edit-field-affinity-group-node-0-target-id").type( + // "Access Support Testing (413)" + // ); +*/ + +describe("Authenticated user tests the Events Form without Affinity Group", () => { + it("Should test Events Form for authenticated user", () => { + // login user with the "authenticated" role + cy.loginAs("administrator@amptesting.com", "b8QW]X9h7#5n"); + cy.visit("/events/add"); + + //Page Title + cy.get("#block-claro-page-title").contains("Create ACCESS Event"); + + //User filling out form title + cy.get("#edit-title-0-value").type("example-event"); + + //Date and Time of Event + cy.get("#edit-recur-type-custom").click(); + cy.get("#custom-date-values > thead > tr > .field-label").contains( + "Custom Date(s) and Time(s)" + ); + cy.get("#edit-custom-date-0-value-date").type("2026-12-12"); + cy.get("#edit-custom-date-0-end-value-date").type("2027-12-12"); + cy.get("#edit-custom-date-0-value-time").type("04:30:00"); + cy.get("#edit-custom-date-0-end-value-time").type("04:30:00"); + + //Event Location + cy.get("#edit-field-location-0-value").type("Zoom"); + + //Event Contact + cy.get("#edit-field-contact-0-value").type("Pecan Pie"); + + //Registration Link + cy.get("#edit-field-registration-0-uri").type( + "https://test-accessmatch.pantheonsite.io/" + ); + + //Event Tag + cy.get("#edit-field-tags-0-target-id").type("login (682)"); + + //Save As Selection + cy.get("#edit-moderation-state-0-state").select("Published"); + + //Event Type + cy.get("#edit-field-event-type").select("Training"); + + //Event Affiliation + cy.get("#edit-field-affiliation").select("Community"); + + //Event Skill Level + cy.get("#edit-field-skill-level").select("Advanced"); + + //Form Submit Button and confirmation + cy.get("#edit-submit").click(); + cy.contains("Successfully saved the example-event event series"); + }); +}); diff --git a/tests/cypress/cypress/e2e/accessmatch/events/events-page.cy.js b/tests/cypress/cypress/e2e/accessmatch/events/events-page.cy.js new file mode 100644 index 000000000..e36d1949e --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/events/events-page.cy.js @@ -0,0 +1,66 @@ +/* + This test is specifically focused on the Events page tested for an unauthenticated user. + This test checks for major functions like: + Filter Functionality, + Headers, + Testing created event + + Test breadcrumbs + +*/ +describe("Unauthenticated user tests the Events Page", () => { + it("Should test the EVents page for unauthenticated user", () => { + cy.visit("/events"); + + //Page title and column headers + cy.get(".page-title").contains("Events & Trainings"); + cy.get("#view-title-2-table-column").contains("Title"); + cy.get("#view-date-value-1-table-column").contains("Event Date"); + cy.get("#view-body-format-table-column").contains("Description"); + + //Filter feature + cy.get("#edit-field-affiliation-value--2").select("Community"); //Affiliation field + cy.get("#edit-field-event-type-value--2").select("Training"); //Event Type + cy.get("#edit-tid--2").select("login"); //Tag field + cy.get("#edit-field-skill-level-value--2").select("Advanced"); //Skill Level + cy.get("#edit-submit-recurring-events-event-instances--2").click(); //Submit button + + //Testing Cypress Created Event + //Event Title + cy.get("tbody > tr > .views-field-title-2") + .contains("example-event") + .click(); + cy.get(".page-title > .field").contains("example-event"); + + //Event Date + cy.get(".field--name-date").contains("Event Date"); + cy.get(".field--name-date").contains( + "12/12/26" + ); + + //Event Location + cy.get(".field--name-location").contains("Location"); + cy.get(".field--name-location").contains("Zoom"); + + //Event Tags + cy.get(".field--name-tags").contains("Tags"); + cy.get(".field--name-tags").contains("login"); + + //Event Contact + cy.get(".field--name-contact").contains("Contact"); + cy.get(".field--name-contact").contains("Pecan Pie"); + + //Registration Button Not sure how to correctly reference the btn + cy.get(".field--name-registration").contains("Registration"); + cy.get(".field--name-registration").contains("Register here") + .should("have.attr", "href"); + + //Event Skill Level + cy.get(".field--name-skill-level").contains("Skill Level"); + cy.get(".field--name-skill-level").contains("Advanced"); + + //Event Type + cy.get(".field--name-event-type").contains("Event Type"); + cy.get(".field--name-event-type").contains("Training"); + }); +}); From 8c578be2115939e937175e16945796de5b9500a5 Mon Sep 17 00:00:00 2001 From: Hannah L Cameron Date: Wed, 15 Nov 2023 15:40:51 -0500 Subject: [PATCH 3/7] Redo of Cypress-hannah-23 --- .../knowledge-base/ci-link-indie-auth.cy.js | 43 ++++++++ .../accessmatch/knowledge-base/ci-link.cy.js | 50 +++++++++ .../accessmatch/knowledge-base/ci-links.cy.js | 44 ++++++++ .../match-plus-engagement-form.cy.js | 37 +++++++ .../match-premier-engagement-form.cy.js | 37 +++++++ .../e2e/accessmatch/tools/ondemand.cy.js | 34 ++++++ .../e2e/accessmatch/tools/pegasus.cy.js | 39 +++++++ .../e2e/accessmatch/tools/tools-page.cy.js | 32 ++++++ .../cypress/e2e/accessmatch/tools/xdmod.cy.js | 46 ++++++++ .../webforms/admin-create-ci-link.cy.js | 104 ++++++++++++------ 10 files changed, 431 insertions(+), 35 deletions(-) create mode 100644 tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-link-indie-auth.cy.js create mode 100644 tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-link.cy.js create mode 100644 tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links.cy.js create mode 100644 tests/cypress/cypress/e2e/accessmatch/match-services/match-plus-engagement-form.cy.js create mode 100644 tests/cypress/cypress/e2e/accessmatch/match-services/match-premier-engagement-form.cy.js create mode 100644 tests/cypress/cypress/e2e/accessmatch/tools/ondemand.cy.js create mode 100644 tests/cypress/cypress/e2e/accessmatch/tools/pegasus.cy.js create mode 100644 tests/cypress/cypress/e2e/accessmatch/tools/tools-page.cy.js create mode 100644 tests/cypress/cypress/e2e/accessmatch/tools/xdmod.cy.js diff --git a/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-link-indie-auth.cy.js b/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-link-indie-auth.cy.js new file mode 100644 index 000000000..0d4f2da3f --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-link-indie-auth.cy.js @@ -0,0 +1,43 @@ +// +// As an authenticated user, verify auth features for the ci link "cypress-ci-link-for-testing" +// +describe("Authenticated user tests a ci link", () => { + it("verify auth features of a ci link", () => { + // first create a dummy ci-links so can reference one of them in the AG. + create_dummy_ci_link(); + // login user with the "authenticated" role + cy.loginAs("authenticated@amptesting.com", "6%l7iF}6(4tI"); + //Navigating to cypress created ci link + cy.visit("/knowledge-base/ci-links"); + cy.get('[headers="view-webform-submission-value-5-table-column"] > a') + .contains("dummy-ci-link-for-testing-knowledge-base") + .click() + .then(() => { + // cy.get(":nth-child(2) > .views-field-webform-submission-value-5 > a") + // .contains("dummy-ci-link-for-testing-knowledge-base") + // .click(); + //Vote feature + //cy.get(".flag > .flex > .me-2").click(); + //cy.contains("Thanks! Your vote has been recorded."); + //Flag Feature.When one of the selections in the dropdown is clicked I am brough to an access denied page. Section is disabled for now + cy.contains("Flag this CI Link").click(); + cy.get(".dropdown-menu").contains("Flag this item not useful"); + }); + }); +}); +// helper function to create a ci-link +function create_dummy_ci_link() { + cy.loginAs("administrator@amptesting.com", "b8QW]X9h7#5n"); + cy.visit("/form/ci-link"); + cy.get("#edit-approved").check(); + cy.get("#edit-title").type("dummy-ci-link-for-testing-knowledge-base"); + cy.get("#edit-category").select("Learning"); + cy.get("#edit-skill-level-304").check(); // beginner level + cy.get("#edit-description").type( + "Dummy description for ci-link 'dummy-ci-link-for-testing-knowledge-base'" + ); + // tag "access-acount" is selected + cy.get(".tags").contains("access-acount").click(); + cy.get("#edit-submit").click(); + cy.drupalLogout(); +} diff --git a/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-link.cy.js b/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-link.cy.js new file mode 100644 index 000000000..213b700da --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-link.cy.js @@ -0,0 +1,50 @@ +/* + This test is specifically focused on an individual CI Links page tested for an unauthenticated user. + This test checks for major functions like: + CI link title, + CI link description, + Attached Affinity Group, + Tags, + User engagement information ("0 People found this useful"), + CI link category, + CI link Skill Level, + verifying images and links load in, + and "Login to vote" functionality +*/ +describe("Unauthenticated user tests the Individual CI Link Page", () => { + it("Should test Individual CI Link page for unauthenticated user", () => { + //Naviagting To Indie CI Link + cy.visit("/knowledge-base/ci-links"); + cy.contains("dummy-ci-link-for-testing-knowledge-base") + .click() + .then(() => { + //CI Link Title + cy.get(".page-title").contains( + "dummy-ci-link-for-testing-knowledge-base" + ); + //Tags + cy.contains("access-acount"); + //Description + cy.get("p").contains( + "Dummy description for ci-link 'dummy-ci-link-for-testing-knowledge-base'" + ); + //CI Link Category and Skill Level + cy.get(".grid-cols-1 > :nth-child(2) > .grid > :nth-child(1)").contains( + "Category" + ); + cy.get(".grid-cols-1 > :nth-child(2) > .grid > :nth-child(1)").contains( + "learning" + ); + cy.get(".grid-cols-1 > :nth-child(2) > .grid > :nth-child(2)").contains( + "Skill Level" + ); + //Vote Section + cy.get(".bg-light-teal").contains("found this useful"); + //cy.get('.bg-light-teal').contains("Login to vote").click(); + cy.get(".bg-light-teal") + .contains("Login to vote") + .should("have.attr", "href") + .and("contain", "/user/login?destination=/knowledge-base/ci-links"); + }); + }); +}); diff --git a/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links.cy.js b/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links.cy.js new file mode 100644 index 000000000..fc46e467f --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links.cy.js @@ -0,0 +1,44 @@ +/* + This test is specifically focused on the CI Links page tested for an unauthenticated user. + This test checks for major functions like: + Search Bar Functionality, + Radio Button Functionality, + Headers, + Sorting function, + Verifying links load in, + And CI Links go to the correct page +*/ +describe("Unauthenticated user tests the CI Links Page", () => { + it("Should test the CI Links page for unauthenticated user", () => { + cy.visit("/knowledge-base/ci-links"); + //Testing Column Headers + cy.contains("Votes"); + cy.contains("Title"); + cy.contains("Description"); + cy.contains("Category"); + cy.contains("Tags"); + cy.contains("Skill Level"); + cy.contains("Affinity Group"); + cy.contains("Category"); + //Skill Level Filter Option + cy.get(".js-form-item-skill-level-306").contains("Advanced").click(); + cy.get(".alert").contains( + "There are no CI Links at this time. Please check back often as CI Links are added regularly." + ); + + cy.visit("/knowledge-base/ci-links"); + + //Searching for Cypress Created CI Link + cy.get("#edit-search--2").type("dummy-ci-link-for-testing-knowledge-base"); + cy.get("tbody > :nth-child(1) > .views-field-webform-submission-value-5") + .find("a") + .contains("dummy-ci-link-for-testing-knowledge-base") + .click() + .then(() => { + cy.get(".page-title").contains( + "dummy-ci-link-for-testing-knowledge-base" + ); + }); + // }); + }); +}); diff --git a/tests/cypress/cypress/e2e/accessmatch/match-services/match-plus-engagement-form.cy.js b/tests/cypress/cypress/e2e/accessmatch/match-services/match-plus-engagement-form.cy.js new file mode 100644 index 000000000..b29da4721 --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/match-services/match-plus-engagement-form.cy.js @@ -0,0 +1,37 @@ +/* + This test is specifically focused on the MATCH+ Engagement form tested for an authenticated user. + This test checks for major functions like: + Page Title, + Header text, + Form Functionality + +*/ + +describe("Authenticated user tests the MATCH+ Engagement Form", () => { + it("Should test MATCH+ Engagement Form for authenticated user", () => { + // login user with the "authenticated" role + cy.loginAs("pecan@pie.org", "Pecan"); + cy.visit("/node/add/match_engagement?type=plus"); + + //Title Field + cy.get("#edit-title-0-value").type("http://example-0.com"); + + //Institution Field + cy.get("#edit-field-institution-0-value").type("Example University"); + + //Description field does not actually type anything in (Below two lines are for the description field) + // cy.get("p").type("Testing"); + // cy.get(".ck-editor__main > .ck").type("Testing"); + + //Trouble with selecting tags setcion + //cy.get("#edit-field-tags-wrapper").click(); + //cy.get("Login").click(); + //cy.get("#edit-title-0-value").type("http://example-0.com"); + + //Preffered Semester Field + cy.get('[name="field_preferred_semester"]').select("Summer"); + + //Save As Field + cy.get('[name="moderation_state[0][state]"]').select("Submitted"); + }); +}); diff --git a/tests/cypress/cypress/e2e/accessmatch/match-services/match-premier-engagement-form.cy.js b/tests/cypress/cypress/e2e/accessmatch/match-services/match-premier-engagement-form.cy.js new file mode 100644 index 000000000..3cb653402 --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/match-services/match-premier-engagement-form.cy.js @@ -0,0 +1,37 @@ +/* + This test is specifically focused on the MATCH Premier Engagement form tested for an authenticated user. + This test checks for major functions like: + Page Title, + Header text, + Form Functionality + +*/ + +describe("Authenticated user tests the MATCH Premier Engagement Form", () => { + it("Should test MATCH Premier Engagement Form for authenticated user", () => { + // login user with the "authenticated" role + cy.loginAs("pecan@pie.org", "Pecan"); + cy.visit("/node/add/match_engagement?type=premier"); + + //Title Field + cy.get("#edit-title-0-value").type("http://example-0.com"); + + //Institution Field + cy.get("#edit-field-institution-0-value").type("Example University"); + + //Description field does not actually type anything in (Below two lines are for the description field) + // cy.get("p").type("Testing"); + // cy.get(".ck-editor__main > .ck").type("Testing"); + + //Trouble with selecting tags setcion + //cy.get("#edit-field-tags-wrapper").click(); + //cy.get("Login").click(); + //cy.get("#edit-title-0-value").type("http://example-0.com"); + + //Preffered Semester Field + cy.get('[name="field_preferred_semester"]').select("Summer"); + + //Save As Field + cy.get('[name="moderation_state[0][state]"]').select("Submitted"); + }); +}); diff --git a/tests/cypress/cypress/e2e/accessmatch/tools/ondemand.cy.js b/tests/cypress/cypress/e2e/accessmatch/tools/ondemand.cy.js new file mode 100644 index 000000000..fa9ec4b73 --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/tools/ondemand.cy.js @@ -0,0 +1,34 @@ +/* + This test is specifically focused on the OnDemand page tested for an unauthenticated user. + This test checks for major functions like: + Headers, + Text, + +*/ +describe("Unauthenticated user tests the OnDemand Page", () => { + it("Should test the OnDemand page for unauthenticated user", () => { + cy.visit("/tools/ondemand"); + + //Page Introduction paragraph + cy.get("#about > .prose").contains( + "Open OnDemand is an easy-to-use web portal that is being deployed on ACCESS" + ); + cy.get("#about > .grid > :nth-child(1) > :nth-child(2)").contains( + "Zero installation" + ); + cy.get("#about > .grid > :nth-child(1) > :nth-child(2)").contains( + "Run entirely in your browser." + ); + + //Accordion title and functionality + cy.get("#ondemand-faq > .colored-square").contains("ACCESS OnDemand FAQ"); + cy.get("#ondemand-faq") + .contains( + "What is the difference between ACCESS OnDemand and Open OnDemand?" + ) + .click(); + cy.get('[style=""] > .bg-white').contains( + "ACCESS OnDemand is a standardized instance of Open OnDemand" + ); + }); +}); diff --git a/tests/cypress/cypress/e2e/accessmatch/tools/pegasus.cy.js b/tests/cypress/cypress/e2e/accessmatch/tools/pegasus.cy.js new file mode 100644 index 000000000..081c145d1 --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/tools/pegasus.cy.js @@ -0,0 +1,39 @@ +/* + This test is specifically focused on the Pegasus page tested for an unauthenticated user. + This test checks for major functions like: + Accordion Functionality, + Headers, + +*/ +describe("Unauthenticated user tests the Pegaus Page", () => { + it("Should test the Pegasus page for unauthenticated user", () => { + cy.visit("/tools/pegasus"); + + //Page intro paragraph + cy.get("#about > .prose").contains( + "Construct, run, and debug workflows from a Jupyter Notebook." + ); + + //Accordion Functionality + cy.get(":nth-child(2) > .bg-light-teal") + .contains("Why use workflows") + .click(); + cy.get('[open=""] > .bg-white > :nth-child(1) > :nth-child(1)').contains( + "Scientific Workflow Management Systems (WMS) such as Pegasus are vital tools for scientists and researchers in a wide range of fields." + ); + cy.get('[open=""] > .bg-white > :nth-child(1) > :nth-child(1)').contains( + "Some reasons you should consider using a system like Pegasus WMS" + ); + + //Workflow section + cy.get(":nth-child(1) > .grid > :nth-child(2) > .mb-0").contains( + "REPRODUCIBILITY" + ); + cy.get(":nth-child(1) > .grid > :nth-child(4) > .mb-0").contains( + "AUTOMATION" + ); + cy.get(":nth-child(1) > .grid > :nth-child(6) > .mb-0").contains( + "SCALABILITY" + ); + }); +}); diff --git a/tests/cypress/cypress/e2e/accessmatch/tools/tools-page.cy.js b/tests/cypress/cypress/e2e/accessmatch/tools/tools-page.cy.js new file mode 100644 index 000000000..74a67b199 --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/tools/tools-page.cy.js @@ -0,0 +1,32 @@ +/* + This test is specifically focused on the Tools overview page tested for an unauthenticated user. + This test checks for major functions like: + Page Title, + Page Intro, + and testing one tool + +*/ + +describe("Unauthenticated user tests the Tools overview Page", () => { + it("Should test Tools overview page for unauthenticated user", () => { + cy.visit("/tools/overview"); + + //Page Title And Intro Paragraph + cy.get(".page-title").contains("Tools"); + cy.get(".clearfix > .prose").contains( + "Try these cutting-edge tools designed to streamline your time to science." + ); + + //Testing OnDeman Tool Row + cy.get(":nth-child(3) > p").contains( + "Utilize remote computing resources easily from any device." + ); + cy.get(".clearfix > .grid > :nth-child(4)").contains( + "Remote access web portal" + ); + + //Testing Find Out More btn for OnDemand Row + cy.get(":nth-child(3) > div > .btn").contains("FIND OUT MORE").click(); + cy.contains("ACCESS OnDemand"); + }); +}); diff --git a/tests/cypress/cypress/e2e/accessmatch/tools/xdmod.cy.js b/tests/cypress/cypress/e2e/accessmatch/tools/xdmod.cy.js new file mode 100644 index 000000000..2c505367c --- /dev/null +++ b/tests/cypress/cypress/e2e/accessmatch/tools/xdmod.cy.js @@ -0,0 +1,46 @@ +/* + This test is specifically focused on the XDMoD page tested for an unauthenticated user. + This test checks for major functions like: + Page Title, + Testing accordion function, + + + View information about allocations, usage data, and usage, as well as specific information about your usage and general historic usage of the ACCESS allocated resources. +*/ + +describe("Unauthenticated user tests the XDMoD Page", () => { + it("Should test XDMoD page for unauthenticated user", () => { + cy.visit("/tools/xdmod"); + + //Page Title and Intro paragraph + cy.get(".prose > .text-white").contains( + "Analyze and improve your allocation usage" + ); + + cy.contains("View information about allocations, usage data and usage"); + + //Checkpoint section + cy.get("#about > .grid > :nth-child(1)").contains( + "Optimize job efficiency" + ); + cy.get("#about > .grid > :nth-child(1)").contains( + "View information about active and expired allocations." + ); + + //Accordion section and function + cy.get("#using-xdmod > .colored-square").contains("Using XDMoD"); + cy.get(":nth-child(3) > .bg-light-teal") + .contains("What do I need to do to start using XDMoD?") + .click(); + cy.get('[open=""] > .bg-white').contains( + "Anyone with an ACCESS Identity can login to XDMoD. " + ); + + //XDMOD Support Section The below five lines do not work for now + // cy.get(".container > .colored-square").contains("XDMoD Support"); + // cy.get('.grid > [href="https://xdmod.access-ci.org"]') + // .contains("Launch XDMoD") + // .should("have.attr", "href") + // .and("contain", "https://xdmod.access-ci.org/"); + }); +}); diff --git a/tests/cypress/cypress/e2e/accessmatch/webforms/admin-create-ci-link.cy.js b/tests/cypress/cypress/e2e/accessmatch/webforms/admin-create-ci-link.cy.js index 461c5399d..1e963c65b 100644 --- a/tests/cypress/cypress/e2e/accessmatch/webforms/admin-create-ci-link.cy.js +++ b/tests/cypress/cypress/e2e/accessmatch/webforms/admin-create-ci-link.cy.js @@ -1,58 +1,92 @@ // // As an admin user, create a test CI-Link called "cypress-ci-link-for-testing" // -describe('Admin user uses form to create a CI Link', () => { - it('should create a CI-Link', () => { - +describe("Admin user uses form to create a CI Link", () => { + it("should create a CI-Link", () => { // login user with the "administrator" role - cy.loginAs('administrator@amptesting.com', 'b8QW]X9h7#5n'); - cy.visit('/form/ci-link'); - cy.contains(' CI Link '); - cy.task('log', 'logged in as administrator, on add ci-link form'); + cy.loginAs("administrator@amptesting.com", "b8QW]X9h7#5n"); + cy.visit("/form/ci-link"); + cy.contains(" CI Link "); + cy.task("log", "logged in as Apple Pie, on add ci-link form"); // cy.contains('Edit Affinity Group ACCESS Support'); - cy.get('#edit-approved').check(); - cy.get('#edit-title').type('cypress-ci-link-for-testing'); - cy.get('#edit-category').select('Learning'); - cy.get('#edit-skill-level-304').check(); // beginner level - cy.get('#edit-skill-level-305').check(); // intermediate level - cy.get('#edit-description').type("Dummy description for ci-link 'cypress-ci-link-for-testing'"); + cy.get("#edit-approved").check(); + cy.get("#edit-title").type("cypress-ci-link-for-testing"); + cy.get("#edit-category").select("Learning"); + cy.get("#edit-skill-level-304").check(); // beginner level + cy.get("#edit-skill-level-305").check(); // intermediate level + cy.get("#edit-description").type( + "Dummy description for ci-link 'cypress-ci-link-for-testing'" + ); // add title & url for a link - cy.get('#edit-link-to-resource-items-0-item-title').type('title for ci-link link 0'); - cy.get('#edit-link-to-resource-items-0-item-url').type('http://example-0.com'); + cy.get("#edit-link-to-resource-items-0-item-title").type( + "title for ci-link link 0" + ); + cy.get("#edit-link-to-resource-items-0-item-url").type( + "http://example-0.com" + ); // add 2 addition link options - cy.get('#edit-link-to-resource-add-more-items').type('{selectall}{backspace}').type('2') - cy.get('#edit-link-to-resource-add-submit').click(); + cy.get("#edit-link-to-resource-add-more-items") + .type("{selectall}{backspace}") + .type("2"); + cy.get("#edit-link-to-resource-add-submit").click(); - // add the 2 links - cy.get('input[id^="edit-link-to-resource-items-1-item-title"]').type('title for ci-link link 1'); - cy.get('input[name="link_to_resource[items][1][_item_][url]"]').type('http://example-1.com'); - cy.get('input[name="link_to_resource[items][2][_item_][title]"').type('title for ci-link link 2'); - cy.get('input[name="link_to_resource[items][2][_item_][url]"]').type('http://example-2.com'); + // // add the 2 links + cy.get('input[id^="edit-link-to-resource-items-1-item-title"]').type( + "title for ci-link link 1" + ); + cy.get('input[name="link_to_resource[items][1][_item_][url]"]').type( + "http://example-1.com" + ); + cy.get('input[name="link_to_resource[items][2][_item_][title]"').type( + "title for ci-link link 2" + ); + cy.get('input[name="link_to_resource[items][2][_item_][url]"]').type( + "http://example-2.com" + ); - // tag "access-account" is selected - cy.get('.view-node-add-tags').contains('access-account').click(); + // tag "access-acount" is selected + cy.get('span[data-tid="733"]').click(); // tag "finite-element-analysis" is selected - cy.get('.view-node-add-tags').contains('finite-element-analysis').click(); + cy.get('span[data-tid="588"]').click(); // submit - cy.get('#edit-submit').click(); + cy.get("#edit-submit").click(); // cy.visit('/webform/ci-link/submissions/1/edit'); // verify submission looks good - cy.contains('cypress-ci-link-for-testing'); + cy.contains("cypress-ci-link-for-testing"); cy.contains("Dummy description for ci-link 'cypress-ci-link-for-testing'"); - cy.contains('title for ci-link link 0').should('have.attr', 'href', 'http://example-0.com'); - cy.contains('title for ci-link link 1').should('have.attr', 'href', 'http://example-1.com'); - cy.contains('title for ci-link link 2').should('have.attr', 'href', 'http://example-2.com'); - cy.contains('access-account').should('have.attr', 'href').and('contains', '/tags/access-account'); - cy.contains('finite-element-analysis').should('have.attr', 'href').and('contains', '/tags/finite-element-analysis'); - cy.contains('Beginner').should('have.attr', 'href').and('contains', '/skill-level/beginner');; - cy.contains('Intermediate').should('have.attr', 'href').and('contains', '/skill-level/intermediate');; - + cy.contains("title for ci-link link 0").should( + "have.attr", + "href", + "http://example-0.com" + ); + cy.contains("title for ci-link link 1").should( + "have.attr", + "href", + "http://example-1.com" + ); + cy.contains("title for ci-link link 2").should( + "have.attr", + "href", + "http://example-2.com" + ); + cy.contains("access-acount") + .should("have.attr", "href") + .and("contains", "/tags/access-acount"); + cy.contains("finite-element-analysis") + .should("have.attr", "href") + .and("contains", "/tags/finite-element-analysis"); + cy.contains("Beginner") + .should("have.attr", "href") + .and("contains", "/skill-level/beginner"); + cy.contains("Intermediate") + .should("have.attr", "href") + .and("contains", "/skill-level/intermediate"); }); }); From a4d9527c024742d91a87a21ebc97305515de4a20 Mon Sep 17 00:00:00 2001 From: Jasper Lieber Date: Wed, 15 Nov 2023 12:57:53 -0800 Subject: [PATCH 4/7] moving ci-link tests to own folder --- .../{ => ci-links}/ci-link-indie-auth.cy.js | 0 .../knowledge-base/{ => ci-links}/ci-link.cy.js | 2 +- .../knowledge-base/{ => ci-links}/ci-links.cy.js | 9 +-------- 3 files changed, 2 insertions(+), 9 deletions(-) rename tests/cypress/cypress/e2e/accessmatch/knowledge-base/{ => ci-links}/ci-link-indie-auth.cy.js (100%) rename tests/cypress/cypress/e2e/accessmatch/knowledge-base/{ => ci-links}/ci-link.cy.js (97%) rename tests/cypress/cypress/e2e/accessmatch/knowledge-base/{ => ci-links}/ci-links.cy.js (88%) diff --git a/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-link-indie-auth.cy.js b/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links/ci-link-indie-auth.cy.js similarity index 100% rename from tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-link-indie-auth.cy.js rename to tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links/ci-link-indie-auth.cy.js diff --git a/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-link.cy.js b/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links/ci-link.cy.js similarity index 97% rename from tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-link.cy.js rename to tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links/ci-link.cy.js index 213b700da..c63532c77 100644 --- a/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-link.cy.js +++ b/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links/ci-link.cy.js @@ -23,7 +23,7 @@ describe("Unauthenticated user tests the Individual CI Link Page", () => { "dummy-ci-link-for-testing-knowledge-base" ); //Tags - cy.contains("access-acount"); + cy.contains("access-account"); //Description cy.get("p").contains( "Dummy description for ci-link 'dummy-ci-link-for-testing-knowledge-base'" diff --git a/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links.cy.js b/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links/ci-links.cy.js similarity index 88% rename from tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links.cy.js rename to tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links/ci-links.cy.js index fc46e467f..27c0189d9 100644 --- a/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links.cy.js +++ b/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links/ci-links.cy.js @@ -31,14 +31,7 @@ describe("Unauthenticated user tests the CI Links Page", () => { //Searching for Cypress Created CI Link cy.get("#edit-search--2").type("dummy-ci-link-for-testing-knowledge-base"); cy.get("tbody > :nth-child(1) > .views-field-webform-submission-value-5") - .find("a") .contains("dummy-ci-link-for-testing-knowledge-base") - .click() - .then(() => { - cy.get(".page-title").contains( - "dummy-ci-link-for-testing-knowledge-base" - ); - }); - // }); + .should("have.attr", "href"); }); }); From 2585a1031302d5f9e0ba3589496acbe81a1ac4f9 Mon Sep 17 00:00:00 2001 From: Jasper Lieber Date: Wed, 15 Nov 2023 13:59:38 -0800 Subject: [PATCH 5/7] tweak --- .../cypress/e2e/accessmatch/community-persona/add-skills.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cypress/cypress/e2e/accessmatch/community-persona/add-skills.cy.js b/tests/cypress/cypress/e2e/accessmatch/community-persona/add-skills.cy.js index eb752ee63..3ce3aaf45 100644 --- a/tests/cypress/cypress/e2e/accessmatch/community-persona/add-skills.cy.js +++ b/tests/cypress/cypress/e2e/accessmatch/community-persona/add-skills.cy.js @@ -17,6 +17,6 @@ describe("Authenticated user tests the Add Skills without adding an Affinity Gro cy.visit("/community-persona/add-skill"); //Adding Tag - cy.contains("access-acount").click(); + cy.contains("access-account").click(); }); }); From 5ab80ac66dba5203ae971a5644c2206f6b6dafe5 Mon Sep 17 00:00:00 2001 From: Jasper Lieber Date: Wed, 15 Nov 2023 14:28:14 -0800 Subject: [PATCH 6/7] tweaks --- .../ag-individual-group-admin.cy.js | 2 +- .../ci-links/ci-link-indie-auth.cy.js | 4 ++-- .../e2e/accessmatch/tags/tag-individual.cy.js | 17 ++++++++--------- .../cypress/e2e/accessmatch/tools/xdmod.cy.js | 2 +- .../webforms/admin-create-ci-link.cy.js | 6 +++--- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/tests/cypress/cypress/e2e/accessmatch/affinity-groups/ag-individual-group-admin.cy.js b/tests/cypress/cypress/e2e/accessmatch/affinity-groups/ag-individual-group-admin.cy.js index c782b29cd..8865ba4fc 100644 --- a/tests/cypress/cypress/e2e/accessmatch/affinity-groups/ag-individual-group-admin.cy.js +++ b/tests/cypress/cypress/e2e/accessmatch/affinity-groups/ag-individual-group-admin.cy.js @@ -76,7 +76,7 @@ function create_dummy_ci_link() { cy.get('#edit-category').select('Learning'); cy.get('#edit-skill-level-304').check(); // beginner level cy.get('#edit-description').type("Dummy description for ci-link 'access-support-ci-link-for-testing'"); - // tag "access-acount" is selected + // tag "access-account" is selected cy.get('span[data-tid="733"]').click(); cy.get('#edit-submit').click(); } diff --git a/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links/ci-link-indie-auth.cy.js b/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links/ci-link-indie-auth.cy.js index 0d4f2da3f..4fba2b086 100644 --- a/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links/ci-link-indie-auth.cy.js +++ b/tests/cypress/cypress/e2e/accessmatch/knowledge-base/ci-links/ci-link-indie-auth.cy.js @@ -36,8 +36,8 @@ function create_dummy_ci_link() { cy.get("#edit-description").type( "Dummy description for ci-link 'dummy-ci-link-for-testing-knowledge-base'" ); - // tag "access-acount" is selected - cy.get(".tags").contains("access-acount").click(); + // tag "access-account" is selected + cy.get(".tags").contains("access-account").click(); cy.get("#edit-submit").click(); cy.drupalLogout(); } diff --git a/tests/cypress/cypress/e2e/accessmatch/tags/tag-individual.cy.js b/tests/cypress/cypress/e2e/accessmatch/tags/tag-individual.cy.js index d044fb386..9788dac8f 100644 --- a/tests/cypress/cypress/e2e/accessmatch/tags/tag-individual.cy.js +++ b/tests/cypress/cypress/e2e/accessmatch/tags/tag-individual.cy.js @@ -6,13 +6,13 @@ describe("Verify the the community-outreach tag page", () => { cy.visit("/tags/community-outreach"); - checkTitleAndBreadcrumbs(); - checkSectionAffinityGroups(); - checkSectionAnnouncementsEvents('.view-id-tagged_news_block', '/announcements/'); - checkSectionAnnouncementsEvents('.view-id-recurring_events_event_instances', '/events/'); + // checkTitleAndBreadcrumbs(); + // checkSectionAffinityGroups(); + // checkSectionAnnouncementsEvents('.view-id-tagged_news_block', '/announcements/'); + // checkSectionAnnouncementsEvents('.view-id-recurring_events_event_instances', '/events/'); checkSectionInterestedSkilled('.view-people-with-expertise-tags', 'expertise'); checkSectionInterestedSkilled('.view-people-with-interest-tags', 'interest'); - checkSectionCILinks(); + // checkSectionCILinks(); ///////////////////////////////////////////////////////////////////////// @@ -54,8 +54,9 @@ describe("Verify the the community-outreach tag page", () => { .find('.flex.square-tags') .find('.d-inline-flex').should('have.length.gt', 0) .each((e) => cy.wrap(e) - .find('a').should('have.attr', 'href') - .and('contain', '/tags/')); + .find('a').should('have.attr', 'href')); + // sometimes contains terms not tags - but can't get regex to work + // .and('contain', /tags|terms/)); }); // check more button @@ -217,7 +218,6 @@ describe("Verify the the community-outreach tag page", () => { break; case 3: // tags - there should be at least one tag, and not more than 3 - // optionally, there may be a more button cy.wrap(cell).find('a').should('have.length.gt', 0); cy.wrap(cell).find('a').should('have.length.lt', 4); cy.wrap(cell).find('a').each((a) => @@ -250,7 +250,6 @@ describe("Verify the the community-outreach tag page", () => { cy.get('#edit-category').select('Learning'); cy.get('#edit-skill-level-304').check(); // beginner level cy.get('#edit-description').type("Dummy description for ci-link 'dummy-ci-link-for-testing-community-outreach-tag'"); - // tag "access-acount" is selected cy.get('.tags').contains('community-outreach').click(); cy.get('#edit-submit').click(); } diff --git a/tests/cypress/cypress/e2e/accessmatch/tools/xdmod.cy.js b/tests/cypress/cypress/e2e/accessmatch/tools/xdmod.cy.js index 2c505367c..48b694975 100644 --- a/tests/cypress/cypress/e2e/accessmatch/tools/xdmod.cy.js +++ b/tests/cypress/cypress/e2e/accessmatch/tools/xdmod.cy.js @@ -17,7 +17,7 @@ describe("Unauthenticated user tests the XDMoD Page", () => { "Analyze and improve your allocation usage" ); - cy.contains("View information about allocations, usage data and usage"); + cy.contains("View information about allocations, usage data, and usage"); //Checkpoint section cy.get("#about > .grid > :nth-child(1)").contains( diff --git a/tests/cypress/cypress/e2e/accessmatch/webforms/admin-create-ci-link.cy.js b/tests/cypress/cypress/e2e/accessmatch/webforms/admin-create-ci-link.cy.js index 1e963c65b..e0bad1e33 100644 --- a/tests/cypress/cypress/e2e/accessmatch/webforms/admin-create-ci-link.cy.js +++ b/tests/cypress/cypress/e2e/accessmatch/webforms/admin-create-ci-link.cy.js @@ -47,7 +47,7 @@ describe("Admin user uses form to create a CI Link", () => { "http://example-2.com" ); - // tag "access-acount" is selected + // tag "access-account" is selected cy.get('span[data-tid="733"]').click(); // tag "finite-element-analysis" is selected @@ -76,9 +76,9 @@ describe("Admin user uses form to create a CI Link", () => { "href", "http://example-2.com" ); - cy.contains("access-acount") + cy.contains("access-account") .should("have.attr", "href") - .and("contains", "/tags/access-acount"); + .and("contains", "/tags/access-account"); cy.contains("finite-element-analysis") .should("have.attr", "href") .and("contains", "/tags/finite-element-analysis"); From a0b68da8142d45af3e810a7d9aea6ad102c6445c Mon Sep 17 00:00:00 2001 From: Jasper Lieber Date: Wed, 15 Nov 2023 14:32:46 -0800 Subject: [PATCH 7/7] tweaks --- .../cypress/e2e/accessmatch/tags/tag-individual.cy.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/cypress/cypress/e2e/accessmatch/tags/tag-individual.cy.js b/tests/cypress/cypress/e2e/accessmatch/tags/tag-individual.cy.js index 9788dac8f..b41bceb8b 100644 --- a/tests/cypress/cypress/e2e/accessmatch/tags/tag-individual.cy.js +++ b/tests/cypress/cypress/e2e/accessmatch/tags/tag-individual.cy.js @@ -6,13 +6,13 @@ describe("Verify the the community-outreach tag page", () => { cy.visit("/tags/community-outreach"); - // checkTitleAndBreadcrumbs(); - // checkSectionAffinityGroups(); - // checkSectionAnnouncementsEvents('.view-id-tagged_news_block', '/announcements/'); - // checkSectionAnnouncementsEvents('.view-id-recurring_events_event_instances', '/events/'); + checkTitleAndBreadcrumbs(); + checkSectionAffinityGroups(); + checkSectionAnnouncementsEvents('.view-id-tagged_news_block', '/announcements/'); + checkSectionAnnouncementsEvents('.view-id-recurring_events_event_instances', '/events/'); checkSectionInterestedSkilled('.view-people-with-expertise-tags', 'expertise'); checkSectionInterestedSkilled('.view-people-with-interest-tags', 'interest'); - // checkSectionCILinks(); + checkSectionCILinks(); /////////////////////////////////////////////////////////////////////////