diff --git a/.tugboat/security.settings.php b/.tugboat/security.settings.php index 007ac81c4..766e2dfd0 100644 --- a/.tugboat/security.settings.php +++ b/.tugboat/security.settings.php @@ -6,75 +6,77 @@ * Modules allow list for GovCMS module_permissions. */ $config['module_permissions.settings']['managed_modules'] = [ - "bigmenu", - "captcha", - "ctools_block", - "ctools_views", - "chosen", - "chosen_field", - "chosen_lib", - "components", - "contact_storage", - "context", - "context_ui", - "crop", - "search_api_db", - "search_api_db_defaults", - "datetime", - "datetime_range", - "dropzonejs", - "dropzonejs_eb_widget", - "dynamic_entity_reference", - "embed", - "entity_browser", - "entity_browser_entity_form", - "entity_class_formatter", - "entity_embed", - "entity_reference", - "entity_reference_display", - "entity_reference_revisions", - "environment_indicator", - "environment_indicator_ui", - "facets", - "facets_range_widget", - "field_group", - "file", - "focal_point", - "govcms_dlm", - "basic_auth", - "image", - "image_captcha", - "inline_entity_form", - "jquery_ui", - "link", - "linked_field", - "linkit", - "mailsystem", - "media_entity_file_replace", - "menu_block", - "menu_trail_by_path", - "metatag", - "minisite", - "options", - "paragraphs", - "pathauto", - "shield", - "recaptcha", - "redirect", - "redirect_404", - "redirect_domain", - "robotstxt", - "scheduled_transitions", - "search_api", - "search_api_attachments", - "search_api_solr", - "token", - "webform", - "webform_access", - "webform_attachment", - "webform_image_select", - "webform_node", - "webform_ui", + 'bigmenu', + 'captcha', + 'ctools_block', + 'ctools_views', + 'chosen', + 'chosen_field', + 'chosen_lib', + 'components', + 'contact_storage', + 'context', + 'context_ui', + 'crop', + 'search_api_db', + 'search_api_db_defaults', + 'datetime', + 'datetime_range', + 'dropzonejs', + 'dropzonejs_eb_widget', + 'dynamic_entity_reference', + 'embed', + 'entity_browser', + 'entity_browser_entity_form', + 'entity_class_formatter', + 'entity_embed', + 'entity_reference', + 'entity_reference_display', + 'entity_reference_revisions', + 'environment_indicator', + 'environment_indicator_ui', + 'facets', + 'facets_range_widget', + 'field_group', + 'field_ui', + 'file', + 'focal_point', + 'govcms_dlm', + 'basic_auth', + 'image', + 'image_captcha', + 'inline_entity_form', + 'jquery_ui', + 'link', + 'linked_field', + 'linkit', + 'mailsystem', + 'media_entity_file_replace', + 'menu_block', + 'menu_trail_by_path', + 'metatag', + 'minisite', + 'options', + 'paragraphs', + 'pathauto', + 'shield', + 'recaptcha', + 'redirect', + 'redirect_404', + 'redirect_domain', + 'robotstxt', + 'role_delegation', + 'scheduled_transitions', + 'search_api', + 'search_api_attachments', + 'search_api_solr', + 'token', + 'webform', + 'webform_access', + 'webform_attachment', + 'webform_image_select', + 'webform_node', + 'webform_ui', ]; /** @@ -91,4 +93,6 @@ $config['module_permissions.settings']['permission_blacklist'] = [ 'administer modules', 'administer permissions', + 'administer search_api', + 'assign all roles', ]; diff --git a/composer.json b/composer.json index 29f0f8ca0..5b3e4868f 100644 --- a/composer.json +++ b/composer.json @@ -27,8 +27,8 @@ "bower-asset/chosen": "1.8.7", "composer/installers": "^2.0", "cweagans/composer-patches": "^1.7", - "drupal/address": "1.9", - "drupal/admin_toolbar": "3.0.3", + "drupal/address": "1.10.0", + "drupal/admin_toolbar": "3.1.0", "drupal/adminimal_admin_toolbar": "1.11.0", "drupal/adminimal_theme": "1.6.0", "drupal/bigmenu": "2.0.0-rc2", @@ -91,15 +91,16 @@ "drupal/paragraphs": "1.12", "drupal/password_policy": "3.1.0", "drupal/pathauto": "1.8.0", - "drupal/real_aes": "2.3", + "drupal/real_aes": "2.4.0", "drupal/recaptcha": "3.0", "drupal/redirect": "1.7.0", "drupal/rest_menu_items": "3.0.2", "drupal/robotstxt": "1.4", - "drupal/scheduled_transitions": "2.1.0", - "drupal/search_api": "1.21.0", + "drupal/role_delegation": "1.1.0", + "drupal/scheduled_transitions": "2.2.0", + "drupal/search_api": "1.23.0", "drupal/search_api_attachments": "9.0.0", - "drupal/search_api_solr": "4.2.1", + "drupal/search_api_solr": "4.2.7", "drupal/seckit": "2.0.0", "drupal/shield": "1.5.0", "drupal/simple_oauth": "5.2.0", @@ -170,7 +171,9 @@ "patches": { "drupal/tfa": { "Create Email one-time-code Validation Plugin & related Setup Plugin - https://www.drupal.org/project/tfa/issues/2930541": "https://www.drupal.org/files/issues/2020-10-19/tfa-2930541-22_0.patch", - "Users' recovery codes exposed to admin users - https://www.drupal.org/project/tfa/issues/3075304": "https://www.drupal.org/files/issues/2021-01-14/tfa-3075304-15.patch" + "Users' recovery codes exposed to admin users - https://www.drupal.org/project/tfa/issues/3075304": "https://www.drupal.org/files/issues/2021-01-14/tfa-3075304-15.patch", + "Set upper limit for number of skipped validation": "https://www.drupal.org/files/issues/2022-02-09/3263289-set-upper-limit.patch" + }, "drupal/twig_tweak": { "sanitize input": "https://www.drupal.org/files/issues/2021-02-03/twig_tweak-token-xss.patch" @@ -189,6 +192,12 @@ } }, "config": { + "allow-plugins": { + "composer/installers": true, + "cweagans/composer-patches": true, + "drupal/core-composer-scaffold": true, + "oomphinc/composer-installers-extender": true + }, "bin-dir": "bin/", "sort-packages": true, "optimize-autoloader": true diff --git a/config/install/user.role.govcms_site_administrator.yml b/config/install/user.role.govcms_site_administrator.yml index 9ec1772a5..4b3457e6b 100755 --- a/config/install/user.role.govcms_site_administrator.yml +++ b/config/install/user.role.govcms_site_administrator.yml @@ -51,6 +51,9 @@ permissions: - 'administer user form display' - 'administer users' - 'administer views' + - 'assign govcms_content_approver role' + - 'assign govcms_content_author role' + - 'assign govcms_site_administrator role' - 'bypass honeypot protection' - 'bypass node access' - 'configure any layout' diff --git a/govcms.info.yml b/govcms.info.yml index 089d0c52b..cf524275c 100644 --- a/govcms.info.yml +++ b/govcms.info.yml @@ -3,7 +3,7 @@ type: profile description: 'A GovCMS Drupal Distribution for government and the public sector in Australia.' project: govcms core_version_requirement: ^9 -version: '2.8.0' +version: '2.10.0' distribution: name: GovCMS @@ -27,7 +27,6 @@ install: - options - page_cache - path - - quickedit - rdf - settings_tray - shortcut diff --git a/govcms.install b/govcms.install index 166b6530d..825003e6f 100644 --- a/govcms.install +++ b/govcms.install @@ -128,3 +128,37 @@ function govcms_install() { ]) ->save(TRUE); } + +/** + * Issue GOVCMSD9-598: Remove the stub modules from the distribution. + */ +function govcms_update_9001() { + $stub_modules = [ + 'govcms8_default_content', + 'govcms_content_types', + 'govcms_blog_article', + 'govcms_event', + 'govcms_foi', + 'govcms_news_and_media', + 'govcms_standard_page', + 'govcms_search', + 'govcms_workflows', + ]; + + $extension_config = \Drupal::configFactory()->getEditable('core.extension'); + $module = $extension_config->get('module'); + + foreach($stub_modules as $stub_module) { + if (isset($module[$stub_module])) { + unset($module[$stub_module]); + } + } + + $extension_config->set('module', $module); + $extension_config->save(); + + // Remove stub modules from system.schema. + foreach($stub_modules as $stub_module) { + \Drupal::keyValue('system.schema')->delete($stub_module); + } +} diff --git a/tests/cy/cypress/fixtures/.gitkeep b/patches/tfa-validation.patch similarity index 100% rename from tests/cy/cypress/fixtures/.gitkeep rename to patches/tfa-validation.patch diff --git a/tests/cy/cypress.json b/tests/cy/cypress.json index 5629fb45b..3a1222ff7 100644 --- a/tests/cy/cypress.json +++ b/tests/cy/cypress.json @@ -4,8 +4,8 @@ "www.google-analytics.com" ], "chromeWebSecurity": false, - "localEnv": "ahoy", "env": { + "localEnv": "lagoon", "user": { "administrator": { "username": "administrator", diff --git a/tests/cy/cypress/fixtures/currentComposer.json b/tests/cy/cypress/fixtures/currentComposer.json deleted file mode 100644 index 2294808ca..000000000 --- a/tests/cy/cypress/fixtures/currentComposer.json +++ /dev/null @@ -1,206 +0,0 @@ -{ - "name": "govcms/govcms", - "description": "GovCMS Drupal Distribution", - "keywords": [ - "GovCMS" - ], - "type": "drupal-profile", - "license": "GPL-2.0-or-later", - "homepage": "https://www.govcms.gov.au", - "support": { - "issues:": "https://github.com/GovCMS/GovCMS/issues", - "wik": "https://github.com/GovCMS/GovCMS/wiki", - "source": "https://github.com/GovCMS/GovCMS/releases" - }, - "repositories": [ - { - "type": "composer", - "url": "https://packages.drupal.org/8" - }, - { - "type": "composer", - "url": "https://asset-packagist.org" - } - ], - "require": { - "php": "^7.4", - "bower-asset/chosen": "1.8.7", - "bower-asset/dropzone": "5.7.2", - "composer/installers": "^1.9", - "cweagans/composer-patches": "^1.7", - "drupal/admin_toolbar": "2.4.0", - "drupal/adminimal_admin_toolbar": "1.11.0", - "drupal/adminimal_theme": "1.6.0", - "drupal/bigmenu": "2.0.0-rc1", - "drupal/block_place": "1.0", - "drupal/chosen": "3.0.1", - "drupal/components": "2.0-beta3", - "drupal/config_filter": "2.2.0", - "drupal/config_ignore": "2.3.0", - "drupal/config_perms": "2.0", - "drupal/config_split": "1.5.0", - "drupal/config_update": "1.7", - "drupal/consumers": "1.11", - "drupal/contact_storage": "1.1.0", - "drupal/context": "4.0.0-beta5", - "drupal/core-composer-scaffold": "^9", - "drupal/core-recommended": "9.1.4", - "drupal/crop": "2.1", - "drupal/ctools": "3.4.0", - "drupal/devel": "4.0.1", - "drupal/diff": "1.0.0", - "drupal/dropzonejs": "2.3.0", - "drupal/ds": "3.9.0", - "drupal/dynamic_entity_reference": "1.11.0", - "drupal/encrypt": "3.0", - "drupal/entity_browser": "2.5", - "drupal/entity_class_formatter": "1.3", - "drupal/entity_embed": "1.1", - "drupal/entity_reference_display": "1.4.0", - "drupal/entity_reference_revisions": "1.8", - "drupal/environment_indicator": "4.0.1", - "drupal/facets": "1.5", - "drupal/features": "3.11", - "drupal/field_group": "3.1", - "drupal/focal_point": "1.5.0", - "drupal/ga_login": "1.0.0-alpha5", - "drupal/google_analytics": "3.1", - "drupal/govcms_dlm": "1.4.0", - "drupal/honeypot": "2.0.1", - "drupal/inline_entity_form": "1.0.0-rc8", - "drupal/key": "1.14", - "drupal/linked_field": "1.3.0", - "drupal/linkit": "6.0.0-beta1", - "drupal/login_security": "2.0.0", - "drupal/media_entity_file_replace": "1.0-beta3", - "drupal/menu_block": "1.6", - "drupal/menu_trail_by_path": "1.3", - "drupal/metatag": "1.14.0", - "drupal/migrate_file": "2.0.0", - "drupal/migrate_plus": "5.1", - "drupal/migrate_source_csv": "3.4", - "drupal/migrate_tools": "4.5", - "drupal/minisite": "1.3", - "drupal/modifiers": "1.4", - "drupal/panelizer": "4.4", - "drupal/panels": "4.6.0", - "drupal/paragraphs": "1.12", - "drupal/password_policy": "3.0-beta1", - "drupal/pathauto": "1.8.0", - "drupal/real_aes": "2.3", - "drupal/recaptcha": "3.0", - "drupal/redirect": "1.6", - "drupal/rest_menu_items": "3.0.2", - "drupal/robotstxt": "1.4", - "drupal/scheduled_transitions": "2.0.0", - "drupal/search_api": "1.18.0", - "drupal/search_api_attachments": "1.0-beta16", - "drupal/search_api_solr": "4.1.7", - "drupal/seckit": "2.0.0", - "drupal/shield": "1.4", - "drupal/simple_oauth": "5.0.2", - "drupal/simple_sitemap": "3.7", - "drupal/swiftmailer": "2.0-beta1", - "drupal/tfa": "1.0.0-alpha7", - "drupal/token": "1.7", - "drupal/twig_tweak": "2.9", - "drupal/update_notifications_disable": "1.1", - "drupal/username_enumeration_prevention": "1.1", - "drupal/video_embed_field": "2.4", - "drupal/webform": "6.0.2", - "oomphinc/composer-installers-extender": "dev-master", - "swiftmailer/swiftmailer": "6.2.3", - "webflo/drupal-finder": "^1.2" - }, - "require-dev": { - "drush/drush": "~10" - }, - "extra": { - "drupal-scaffold": { - "locations": { - "web-root": "web/" - }, - "initial": { - "sites/default/default.services.yml": "sites/default/services.yml", - "sites/default/default.settings.php": "sites/default/settings.php" - }, - "excludes": [ - "sites/development.services.yml" - ] - }, - "installer-types": [ - "bower-asset", - "npm-asset" - ], - "installer-paths": { - "web/core": [ - "type:drupal-core" - ], - "web/libraries/{$name}": [ - "type:drupal-library", - "type:bower-asset", - "type:npm-asset" - ], - "web/modules/contrib/{$name}": [ - "type:drupal-module" - ], - "web/profiles/contrib/{$name}": [ - "type:drupal-profile" - ], - "web/themes/contrib/{$name}": [ - "type:drupal-theme" - ], - "drush/Commands/contrib/{$name}": [ - "type:drupal-drush" - ], - "web/modules/custom/{$name}": [ - "type:drupal-custom-module" - ], - "web/themes/custom/{$name}": [ - "type:drupal-custom-theme" - ] - }, - "enable-patching": true, - "patches": { - "drupal/tfa": { - "Create Email one-time-code Validation Plugin & related Setup Plugin - https://www.drupal.org/project/tfa/issues/2930541": "https://www.drupal.org/files/issues/2020-10-19/tfa-2930541-22_0.patch", - "Users' recovery codes exposed to admin users - https://www.drupal.org/project/tfa/issues/3075304": "https://www.drupal.org/files/issues/2021-01-14/tfa-3075304-15.patch" - }, - "drupal/username_enumeration_prevention": { - "Deprecated function User::getUsername": "https://www.drupal.org/files/issues/2020-09-01/fix-deprecated-getusername-3167106-2.patch" - }, - "drupal/twig_tweak": { - "sanitize input": "https://www.drupal.org/files/issues/2021-02-03/twig_tweak-token-xss.patch" - } - } - }, - "autoload": { - "psr-4": { - "GovCMS\\composer\\": "src/composer" - } - }, - "config": { - "bin-dir": "bin/", - "sort-packages": true, - "optimize-autoloader": true - }, - "scripts": { - "pre-install-cmd": [ - "GovCMS\\composer\\ScriptHandler::checkComposerVersion" - ], - "pre-update-cmd": [ - "GovCMS\\composer\\ScriptHandler::checkComposerVersion" - ], - "post-install-cmd": [ - "GovCMS\\composer\\ScriptHandler::createRequiredFiles", - "rsync -av --delete --exclude 'web' --exclude '.git' --exclude '.tugboat' --exclude 'vendor' ./ web/profiles/govcms" - ], - "post-update-cmd": [ - "GovCMS\\composer\\ScriptHandler::createRequiredFiles", - "rsync -av --delete --exclude 'web' --exclude '.git' --exclude '.tugboat' --exclude 'vendor' ./ web/profiles/govcms" - ], - "nuke": "rm -r -f composer.lock bin app web vendor" - }, - "minimum-stability": "dev", - "prefer-stable": true -} diff --git a/tests/cy/cypress/fixtures/example.json b/tests/cy/cypress/fixtures/example.json deleted file mode 100644 index da18d9352..000000000 --- a/tests/cy/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} \ No newline at end of file diff --git a/tests/cy/cypress/fixtures/locations.json b/tests/cy/cypress/fixtures/locations.json deleted file mode 100644 index ff78a75f3..000000000 --- a/tests/cy/cypress/fixtures/locations.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "github": "https://raw.githubusercontent.com/govCMS/GovCMS/2.x/composer.json" -} \ No newline at end of file diff --git a/tests/cy/cypress/integration/1-baseline/modules.spec.js b/tests/cy/cypress/integration/1-baseline/modules.spec.js new file mode 100644 index 000000000..e0c11cf95 --- /dev/null +++ b/tests/cy/cypress/integration/1-baseline/modules.spec.js @@ -0,0 +1,13 @@ +import packages from '../../../../../composer.json' + +let modules = Object.entries(packages['require']).filter((str) => { + return str[1].indexOf('^') === -1 +}) + +describe('Cross check module and library versions', () => { + modules.forEach((module, i) => { + it(`${module}`, () => { + cy.composerCommand('show ' + module[0] + ' | grep versions').its('stdout').should('contain', module[1]) + }) + }) +}) diff --git a/tests/cy/cypress/integration/2-modules/.gitkeep b/tests/cy/cypress/integration/2-modules/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/tests/cy/cypress/integration/content/blog.spec.js b/tests/cy/cypress/integration/3-ui/blog.spec.js similarity index 100% rename from tests/cy/cypress/integration/content/blog.spec.js rename to tests/cy/cypress/integration/3-ui/blog.spec.js diff --git a/tests/cy/cypress/integration/content/events.spec.js b/tests/cy/cypress/integration/3-ui/events.spec.js similarity index 100% rename from tests/cy/cypress/integration/content/events.spec.js rename to tests/cy/cypress/integration/3-ui/events.spec.js diff --git a/tests/cy/cypress/integration/content/foi.spec.js b/tests/cy/cypress/integration/3-ui/foi.spec.js similarity index 100% rename from tests/cy/cypress/integration/content/foi.spec.js rename to tests/cy/cypress/integration/3-ui/foi.spec.js diff --git a/tests/cy/cypress/integration/content/home.spec.js b/tests/cy/cypress/integration/3-ui/home.spec.js similarity index 100% rename from tests/cy/cypress/integration/content/home.spec.js rename to tests/cy/cypress/integration/3-ui/home.spec.js diff --git a/tests/cy/cypress/integration/content/news.spec.js b/tests/cy/cypress/integration/3-ui/news.spec.js similarity index 100% rename from tests/cy/cypress/integration/content/news.spec.js rename to tests/cy/cypress/integration/3-ui/news.spec.js diff --git a/tests/cy/cypress/support/authenticate.js b/tests/cy/cypress/support/authenticate.js index 115409a51..1efcea281 100644 --- a/tests/cy/cypress/support/authenticate.js +++ b/tests/cy/cypress/support/authenticate.js @@ -5,62 +5,14 @@ Cypress.Commands.add("drupalLogin", (user, password) => { user = user || Cypress.env('user').super.username password = password || Cypress.env('user').super.password - return cy.request({ - method: 'POST', - url: '/user/login', - form: true, - body: { - name: user, - pass: password, - form_id: 'user_login_form' - } - }); + cy.visit(`/user/login`) + + cy.get("#edit-name").type(user) + cy.get("#edit-pass").type(password) + cy.get("#edit-submit").click() }); // Drupal logout. Cypress.Commands.add('drupalLogout', () => { return cy.request('/user/logout'); -}); - -// Drupal drush command. -Cypress.Commands.add("drupalDrushCommand", (command) => { - var cmd = Cypress.env('drupalDrushCmdLine'); - - if (cmd == null) { - if(Cypress.env('localEnv') === "lando"){ - cmd = 'lando drush %command' - }else{ - cmd = 'drush %command' - } - } - - if (typeof command === 'string') { - command = [command]; - } - - const execCmd = cmd.replace('%command', command.join(' ')); - - return cy.exec(execCmd); -}); - - -// Composer command. -Cypress.Commands.add("composerCommand", (command) => { - var cmd = Cypress.env('composerCmdLine'); - - if (cmd == null) { - if (Cypress.env('localEnv') === "lando") { - cmd = 'lando composer %command' - } else { - cmd = 'cd ../..; composer %command' - } - } - - if (typeof command === 'string') { - command = [command]; - } - - const execCmd = cmd.replace('%command', command.join(' ')); - - return cy.exec(execCmd) }); \ No newline at end of file diff --git a/tests/cy/cypress/support/commands.js b/tests/cy/cypress/support/commands.js index 2882e1705..828783324 100644 --- a/tests/cy/cypress/support/commands.js +++ b/tests/cy/cypress/support/commands.js @@ -15,6 +15,50 @@ Cypress.Commands.add("aliasAll", () => }) ) +// Drupal drush command. +Cypress.Commands.add("drupalDrushCommand", (command) => { + var cmd = Cypress.env('drupalDrushCmdLine'); + + if (cmd == null) { + if (Cypress.env('localEnv') === "lando") { + cmd = 'lando drush %command' + } else { + cmd = 'drush %command' + } + } + + if (typeof command === 'string') { + command = [command]; + } + + const execCmd = cmd.replace('%command', command.join(' ')); + + return cy.exec(execCmd); +}); + + +// Composer command. +Cypress.Commands.add("composerCommand", (command) => { + var cmd = Cypress.env('composerCmdLine'); + + if (cmd == null) { + console.log(Cypress.env()) + if (Cypress.env('localEnv') === "lando") { + cmd = 'cd ../..; lando composer %command' + } else { + cmd = 'cd ../..; composer %command' + } + } + + if (typeof command === 'string') { + command = [command]; + } + + const execCmd = cmd.replace('%command', command.join(' ')); + + return cy.exec(execCmd) +}); + Cypress.Commands.add("createUser", (siteRole) => { cy.fixture(`users/${siteRole}.json`).then((user) => { const username = user.firstname + user.lastname @@ -67,42 +111,42 @@ Cypress.Commands.add("type_ckeditor", (element, content) => { // govcms-content-author would be Content Author // role is the user that should login to Drupal Cypress.Commands.add('uiCreateUser', (userrole, role) => { - let user_role_machine_name = 'govcms-'+userrole.toLowerCase().replace(' ','-') - let password = user_role_machine_name+'#123' + let user_role_machine_name = 'govcms-' + userrole.toLowerCase().replace(' ', '-') + let password = user_role_machine_name + '#123' cy.userLogin(role).then(() => { cy.get('#toolbar-link-entity-user-collection') - .click({force: true}) + .click({ force: true }) cy.get('.local-actions__item > .button') - .click({force: true}) + .click({ force: true }) cy.get('#edit-mail') - .type('cypress-tester-'+user_role_machine_name+'@test.com', {force: true}) + .type('cypress-tester-' + user_role_machine_name + '@test.com', { force: true }) cy.get('#edit-name') - .type('@cypresstest-'+user_role_machine_name, {force: true}) - cy.get('#edit-pass-pass1', {force: true}) - .type(password, {force: true}) - cy.get('#edit-pass-pass2', {force: true}) - .type(password, {force: true}) + .type('@cypresstest-' + user_role_machine_name, { force: true }) + cy.get('#edit-pass-pass1', { force: true }) + .type(password, { force: true }) + cy.get('#edit-pass-pass2', { force: true }) + .type(password, { force: true }) cy.get('#edit-submit') - .click({force: true}) + .click({ force: true }) cy.get('.messages-list__item') .contains('Created a new user account') cy.get('#toolbar-link-entity-user-collection') - .click({force: true}) + .click({ force: true }) cy.get('#edit-user-bulk-form-0') - .click({force: true}) + .click({ force: true }) cy.get('#edit-action') - .select('Add the '+userrole+' role to the selected user(s)') + .select('Add the ' + userrole + ' role to the selected user(s)') cy.get('#edit-submit') - .click({force: true}) + .click({ force: true }) cy.get('#edit-user-bulk-form-0') - .click({force: true}) + .click({ force: true }) cy.get('#edit-action') .select('Cancel the selected user account(s)') cy.get('#edit-submit') - .click({force: true}) + .click({ force: true }) cy.get('#edit-user-cancel-method-user-cancel-delete') - .click({force: true}) + .click({ force: true }) cy.get('#edit-submit') - .click({force: true}) + .click({ force: true }) }) }) diff --git a/tests/cy/package.json b/tests/cy/package.json index aa60ae698..6eda935cb 100644 --- a/tests/cy/package.json +++ b/tests/cy/package.json @@ -15,20 +15,20 @@ } }, "dependencies": { - "cypress": "^7.3.0", + "cypress": "^9.4.1", "cypress-file-upload": "^5.0.7", "cypress-xpath": "^1.6.2" }, "devDependencies": { "@cypress/eslint-plugin-json": "^3.2.3", - "eslint": "^7.26.0", + "eslint": "^8.8.0", "eslint-plugin-chai-friendly": "^0.7.1", "eslint-plugin-cypress": "^2.11.3", - "husky": "^6.0.0", - "lint-staged": "^11.0.0" + "husky": "^7.0.4", + "lint-staged": "^12.3.3" }, "license": "GPL-2.0", - "repository": "https://github.com/govCMS/govcms-testing-cypress", + "repository": "https://github.com/govCMS/GovCMS", "author": "Joseph Zhao ", "lint-staged": { "*.coffee": [