Provide Nightwatch command that resolves the path to any component

Created on 25 November 2024, 2 months ago

Problem/Motivation

Anyone writing functional tests will need to use existing helper scripts. However, not all of these are available as easily included libraries or modules. For managed files, relative paths work, but for third-party components or the core, we cannot depend on relative paths due to local installation variations.

Steps to reproduce

Create a Nightwatch test that requires core's globals:
File: /modules/custom/my_module/tests/src/Nightwatch/Tests/myTest.js
const { commandAsWebserver } = require('../../../../../../../core/tests/Drupal/Nightwatch/globals');
And move the test to a sub-module:
File: /modules/custom/my_module/modules/my_sub_module/tests/src/Nightwatch/Tests/myTest.js

Proposed resolution

Provide a Nightwatch command that resolves the local path to any component.

Feature request
Status

Active

Version

1.5

Component

Code

Created by

🇺🇦Ukraine Joyakas

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024