Skip to content

Commit

Permalink
Merge pull request #1266 from necyberteam/md-dev
Browse files Browse the repository at this point in the history
MD Dev
  • Loading branch information
a-pasquale authored Oct 25, 2024
2 parents 913f761 + a23b0d2 commit a8c0794
Show file tree
Hide file tree
Showing 76 changed files with 6,822 additions and 160 deletions.
1 change: 1 addition & 0 deletions .github/workflows/backupdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
lando drush en amp_dev
lando drush pmu amp_dev
lando drush pmu symfony_mailer
lando drush en symfony_mailer
lando drush cr
lando db-export site.sql
env:
Expand Down
1 change: 0 additions & 1 deletion blt/md/md-1014

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1520

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1831

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1833

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1854

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1864

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1869

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1876

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1887

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1900

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1913

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1934

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1935

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1940

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1941

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1944

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1947

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1957

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-1960

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-2048

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-2049

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-2050

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-2059

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-2066

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-2097

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-2164

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-2166

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-2168

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-2174

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-2178

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion blt/md/md-2183

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion blt/md/md-asptheme

This file was deleted.

1 change: 0 additions & 1 deletion blt/md/md-d8-1503

This file was deleted.

3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@
"oomphinc/composer-installers-extender": true,
"acquia/blt": true,
"phpstan/extension-installer": true,
"php-http/discovery": true
"php-http/discovery": true,
"tbachert/spi": true
}
},
"extra": {
Expand Down
22 changes: 11 additions & 11 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/behat/features/cci/cci-homepage.feature
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Feature: verify specific items on CCI homepage
And I should see "List View"
And I should see "CAREERS Cyberteam"
And I should see "Great Plains Cyberteam"
And I should see "ACCESS Facilitators"
And I should see "People who use or support people who use ACCESS resources and the ACCESS Resource Allocation System."
And I should see "ACCESS Support"
And I should see "Supporting the ACCESS Research Community"
When I click "List View"
Then I should see "Programs"
And I should see "Affinity Groups"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("Unauthenticated user tests the Announcements Page", () => {
.click();
cy.get(".field__item > .font-normal").contains("ai");
cy.get(".field__label").contains("Affiliation");
cy.get(".layout__region--second > .block > .field > .field__item").contains(
cy.get(".layout__region--second").contains(
"Community"
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ describe('Anonymous user visit the community-persona page', () => {
it('should find expected stuff', () => {
anon_cp_redirect_login();
anon_verify_user201_cp();
user200_verify_self_cp();
user200_edit_self();
admin_unedit_user200();
user199_verify_self_cp();
user199_edit_self();
admin_unedit_user199();
});
});

Expand Down Expand Up @@ -60,9 +60,9 @@ function anon_verify_user201_cp() {
}

/**
* user200 user visits their own community-persona page
* user199 user visits their own community-persona page
*/
function user200_verify_self_cp() {
function user199_verify_self_cp() {
cy.loginAs('[email protected]', 'Walnut');

cy.visit('/community-persona');
Expand All @@ -83,7 +83,7 @@ function user200_verify_self_cp() {
$persona.contains('Edit Roles')
.should('have.attr', 'href', "/form/edit-your-cssn-roles?destination=community-persona");
$persona.contains('Edit Persona')
.should('have.attr', 'href', "/user/200/edit?destination=community-persona");
.should('have.attr', 'href', "/user/199/edit?destination=community-persona");
// todo test this page
});

Expand All @@ -100,19 +100,19 @@ function user200_verify_self_cp() {
}

/**
* user200 edits their own community-persona page
* user199 edits their own community-persona page
* and verifies the changes.
*/
function user200_edit_self() {
cy.visit('/user/200/edit?destination=community-persona');
function user199_edit_self() {
cy.visit('/user/199/edit?destination=community-persona');
cy.get('#edit-field-region').contains('Great Plains').click(); // great plains

// if there's a pic or resume, remove them - could be leftover from broken tests.
cy.get('body').then(($body) => {
if ($body.text().includes('edit-user-picture-0-remove-button')) {
if ($body.find("#edit-user-picture-0-remove-button").length > 0) {
cy.get('#edit-user-picture-0-remove-button').click();
}
if ($body.text().includes('edit-field-cv-resume-0-remove-button')) {
if ($body.find("#edit-field-cv-resume-0-remove-button").length > 0) {
cy.get('#edit-field-cv-resume-0-remove-button').click();
}
}).then(() => {
Expand All @@ -135,18 +135,18 @@ function user200_edit_self() {
$persona.get('img').should('have.attr', 'src').should('include', 'eclipse')
$persona.contains('Great Plains');
});
cy.visit('/user/200/edit');
cy.visit('/user/199/edit');
cy.contains('dummy-image');
cy.contains('dummy-resume')
}

/**
* admin user undoes the edits user200 made to their community-persona page
* admin user undoes the edits user199 made to their community-persona page
* and verifies the changes
*/
function admin_unedit_user200() {
function admin_unedit_user199() {
cy.loginAs('[email protected]', 'b8QW]X9h7#5n');
cy.visit('/user/200/edit?destination=community-persona');
cy.visit('/user/199/edit?destination=community-persona');
cy.get('#edit-field-region').contains('Northeast').click();
cy.get('#edit-field-hpc-experience-0-value').clear();
cy.get('#edit-user-picture-0-remove-button').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe("Authenticated user tests the form to join the CSSN", () => {
console.log(el.text())
// test if the text is one of the two possible messages
if (el.text().includes('Thank you for joining the CSSN.')) {
} else if (el.text().includes('Submission updated in CSSN.')) {
} else if (el.text().includes('Submission updated')) {
} else {
throw new Error('Unexpected message: ' + el.text());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Verify the contact form can be used to send an email.
*
*/
describe('user200 visits user201s community-persona page to send email', () => {
describe('user199 visits user201s community-persona page to send email', () => {
it('should find expected stuff', () => {
cy.loginAs('[email protected]', 'Walnut');
cy.visit('/community-persona/201');
Expand Down
16 changes: 13 additions & 3 deletions tests/cypress/cypress/e2e/accessmatch/events/events-add.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,18 @@
*/

describe("Authenticated user tests the Events Form without Affinity Group", () => {
it("Should test Events Form for authenticated user", () => {
it("Should test Events Form for authenticated user",
{
retries: {
runMode: 3,
openMode: 1,
},
},
() => {
// login user with the "authenticated" role
cy.loginAs("[email protected]", "b8QW]X9h7#5n");
cy.visit("/");
cy.get(':nth-child(1) > .views-field-title-2 > .field-content > .block')
cy.visit("/events/add");

// Page Title
Expand Down Expand Up @@ -51,15 +60,16 @@ describe("Authenticated user tests the Events Form without Affinity Group", () =
cy.get("#edit-moderation-state-0-state").select("Published");

//Event Type
cy.get("#edit-field-event-type").select("Training");
cy.get("#edit-field-event-type-training").click();

//Event Affiliation
cy.get("#edit-field-affiliation-community").click();

//Event Skill Level
cy.get("#edit-field-skill-level").select("Advanced");
cy.get("#edit-field-skill-level-advanced").click();

//Form Submit Button and confirmation
cy.config("defaultCommandTimeout", 10000);
cy.get("#edit-submit").click();
cy.contains("Successfully saved the example-event event series");
});
Expand Down
21 changes: 21 additions & 0 deletions tests/cypress/cypress/e2e/accessmatch/events/events-ztest.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
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("[email protected]", "b8QW]X9h7#5n");
cy.visit("/admin/reports/dblog");
cy.get('.admin-dblog').screenshot();
});
});
1 change: 1 addition & 0 deletions tests/cypress/cypress/e2e/accessmatch/find.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ describe("Test of the /find page", () => {
cy.get('.sui-search-box__text-input')
.type('test{enter}');

cy.wait(5000);
cy.get('.btn').contains('Hide Results');
cy.get('.sui-paging-info').contains('Showing');
cy.get('.sui-select').contains('Relevance');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,13 @@ describe("Verify the the community-outreach tag page", () => {
cy.get("#edit-moderation-state-0-state").select("Published");

//Event Type
cy.get("#edit-field-event-type").select("Training");
cy.get("#edit-field-event-type-training").click();

//Event Affiliation
cy.get("#edit-field-affiliation").select("Community");
cy.get("#edit-field-affiliation-community").click();

//Event Skill Level
cy.get("#edit-field-skill-level").select("Advanced");
cy.get("#edit-field-skill-level-advanced").click();

//Form Submit Button and confirmation
cy.get("#edit-submit").click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe("Admin user uses form to create a KB Resource", () => {
);
cy.get('.form-item-tags').contains("ACCESS-account")
.should("have.attr", "href")
.and("contains", "/tags/ACCESS-account");
.and("contains", "/tags/access-account");
cy.get('.form-item-tags').contains("finite-element-analysis")
.should("have.attr", "href")
.and("contains", "/tags/finite-element-analysis");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ describe('Authenticated user fills out the enter ticket form', () => {
cy.get('[name="priority"]').select('Critical');
cy.get('[name="details"]').type('TEST');
// select a couple tags
cy.get('#edit-tags3-733').check();
cy.get('#edit-tags3-690').check();
cy.get('[data-drupal-selector="edit-tags3-733"]').check();
cy.get('[data-drupal-selector="edit-tags3-690"]').check();
cy.contains('Submit').click();
cy.contains('Thank you! Your ticket has been submitted! We\'ll be in touch soon.');
});
Expand Down
Loading

0 comments on commit a8c0794

Please sign in to comment.