Skip to content

Commit

Permalink
Merge pull request #1079 from necyberteam/md-dev
Browse files Browse the repository at this point in the history
Md dev
  • Loading branch information
a-pasquale authored Jan 30, 2024
2 parents d6edabb + 745cd94 commit 216f52b
Show file tree
Hide file tree
Showing 18 changed files with 66 additions and 68 deletions.
12 changes: 6 additions & 6 deletions composer.lock

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

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Feature: test CI Link form
And I should see "Link Title"
And I should see "Link URL"
And I should see "Add"
When I fill in "title" with "TEST"
When I fill in "title" with "Test CI Link Title"
When I select "learning" from "category"
When I check "Approved"
# login tag
Expand All @@ -31,7 +31,7 @@ Feature: test CI Link form
When I fill in "Link Title" with "Test"
When I fill in "Link URL" with "http://example.com"
When I press "Submit"
Then I should see "TEST"
Then I should see "Test CI Link Title"
And I should see "Submission information"
And I should see "View"
And I should see "Edit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ Resource with Link Title and Link URL (must include https).
And I should see "Link Title"
And I should see "Link URL"
And I should see "Add"
When I fill in "title" with "TEST"
When I fill in "title" with "Test CI Link Title 2"
When I select "learning" from "category"
When I check "edit-tags-682"
When I check "Beginner"
When I fill in "Description" with "Test"
When I fill in "Link Title" with "Test"
When I fill in "Link URL" with "http://example.com"
When I press "Submit"
Then I should see "TEST"
Then I should see "Test CI Link Title 2"
And I should see "Submission information"
And I should see "View"
And I should see "Edit"
Expand Down
4 changes: 2 additions & 2 deletions tests/behat/features/templates/ci-links/ci-links-auth.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ descriptions, categories, tags (first 3 linked), skill levels, and affinity grou
When I fill in "edit-search--2" with "NotAResource"
And I wait 4 seconds
Then I should see "There are no CI Links at this time"
When I fill in "edit-search--2" with "test"
When I fill in "edit-search--2" with "Test CI Link Title"
And I wait 4 seconds
Then I should see "test"
Then I should see "Test CI Link Title"
When I click "Card View"
Then I should see "test-login-resource"
Then I should see "Learning"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ with links redirecting to their respective addresses.
Given I am logged in as a user with the "authenticated" role
When I go to "/resources"
And I wait 2 seconds
Then I should see "Test"
When I click "TEST"
Then I should see "TEST"
Then I should see "Test CI Link Title"
When I click "Test CI Link Title"
Then I should see "Test CI Link Title"
Then I should see "login"
Then I should see an image with alt text "Beginner"
Then I should see "Test"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
@templates
@api
@javascript

Feature: test ci-link submission page as an administrator user
In order to test the ci-links submission page as an administrator user

Scenario: Administrator user Test ci links submission page
Given I am logged in as a user with the "administrator" role
When I go to "/admin/structure/webform/manage/resource/results/submissions"
Then I should see "test"
Then I should see "Test CI Link Title 2"
Then I should see "#"
Then I should see "Title"
Then I should see "Approved"
Expand All @@ -18,11 +17,11 @@ Feature: test ci-link submission page as an administrator user
Then I should see "Changed"
Then I should see "Link to CI link"
Then I should see "Operations"
When I click "test"
When I click "Test CI Link Title 2"
When I click "Edit"
When I check "Approved"
When I wait 3 seconds
#op is the Save button
When I press "op"
When I press "edit-submit"
And I wait 5 seconds
Then I should see "Submission updated in CI Link."
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ results are shown in a table with columns for "Votes", "CI Links Title", "Catego
Then I should be on "/user/login?destination=/form/resource"

