Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
5ba99858f1
commit
2d277754eb
|
|
@ -15,7 +15,7 @@ include:
|
|||
gitlab_auth_token_variable_name: "PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE"
|
||||
allure_job_name: "${QA_RUN_TYPE}"
|
||||
- project: gitlab-org/quality/pipeline-common
|
||||
ref: 8.1.1
|
||||
ref: 8.2.0
|
||||
file:
|
||||
- /ci/base.gitlab-ci.yml
|
||||
- /ci/knapsack-report.yml
|
||||
|
|
|
|||
|
|
@ -149,21 +149,26 @@ export default Extension.create({
|
|||
const { clipboardData } = event;
|
||||
|
||||
const gfmContent = clipboardData.getData(GFM_FORMAT);
|
||||
|
||||
if (gfmContent) {
|
||||
return this.editor.commands.pasteContent(gfmContent, true);
|
||||
}
|
||||
|
||||
const textContent = clipboardData.getData(TEXT_FORMAT);
|
||||
const htmlContent = clipboardData.getData(HTML_FORMAT);
|
||||
|
||||
const { from, to } = view.state.selection;
|
||||
const isCodeBlockActive = CODE_BLOCK_NODE_TYPES.some((type) =>
|
||||
this.editor.isActive(type),
|
||||
);
|
||||
|
||||
if (pasteRaw) {
|
||||
this.editor.commands.insertContentAt(
|
||||
{ from, to },
|
||||
textContent.replace(/^\s+|\s+$/gm, ''),
|
||||
);
|
||||
if (pasteRaw || isCodeBlockActive) {
|
||||
const isMarkdownCodeBlockActive = this.editor.isActive(CodeBlockHighlight.name, {
|
||||
language: 'markdown',
|
||||
});
|
||||
|
||||
const contentToInsert = isMarkdownCodeBlockActive
|
||||
? gfmContent || textContent
|
||||
: textContent.replace(/^\s+|\s+$/gm, '');
|
||||
|
||||
if (!contentToInsert) return false;
|
||||
|
||||
this.editor.commands.insertContentAt({ from, to }, contentToInsert);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -172,11 +177,6 @@ export default Extension.create({
|
|||
const vsCodeMeta = hasVsCode ? JSON.parse(clipboardData.getData(VS_CODE_FORMAT)) : {};
|
||||
const language = vsCodeMeta.mode;
|
||||
|
||||
// if a code block is active, paste as plain text
|
||||
if (!textContent || CODE_BLOCK_NODE_TYPES.some((type) => this.editor.isActive(type))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (hasVsCode) {
|
||||
return this.editor.commands.pasteContent(
|
||||
language === 'markdown' ? textContent : `\`\`\`${language}\n${textContent}\n\`\`\``,
|
||||
|
|
@ -184,6 +184,10 @@ export default Extension.create({
|
|||
);
|
||||
}
|
||||
|
||||
if (gfmContent) {
|
||||
return this.editor.commands.pasteContent(gfmContent, true);
|
||||
}
|
||||
|
||||
const preStartRegex = /^<pre[^>]*lang="markdown"[^>]*>/;
|
||||
const preEndRegex = /<\/pre>$/;
|
||||
const htmlContentWithoutMeta = htmlContent?.replace(/^<meta[^>]*>/, '');
|
||||
|
|
|
|||
|
|
@ -1843,9 +1843,9 @@ Truncate the file names in the `uploads` table:
|
|||
SELECT
|
||||
u.id,
|
||||
u.path,
|
||||
-- Current filename
|
||||
-- Current file name
|
||||
(regexp_match(u.path, '[^\\/:*?"<>|\r\n]+$'))[1] AS current_filename,
|
||||
-- New filename
|
||||
-- New file name
|
||||
CONCAT(
|
||||
LEFT(SPLIT_PART((regexp_match(u.path, '[^\\/:*?"<>|\r\n]+$'))[1], '.', 1), 242),
|
||||
COALESCE(SUBSTRING((regexp_match(u.path, '[^\\/:*?"<>|\r\n]+$'))[1] FROM '\.(?:.(?!\.))+$'))
|
||||
|
|
@ -1875,8 +1875,8 @@ Truncate the file names in the `uploads` table:
|
|||
|
||||
Where:
|
||||
|
||||
- `current_filename`: a filename that is currently more than 246 characters long.
|
||||
- `new_filename`: a filename that has been truncated to 246 characters maximum.
|
||||
- `current_filename`: a file name that is currently more than 246 characters long.
|
||||
- `new_filename`: a file name that has been truncated to 246 characters maximum.
|
||||
- `new_path`: new path considering the `new_filename` (truncated).
|
||||
|
||||
After you validate the batch results, you must change the batch size (`row_id`) using the following sequence of numbers (10000 to 20000). Repeat this process until you reach the last record in the `uploads` table.
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ prometheus['scrape_configs'] = [
|
|||
'metrics_path': '/probe',
|
||||
'params' => {
|
||||
'param_a' => ['test'],
|
||||
'param_b' => ['additional_test']
|
||||
'param_b' => ['additional_test'],
|
||||
},
|
||||
'static_configs' => [
|
||||
'targets' => ['1.1.1.1:8060'],
|
||||
|
|
@ -240,7 +240,7 @@ To use an external Prometheus server:
|
|||
nginx['status']['options'] = {
|
||||
"server_tokens" => "off",
|
||||
"access_log" => "off",
|
||||
"allow" => ["192.168.0.1", "192.168.0.2"]
|
||||
"allow" => ["192.168.0.1", "192.168.0.2"],
|
||||
"deny" => "all",
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ GET projects/:id/packages/debian/pool/:distribution/:letter/:package_name/:packa
|
|||
| `letter` | string | yes | The Debian Classification (first-letter or lib-first-letter). |
|
||||
| `package_name` | string | yes | The source package name. |
|
||||
| `package_version` | string | yes | The source package version. |
|
||||
| `file_name` | string | yes | The filename. |
|
||||
| `file_name` | string | yes | The file name. |
|
||||
|
||||
```shell
|
||||
curl --header "Private-Token: <personal_access_token>" "https://gitlab.example.com/api/v4/projects/1/packages/debian/pool/my-distro/a/my-pkg/1.0.0/example_1.0.0~alpha2_amd64.deb"
|
||||
|
|
@ -108,7 +108,7 @@ curl --header "Private-Token: <personal_access_token>" \
|
|||
--remote-name
|
||||
```
|
||||
|
||||
This writes the downloaded file using the remote filename in the current directory.
|
||||
This writes the downloaded file using the remote file name in the current directory.
|
||||
|
||||
## Route prefix
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ curl --header "Private-Token: <personal_access_token>" \
|
|||
--remote-name
|
||||
```
|
||||
|
||||
This writes the downloaded file using the remote filename in the current directory.
|
||||
This writes the downloaded file using the remote file name in the current directory.
|
||||
|
||||
## Download a signed distribution Release file
|
||||
|
||||
|
|
@ -194,7 +194,7 @@ curl --header "Private-Token: <personal_access_token>" \
|
|||
--remote-name
|
||||
```
|
||||
|
||||
This writes the downloaded file using the remote filename in the current directory.
|
||||
This writes the downloaded file using the remote file name in the current directory.
|
||||
|
||||
## Download a release file signature
|
||||
|
||||
|
|
@ -222,7 +222,7 @@ curl --header "Private-Token: <personal_access_token>" \
|
|||
--remote-name
|
||||
```
|
||||
|
||||
This writes the downloaded file using the remote filename in the current directory.
|
||||
This writes the downloaded file using the remote file name in the current directory.
|
||||
|
||||
## Download a packages index
|
||||
|
||||
|
|
@ -252,7 +252,7 @@ curl --header "Private-Token: <personal_access_token>" \
|
|||
--remote-name
|
||||
```
|
||||
|
||||
This writes the downloaded file using the remote filename in the current directory.
|
||||
This writes the downloaded file using the remote file name in the current directory.
|
||||
|
||||
## Download a packages index by hash
|
||||
|
||||
|
|
@ -283,7 +283,7 @@ curl --header "Private-Token: <personal_access_token>" \
|
|||
--remote-name
|
||||
```
|
||||
|
||||
This writes the downloaded file using the remote filename in the current directory.
|
||||
This writes the downloaded file using the remote file name in the current directory.
|
||||
|
||||
## Download a Debian Installer packages index
|
||||
|
||||
|
|
@ -313,7 +313,7 @@ curl --header "Private-Token: <personal_access_token>" \
|
|||
--remote-name
|
||||
```
|
||||
|
||||
This writes the downloaded file using the remote filename in the current directory.
|
||||
This writes the downloaded file using the remote file name in the current directory.
|
||||
|
||||
## Download a Debian Installer packages index by hash
|
||||
|
||||
|
|
@ -343,7 +343,7 @@ curl --header "Private-Token: <personal_access_token>" \
|
|||
--remote-name
|
||||
```
|
||||
|
||||
This writes the downloaded file using the remote filename in the current directory.
|
||||
This writes the downloaded file using the remote file name in the current directory.
|
||||
|
||||
## Download a source packages index
|
||||
|
||||
|
|
@ -372,7 +372,7 @@ curl --header "Private-Token: <personal_access_token>" \
|
|||
--remote-name
|
||||
```
|
||||
|
||||
This writes the downloaded file using the remote filename in the current directory.
|
||||
This writes the downloaded file using the remote file name in the current directory.
|
||||
|
||||
## Download a source packages index by hash
|
||||
|
||||
|
|
@ -401,4 +401,4 @@ curl --header "Private-Token: <personal_access_token>" \
|
|||
--remote-name
|
||||
```
|
||||
|
||||
This writes the downloaded file using the remote filename in the current directory.
|
||||
This writes the downloaded file using the remote file name in the current directory.
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ GET projects/:id/packages/helm/:channel/charts/:file_name.tgz
|
|||
| ----------- | ------ | -------- | ----------- |
|
||||
| `id` | string | yes | The ID or full path of the project. |
|
||||
| `channel` | string | yes | Helm repository channel. |
|
||||
| `file_name` | string | yes | Chart filename. |
|
||||
| `file_name` | string | yes | Chart file name. |
|
||||
|
||||
```shell
|
||||
curl --user <username>:<personal_access_token> \
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ GET projects/:id/packages/pypi/files/:sha256/:file_identifier
|
|||
| --------- | ---- | -------- | ----------- |
|
||||
| `id` | string | yes | The ID or full path of the project. |
|
||||
| `sha256` | string | yes | PyPI package file sha256 check sum. |
|
||||
| `file_identifier` | string | yes | The PyPI package filename. |
|
||||
| `file_identifier` | string | yes | The PyPI package file name. |
|
||||
|
||||
```shell
|
||||
curl --user <username>:<personal_access_token> "https://gitlab.example.com/api/v4/projects/1/packages/pypi/files/5y57017232013c8ac80647f4ca153k3726f6cba62d055cd747844ed95b3c65ff/my.pypi.package-0.0.1.tar.gz"
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ a file `mydir/file.yml` in `gitlab-org/dast` project would be expanded to:
|
|||
gitlab.com/gitlab-org/dast/mydir/path/to/component@<CURRENT_SHA>
|
||||
```
|
||||
|
||||
The component YAML file follows the filename convention `<type>.yml` where component type is one of:
|
||||
The component YAML file follows the file name convention `<type>.yml` where component type is one of:
|
||||
|
||||
| Component type | Context |
|
||||
| -------------- | ------- |
|
||||
|
|
@ -206,7 +206,7 @@ For example:
|
|||
A component YAML file:
|
||||
|
||||
- Must have a **name** to be referenced to.
|
||||
- Must specify its **type** in the filename, which defines how it can be used (raw configuration to be `include`d, child pipeline workflow, job step).
|
||||
- Must specify its **type** in the file name, which defines how it can be used (raw configuration to be `include`d, child pipeline workflow, job step).
|
||||
- Must define its **content** based on the type.
|
||||
- Must specify **input parameters** that it accepts. Components should depend on input parameters for dynamic values and not environment variables.
|
||||
- Should be **validated statically** (for example: using JSON schema validators).
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ To deploy to your ECS cluster:
|
|||
| `CI_AWS_ECS_CLUSTER` | The name of the AWS ECS cluster that you're targeting for your deployments. |
|
||||
| `CI_AWS_ECS_SERVICE` | The name of the targeted service tied to your AWS ECS cluster. Ensure that this variable is scoped to the appropriate environment (`production`, `staging`, `review/*`). |
|
||||
| `CI_AWS_ECS_TASK_DEFINITION` | If the task definition is in ECS, the name of the task definition tied to the service. |
|
||||
| `CI_AWS_ECS_TASK_DEFINITION_FILE` | If the task definition is a JSON file in GitLab, the filename, including the path. For example, `ci/aws/my_task_definition.json`. If the name of the task definition in your JSON file is the same name as an existing task definition in ECS, then a new revision is created when CI/CD runs. Otherwise, a brand new task definition is created, starting at revision 1. |
|
||||
| `CI_AWS_ECS_TASK_DEFINITION_FILE` | If the task definition is a JSON file in GitLab, the file name, including the path. For example, `ci/aws/my_task_definition.json`. If the name of the task definition in your JSON file is the same name as an existing task definition in ECS, then a new revision is created when CI/CD runs. Otherwise, a brand new task definition is created, starting at revision 1. |
|
||||
|
||||
WARNING:
|
||||
If you define both `CI_AWS_ECS_TASK_DEFINITION_FILE` and `CI_AWS_ECS_TASK_DEFINITION`,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ If job artifacts are using too much disk space, see the
|
|||
|
||||
This message appears in job logs when a the runner can't find the file to upload. Either
|
||||
the path to the file is incorrect, or the file was not created. You can check the job
|
||||
log for other errors or warnings that specify the filename and why it wasn't
|
||||
log for other errors or warnings that specify the file name and why it wasn't
|
||||
generated.
|
||||
|
||||
For more detailed job logs, you can [enable CI/CD debug logging](../variables/index.md#enable-debug-logging)
|
||||
|
|
|
|||
|
|
@ -125,14 +125,14 @@ To change the permissions to cancel pipelines or jobs:
|
|||
> Support for external `.gitlab-ci.yml` locations [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/14376) in GitLab 12.6.
|
||||
|
||||
GitLab expects to find the CI/CD configuration file (`.gitlab-ci.yml`) in the project's root
|
||||
directory. However, you can specify an alternate filename path, including locations outside the project.
|
||||
directory. However, you can specify an alternate file name path, including locations outside the project.
|
||||
|
||||
To customize the path:
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find your project.
|
||||
1. Select **Settings > CI/CD**.
|
||||
1. Expand **General pipelines**.
|
||||
1. In the **CI/CD configuration file** field, enter the filename. If the file:
|
||||
1. In the **CI/CD configuration file** field, enter the file name. If the file:
|
||||
- Is not in the root directory, include the path.
|
||||
- Is in a different project, include the group and project name.
|
||||
- Is on an external site, enter the full URL.
|
||||
|
|
|
|||
|
|
@ -910,7 +910,7 @@ variables:
|
|||
NOTE:
|
||||
Zip archives are the only supported artifact type. Follow [the issue for details](https://gitlab.com/gitlab-org/gitlab/-/issues/367203).
|
||||
|
||||
GitLab Runner can generate and produce attestation metadata for all build artifacts. To enable this feature, you must set the `RUNNER_GENERATE_ARTIFACTS_METADATA` environment variable to `true`. This variable can either be set globally or it can be set for individual jobs. The metadata is in rendered in a plain text `.json` file that's stored with the artifact. The filename is as follows: `{ARTIFACT_NAME}-metadata.json` where `ARTIFACT_NAME` is what was defined as the [name for the artifact](../jobs/job_artifacts.md#with-a-dynamically-defined-name) in the CI file. The filename, however, defaults to `artifacts-metadata.json` if no name was given to the build artifacts.
|
||||
GitLab Runner can generate and produce attestation metadata for all build artifacts. To enable this feature, you must set the `RUNNER_GENERATE_ARTIFACTS_METADATA` environment variable to `true`. This variable can either be set globally or it can be set for individual jobs. The metadata is in rendered in a plain text `.json` file that's stored with the artifact. The file name is as follows: `{ARTIFACT_NAME}-metadata.json` where `ARTIFACT_NAME` is what was defined as the [name for the artifact](../jobs/job_artifacts.md#with-a-dynamically-defined-name) in the CI file. The file name, however, defaults to `artifacts-metadata.json` if no name was given to the build artifacts.
|
||||
|
||||
### Attestation format
|
||||
|
||||
|
|
@ -919,7 +919,7 @@ The attestation metadata is generated in the [in-toto attestation format](https:
|
|||
| Field | Value |
|
||||
| ------ | ------ |
|
||||
| `_type` | `https://in-toto.io/Statement/v0.1` |
|
||||
| `subject.name` | The filename of the artifact. |
|
||||
| `subject.name` | The file name of the artifact. |
|
||||
| `subject.digest.sha256` | The artifact's `sha256` checksum. |
|
||||
| `predicateType` | `https://slsa.dev/provenance/v0.2` |
|
||||
| `predicate.buildType` | `https://gitlab.com/gitlab-org/gitlab-runner/-/blob/{GITLAB_RUNNER_VERSION}/PROVENANCE.md`. For example v15.0.0 |
|
||||
|
|
|
|||
|
|
@ -552,7 +552,7 @@ You should configure Code Quality checks to run on your worker as documented in
|
|||
A common issue is that the terms `Code Quality` (GitLab specific) and `Code Climate`
|
||||
(Engine used by GitLab) are very similar. You must add a **`.codeclimate.yml`** file
|
||||
to change the default configuration, **not** a `.codequality.yml` file. If you use
|
||||
the wrong filename, the [default `.codeclimate.yml`](https://gitlab.com/gitlab-org/ci-cd/codequality/-/blob/master/codeclimate_defaults/.codeclimate.yml.template)
|
||||
the wrong file name, the [default `.codeclimate.yml`](https://gitlab.com/gitlab-org/ci-cd/codequality/-/blob/master/codeclimate_defaults/.codeclimate.yml.template)
|
||||
is still used.
|
||||
|
||||
### No Code Quality report is displayed in a merge request
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ Below is a list of Mattermost version changes for GitLab 14.0 and later:
|
|||
|
||||
| GitLab version | Mattermost version | Notes |
|
||||
| :------------- | :----------------- | ---------------------------------------------------------------------------------------- |
|
||||
| 16.7 | 9.2 | |
|
||||
| 16.7 | 9.3 | |
|
||||
| 16.6 | 9.1 | |
|
||||
| 16.5 | 9.0 | |
|
||||
| 16.4 | 8.1 | |
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
"@gitlab/favicon-overlay": "2.0.0",
|
||||
"@gitlab/fonts": "^1.3.0",
|
||||
"@gitlab/svgs": "3.72.0",
|
||||
"@gitlab/ui": "^71.11.0",
|
||||
"@gitlab/ui": "^71.11.1",
|
||||
"@gitlab/visual-review-tools": "1.7.3",
|
||||
"@gitlab/web-ide": "^0.0.1-dev-20231211152737",
|
||||
"@mattiasbuelens/web-streams-adapter": "^0.1.0",
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ describe('RunnerJobs', () => {
|
|||
});
|
||||
|
||||
it('is collapsed', () => {
|
||||
expect(findCollapse().attributes('visible')).toBeUndefined();
|
||||
expect(findCollapse().props('visible')).toBe(false);
|
||||
});
|
||||
|
||||
describe('when expanded', () => {
|
||||
|
|
@ -99,7 +99,7 @@ describe('RunnerJobs', () => {
|
|||
});
|
||||
|
||||
it('shows loading state', () => {
|
||||
expect(findCollapse().attributes('visible')).toBe('true');
|
||||
expect(findCollapse().props('visible')).toBe(true);
|
||||
expect(findSkeletonLoader().exists()).toBe(true);
|
||||
});
|
||||
|
||||
|
|
@ -156,14 +156,14 @@ describe('RunnerJobs', () => {
|
|||
});
|
||||
|
||||
it('shows rows', () => {
|
||||
expect(findCollapse().attributes('visible')).toBe('true');
|
||||
expect(findCollapse().props('visible')).toBe(true);
|
||||
expect(findRunnerManagersTable().props('items')).toEqual(mockRunnerManagers);
|
||||
});
|
||||
|
||||
it('collapses when clicked', async () => {
|
||||
await findHideDetails().trigger('click');
|
||||
|
||||
expect(findCollapse().attributes('visible')).toBeUndefined();
|
||||
expect(findCollapse().props('visible')).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ describe('IntegrationStatus', () => {
|
|||
});
|
||||
|
||||
it('sets collapse component as invisible by default', () => {
|
||||
expect(findCollapse().props('visible')).toBeUndefined();
|
||||
expect(findCollapse().props('visible')).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ describe('IntegrationStatus', () => {
|
|||
});
|
||||
|
||||
it('sets collapse component as visible', () => {
|
||||
expect(findCollapse().attributes('visible')).toBe('true');
|
||||
expect(findCollapse().props('visible')).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -20,12 +20,6 @@ import waitForPromises from 'helpers/wait_for_promises';
|
|||
import MarkdownSerializer from '~/content_editor/services/markdown_serializer';
|
||||
import { createTestEditor, createDocBuilder, waitUntilNextDocTransaction } from '../test_utils';
|
||||
|
||||
const CODE_BLOCK_HTML = '<pre class="js-syntax-highlight" lang="javascript">var a = 2;</pre>';
|
||||
const CODE_SUGGESTION_HTML =
|
||||
'<pre data-lang-params="-0+0" class="js-syntax-highlight language-suggestion" lang="suggestion">Suggested code</pre>';
|
||||
const DIAGRAM_HTML =
|
||||
'<img data-diagram="nomnoml" data-diagram-src="data:text/plain;base64,WzxmcmFtZT5EZWNvcmF0b3IgcGF0dGVybl0=">';
|
||||
const FRONTMATTER_HTML = '<pre lang="yaml" data-lang-params="frontmatter">key: value</pre>';
|
||||
const PARAGRAPH_HTML =
|
||||
'<p dir="auto">Some text with <strong>bold</strong> and <em>italic</em> text.</p>';
|
||||
|
||||
|
|
@ -123,19 +117,6 @@ describe('content_editor/extensions/copy_paste', () => {
|
|||
expect(await triggerPasteEventHandler(buildClipboardEvent({ types, data }))).toBe(true);
|
||||
});
|
||||
|
||||
it.each`
|
||||
nodeType | html | handled | desc
|
||||
${'codeBlock'} | ${CODE_BLOCK_HTML} | ${false} | ${'does not handle'}
|
||||
${'codeSuggestion'} | ${CODE_SUGGESTION_HTML} | ${false} | ${'does not handle'}
|
||||
${'diagram'} | ${DIAGRAM_HTML} | ${false} | ${'does not handle'}
|
||||
${'frontmatter'} | ${FRONTMATTER_HTML} | ${false} | ${'does not handle'}
|
||||
${'paragraph'} | ${PARAGRAPH_HTML} | ${true} | ${'handles'}
|
||||
`('$desc paste if currently a `$nodeType` is in focus', async ({ html, handled }) => {
|
||||
tiptapEditor.commands.insertContent(html);
|
||||
|
||||
expect(await triggerPasteEventHandler(buildClipboardEvent())).toBe(handled);
|
||||
});
|
||||
|
||||
describe.each`
|
||||
eventName | expectedDoc
|
||||
${'cut'} | ${() => doc(p())}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ describe('~/environments/components/deploy_board_wrapper.vue', () => {
|
|||
});
|
||||
|
||||
it('is collapsed by default', () => {
|
||||
expect(collapse.attributes('visible')).toBeUndefined();
|
||||
expect(collapse.props('visible')).toBe(false);
|
||||
expect(icon.props('name')).toBe('chevron-lg-right');
|
||||
});
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ describe('~/environments/components/deploy_board_wrapper.vue', () => {
|
|||
const button = await expandCollapsedSection();
|
||||
|
||||
expect(button.attributes('aria-label')).toBe(__('Collapse'));
|
||||
expect(collapse.attributes('visible')).toBe('visible');
|
||||
expect(collapse.props('visible')).toBe(true);
|
||||
expect(icon.props('name')).toBe('chevron-lg-down');
|
||||
|
||||
const deployBoard = findDeployBoard();
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ describe('~/environments/components/environments_folder.vue', () => {
|
|||
it('is collapsed by default', () => {
|
||||
const link = findLink();
|
||||
|
||||
expect(collapse.attributes('visible')).toBeUndefined();
|
||||
expect(collapse.props('visible')).toBe(false);
|
||||
const iconNames = icons.wrappers.map((i) => i.props('name')).slice(0, 2);
|
||||
expect(iconNames).toEqual(['chevron-lg-right', 'folder-o']);
|
||||
expect(folderName.classes('gl-font-weight-bold')).toBe(false);
|
||||
|
|
@ -96,7 +96,7 @@ describe('~/environments/components/environments_folder.vue', () => {
|
|||
const link = findLink();
|
||||
|
||||
expect(button.attributes('aria-label')).toBe(__('Collapse'));
|
||||
expect(collapse.attributes('visible')).toBe('visible');
|
||||
expect(collapse.props('visible')).toBe(true);
|
||||
const iconNames = icons.wrappers.map((i) => i.props('name')).slice(0, 2);
|
||||
expect(iconNames).toEqual(['chevron-lg-down', 'folder-open']);
|
||||
expect(folderName.classes('gl-font-weight-bold')).toBe(true);
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ describe('~/environments/components/kubernetes_overview.vue', () => {
|
|||
});
|
||||
|
||||
it('is collapsed by default', () => {
|
||||
expect(findCollapse().props('visible')).toBeUndefined();
|
||||
expect(findCollapse().props('visible')).toBe(false);
|
||||
expect(findCollapseButton().attributes('aria-label')).toBe(KubernetesOverview.i18n.expand);
|
||||
expect(findCollapseButton().props('icon')).toBe('chevron-right');
|
||||
});
|
||||
|
|
@ -88,7 +88,7 @@ describe('~/environments/components/kubernetes_overview.vue', () => {
|
|||
findCollapseButton().vm.$emit('click');
|
||||
await nextTick();
|
||||
|
||||
expect(findCollapse().attributes('visible')).toBe('true');
|
||||
expect(findCollapse().props('visible')).toBe(true);
|
||||
expect(findCollapseButton().attributes('aria-label')).toBe(KubernetesOverview.i18n.collapse);
|
||||
expect(findCollapseButton().props('icon')).toBe('chevron-down');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ describe('~/environments/components/new_environment_item.vue', () => {
|
|||
});
|
||||
|
||||
it('is collapsed by default', () => {
|
||||
expect(collapse.attributes('visible')).toBeUndefined();
|
||||
expect(collapse.props('visible')).toBe(false);
|
||||
expect(icon.props('name')).toBe('chevron-lg-right');
|
||||
expect(environmentName.classes('gl-font-weight-bold')).toBe(false);
|
||||
});
|
||||
|
|
@ -394,7 +394,7 @@ describe('~/environments/components/new_environment_item.vue', () => {
|
|||
|
||||
expect(button.attributes('aria-label')).toBe(__('Collapse'));
|
||||
expect(button.props('category')).toBe('secondary');
|
||||
expect(collapse.attributes('visible')).toBe('visible');
|
||||
expect(collapse.props('visible')).toBe(true);
|
||||
expect(icon.props('name')).toBe('chevron-lg-down');
|
||||
expect(environmentName.classes('gl-font-weight-bold')).toBe(true);
|
||||
expect(findDeployment().isVisible()).toBe(true);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ describe('MrWidgetExpanableSection', () => {
|
|||
const collapse = findCollapse();
|
||||
|
||||
expect(collapse.exists()).toBe(true);
|
||||
expect(collapse.attributes('visible')).toBeUndefined();
|
||||
expect(collapse.props('visible')).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ describe('MrWidgetExpanableSection', () => {
|
|||
const collapse = findCollapse();
|
||||
|
||||
expect(collapse.exists()).toBe(true);
|
||||
expect(collapse.attributes('visible')).toBe('true');
|
||||
expect(collapse.props('visible')).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -449,6 +449,9 @@ RSpec.shared_examples 'edits content using the content editor' do |params = {
|
|||
before do
|
||||
switch_to_content_editor
|
||||
|
||||
type_in_content_editor [modifier_key, 'a']
|
||||
type_in_content_editor :delete
|
||||
|
||||
type_in_content_editor "Some **rich** _text_ ~~content~~ [link](https://gitlab.com)"
|
||||
|
||||
type_in_content_editor [modifier_key, 'a']
|
||||
|
|
@ -488,6 +491,26 @@ RSpec.shared_examples 'edits content using the content editor' do |params = {
|
|||
end
|
||||
end
|
||||
|
||||
it 'pastes raw markdown with formatting when pasting inside a markdown code block' do
|
||||
type_in_content_editor '```md'
|
||||
type_in_content_editor :enter
|
||||
type_in_content_editor [modifier_key, 'v']
|
||||
|
||||
page.within content_editor_testid do
|
||||
expect(page).to have_selector('pre', text: 'Some **rich** _text_ ~~content~~ [link](https://gitlab.com)')
|
||||
end
|
||||
end
|
||||
|
||||
it 'pastes raw markdown without formatting when pasting inside a plaintext code block' do
|
||||
type_in_content_editor '```'
|
||||
type_in_content_editor :enter
|
||||
type_in_content_editor [modifier_key, 'v']
|
||||
|
||||
page.within content_editor_testid do
|
||||
expect(page).to have_selector('pre', text: 'Some rich text content link')
|
||||
end
|
||||
end
|
||||
|
||||
it 'pastes raw text without formatting, stripping whitespaces, if shift + ctrl + v is pressed' do
|
||||
type_in_content_editor " Some **rich**"
|
||||
type_in_content_editor :enter
|
||||
|
|
|
|||
|
|
@ -1274,10 +1274,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-3.72.0.tgz#5daaa7366913b52ea89439305067e030f967c8a5"
|
||||
integrity sha512-VbSdwXxu9Y6NAXNFTROjZa83e2b8QeDAO7byqjJ0z+2Y3gGGXdw+HclAzz0Ns8B0+DMV5mV7dtmTlv/1xAXXYQ==
|
||||
|
||||
"@gitlab/ui@^71.11.0":
|
||||
version "71.11.0"
|
||||
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-71.11.0.tgz#08826d0bd2f6fdc3c4d447e0ba2718d70651d753"
|
||||
integrity sha512-qM7VALWrEMxaoA3ij1D52+fjwWaCs46sdRf+Pm0heLMezj9dWr5AE/ojUV5tLVTvHa7EaiDLsAcxDf0vPdIchQ==
|
||||
"@gitlab/ui@^71.11.1":
|
||||
version "71.11.1"
|
||||
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-71.11.1.tgz#8ce051fdfa6b564830b26e440fa5b394581bfbac"
|
||||
integrity sha512-59JZOwDOIl3kijD3Yr6pNUUP7wvTWMltOoLm3ySbZNPozuSUVYZqMNt/LS1s/SxMODiAgmJEoOO9p3j21P2T0A==
|
||||
dependencies:
|
||||
"@floating-ui/dom" "1.2.9"
|
||||
bootstrap-vue "2.23.1"
|
||||
|
|
|
|||
Loading…
Reference in New Issue