When I go to "/ci-links"
When I fill in "edit-search--2" with "test"
When I fill in "edit-search--2" with "Test CI Link Title"
Then I should see "These CI links have been crowd-sourced from the ConnectCI"
Then I should see "test"
Then I should see "Test CI Link Title"
Then I should see "Title"
Then I should see "Description"
Then I should see "Category"
Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/cypress/e2e/accessmatch/match-overview.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("Unauthenticated user tests the Match Overview Page", () => {

//Individual Match Engagement
cy.get(":nth-child(2) > .card > .card-body").contains(
"GPU-accelerated ice sheet flow modeling"
"GPU-accelerated Ice Sheet Flow Modeling"
);
cy.get(":nth-child(2) > .card > .card-body").contains(
"University of North Dakota"
Expand Down
4 changes: 2 additions & 2 deletions tests/cypress/cypress/e2e/accessmatch/tags/tags.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe("Verify the tags page", () => {

// each h2 is a tag category -- verify each h2 with the each() function
cy.get('.block-system-main-block')
.find('h2.mt-10')
.find('h2.mt-5')
.each(($el) => {

// cy.task('log', 'h2: ' + $el.text());
Expand All @@ -30,7 +30,7 @@ describe("Verify the tags page", () => {
// each category should have a bunch of tags - get an alias to that element
cy.get('.block-system-main-block')
.get('[id="' + $el.text() + '"]')
.next() // in the DOM, this gets the element containing all the tags
.parent().siblings('div') // in the DOM, this gets the element containing all the tags
.as('tag-list');

// verify there are more than 0 tags per category
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,3 @@ visibility:
user: '@user.current_user_context:current_user'
roles:
authenticated: authenticated
domain:
id: domain
negate: null
context_mapping:
domain: '@domain.current_domain_context:domain'
domains: { }
7 changes: 4 additions & 3 deletions web/sites/default/config/default/views.view.add_interest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ display:
type: html_list
options:
grouping: { }
row_class: 'list-none p-0 m-1'
row_class: 'list-none p-0 mb-1 me-1'
default_row_class: false
type: ul
wrapper_class: add-interest-list
Expand Down Expand Up @@ -560,6 +560,7 @@ display:
required: false
flag: interest
user_scope: current
css_class: ''
use_ajax: true
header: { }
footer: { }
Expand Down Expand Up @@ -642,7 +643,7 @@ display:
exclude: false
alter:
alter_text: true
text: '<h2 class="text-dark border-bottom my-3 pb-1">{{ name }}</h2>'
text: '<div class="prose mt-5"><h2 class="text-dark border-bottom my-3 pb-1">{{ name }}</h2></div>'
make_link: false
path: ''
absolute: false
Expand Down Expand Up @@ -1172,7 +1173,7 @@ display:
exclude: false
alter:
alter_text: true
text: "<div class=\"d-inline-flex flag-tag {{ flagged }} px-2 py-1 hover--border-dark-teal border cursor-pointer\">\r\n<div class=\"flag-element-name\">{{ name }}</div>\r\n<div class=\"d-none hidden\">{{ link_flag }}</div>\r\n</div>"
text: "<div class=\"d-inline-flex flag-tag {{ flagged }} px-2 py-1 hover--border-dark-teal border cursor-pointer\">\r\n<div class=\"flag-element-name text-menu\">{{ name }}</div>\r\n<div class=\"d-none hidden\">{{ link_flag }}</div>\r\n</div>"
make_link: false
path: ''
absolute: false
Expand Down
7 changes: 4 additions & 3 deletions web/sites/default/config/default/views.view.add_skill.yml
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ display:
type: html_list
options:
grouping: { }
row_class: 'list-none p-0 m-1'
row_class: 'list-none p-0 mb-1 me-1'
default_row_class: false
type: ul
wrapper_class: add-skill-list
Expand Down Expand Up @@ -536,6 +536,7 @@ display:
required: false
flag: skill
user_scope: current
css_class: ''
header: { }
footer: { }
display_extenders: { }
Expand Down Expand Up @@ -617,7 +618,7 @@ display:
exclude: false
alter:
alter_text: true
text: '<h2 class="text-dark border-bottom my-3 pb-1">{{ name }}</h2>'
text: '<div class="prose mt-5"><h2 class="text-dark border-bottom my-3 pb-1">{{ name }}</h2></div>'
make_link: false
path: ''
absolute: false
Expand Down Expand Up @@ -1148,7 +1149,7 @@ display:
exclude: false
alter:
alter_text: true
text: "<div class=\"d-inline-flex flag-tag {{ flagged }} px-2 py-1 border cursor-pointer\">\r\n<div class=\"flag-element-name\">{{ name }}</div>\r\n<div class=\"d-none hidden\">{{ link_flag }}</div>\r\n</div>"
text: "<div class=\"d-inline-flex flag-tag {{ flagged }} px-2 py-1 border cursor-pointer\">\r\n<div class=\"flag-element-name text-menu\">{{ name }}</div>\r\n<div class=\"d-none hidden\">{{ link_flag }}</div>\r\n</div>"
make_link: false
path: ''
absolute: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ display:
group_type: group
admin_label: ''
plugin_id: field
label: ''
label: Tags
exclude: false
alter:
alter_text: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ display:
options:
query_comment: ''
disable_sql_rewrite: false
distinct: false
distinct: true
replica: false
query_tags: { }
contextual_filters_or: false
Expand Down
8 changes: 4 additions & 4 deletions web/sites/default/config/default/views.view.node_add_tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ display:
query_tags: { }
contextual_filters_or: false
relationships: { }
css_class: ''
css_class: 'd-flex flex-wrap'
header: { }
footer: { }
display_extenders: { }
Expand Down Expand Up @@ -1835,7 +1835,7 @@ display:
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
element_default_classes: false
empty: ''
hide_empty: false
empty_zero: false
Expand Down Expand Up @@ -1869,7 +1869,7 @@ display:
exclude: true
alter:
alter_text: true
text: '<h2 id="{{name__value}}" class="mt-10">{{ name }}</h2>'
text: '<h2 id="{{name__value}}" class="mt-5">{{ name }}</h2>'
make_link: false
path: ''
absolute: false
Expand Down Expand Up @@ -1985,7 +1985,7 @@ display:
exclude: false
alter:
alter_text: true
text: "{% if view |render|striptags('<a>')|trim|length > 0 %}\r\n<h2>{{ name }}</h2>\r\n<div class=\"[&_div]--flex [&_div]--flex-wrap\">{{ view }}</div>\r\n{% endif %}"
text: "{% if view |render|striptags('<a>')|trim|length > 0 %}\r\n<div class=\"prose\">{{ name }}</div>\r\n<div class=\"[&_div]--flex [&_div]--flex-wrap\">{{ view }}</div>\r\n{% endif %}"
make_link: false
path: ''
absolute: false
Expand Down
2 changes: 1 addition & 1 deletion web/sites/default/config/default/views.view.tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ display:
entity_field: parent
plugin_id: standard
required: false
css_class: py-4
css_class: ''
use_ajax: true
header: { }
footer: { }
Expand Down
29 changes: 28 additions & 1 deletion web/themes/nect-theme/nect.theme
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function nect_preprocess_page(&$variables) {
$variables['amp_front_text'] = theme_get_setting('amp_front_text');
$variables['coco_front_text'] = theme_get_setting('coco_front_text');
$variables['usrse_front_text'] = theme_get_setting('usrse_front_text');

$domain = \Drupal::config('domain.settings');
$token = \Drupal::token();
$domainName = t('[domain:name]');
Expand All @@ -237,3 +237,30 @@ function nect_preprocess_node__organization(&$variables) {
$variables['field_type'] = $node->field_type->view();
$variables['field_organization_tags'] = $node->field_organization_tags->view();
}

/**
* Implements hook_theme_suggestions_container_alter().
*/
function nect_theme_suggestions_container_alter(&$suggestions, array $variables) {
$element = $variables['element'];

// Get the current path.
$current_path = \Drupal::service('path.current')->getPath();
// Explode the path by '/' to get an array of parts.
$path_parts = explode('/', $current_path);
// Get the last part of the array (the last segment of the URL).
$last_part = end($path_parts);

$suggestions[] = 'container__' . $last_part;


if (isset($element['#type']) && $element['#type'] == 'view') {
$suggestions[] = 'container__' . $element['#name'];
$suggestions[] = 'container__' . $element['#name'] . '__' . $element['#display_id'];
}

if (isset($element['#type']) && $element['#type'] == 'container' && isset($element['children']['#type'])) {
$suggestions[] = 'container__' . $element['children']['#type'];
}
}

24 changes: 0 additions & 24 deletions web/themes/nect-theme/templates/container.html.twig

This file was deleted.

0 comments on commit 216f52b

Please sign in to comment.