Mono repo -> Master (#22553)
Combines the following repositories into one: https://github.com/mattermost/mattermost-server https://github.com/mattermost/mattermost-webapp https://github.com/mattermost/focalboard https://github.com/mattermost/mattermost-plugin-playbooks
8
e2e/.gitignore
поставляемый
Обычный файл
@@ -0,0 +1,8 @@
|
||||
# env, cert, key, license
|
||||
.env*
|
||||
*.crt
|
||||
*.key
|
||||
*.license
|
||||
|
||||
# Plugin
|
||||
*.tar.gz
|
||||
1
e2e/cypress/.eslintignore
Обычный файл
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
122
e2e/cypress/.eslintrc.json
Обычный файл
@@ -0,0 +1,122 @@
|
||||
{
|
||||
"extends": [
|
||||
"plugin:mattermost/react",
|
||||
"plugin:cypress/recommended"
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/eslint-plugin",
|
||||
"mattermost",
|
||||
"import",
|
||||
"no-only-tests",
|
||||
"@typescript-eslint",
|
||||
"cypress"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"env": {
|
||||
"cypress/globals": true
|
||||
},
|
||||
"rules": {
|
||||
"header/header": [
|
||||
2,
|
||||
"line",
|
||||
" Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n See LICENSE.txt for license information.",
|
||||
2
|
||||
],
|
||||
"cypress/assertion-before-screenshot": "warn",
|
||||
"cypress/no-assigning-return-values": "error",
|
||||
"cypress/no-force": "warn",
|
||||
"cypress/no-async-tests": "error",
|
||||
"cypress/no-pause": "error",
|
||||
"cypress/no-unnecessary-waiting": 0,
|
||||
"func-names": 0,
|
||||
"import/no-unresolved": 0,
|
||||
"max-nested-callbacks": 0,
|
||||
"no-unused-expressions": 0,
|
||||
"no-process-env": 0,
|
||||
"no-duplicate-imports": 0,
|
||||
"no-undefined": 0,
|
||||
"no-use-before-define": 0,
|
||||
"import/no-duplicates": 2,
|
||||
"mattermost/use-external-link": 2,
|
||||
"eol-last": ["error", "always"],
|
||||
"import/order": [
|
||||
0,
|
||||
{
|
||||
"newlines-between": "always-and-inside-groups",
|
||||
"groups": [
|
||||
"builtin",
|
||||
"external",
|
||||
[
|
||||
"internal",
|
||||
"parent"
|
||||
],
|
||||
"sibling",
|
||||
"index"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-only-tests/no-only-tests": ["error", {"focus": ["only", "skip"]}],
|
||||
"max-lines": ["warn", {"max": 800, "skipBlankLines": true, "skipComments": true}]
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["**/*.ts"],
|
||||
"extends": [
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
],
|
||||
"rules": {
|
||||
"camelcase": 0,
|
||||
"no-shadow": 0,
|
||||
"import/no-unresolved": 0, // ts handles this better
|
||||
"@typescript-eslint/naming-convention": [
|
||||
2,
|
||||
{
|
||||
"selector": "function",
|
||||
"format": ["camelCase", "PascalCase"]
|
||||
},
|
||||
{
|
||||
"selector": "variable",
|
||||
"format": ["camelCase", "PascalCase", "UPPER_CASE"]
|
||||
},
|
||||
{
|
||||
"selector": "parameter",
|
||||
"format": ["camelCase", "PascalCase"],
|
||||
"leadingUnderscore": "allow"
|
||||
},
|
||||
{
|
||||
"selector": "typeLike",
|
||||
"format": ["PascalCase"]
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-non-null-assertion": 0,
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
2,
|
||||
{
|
||||
"vars": "all",
|
||||
"args": "after-used"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-var-requires": 0,
|
||||
"@typescript-eslint/no-empty-function": 0,
|
||||
"@typescript-eslint/prefer-interface": 0,
|
||||
"@typescript-eslint/explicit-function-return-type": 0,
|
||||
"@typescript-eslint/explicit-module-boundary-types": 0,
|
||||
"@typescript-eslint/indent": [
|
||||
2,
|
||||
4,
|
||||
{
|
||||
"SwitchCase": 0
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-use-before-define": [
|
||||
2,
|
||||
{
|
||||
"classes": false,
|
||||
"functions": false,
|
||||
"variables": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
13
e2e/cypress/Dockerfile.webhook
Обычный файл
@@ -0,0 +1,13 @@
|
||||
FROM node:14-alpine
|
||||
|
||||
RUN apk update && apk upgrade && \
|
||||
apk add --no-cache bash git openssh
|
||||
|
||||
WORKDIR /usr/src
|
||||
RUN npm install axios express client-oauth2@larkox/js-client-oauth2#e24e2eb5dfcbbbb3a59d095e831dbe0012b0ac49
|
||||
COPY ./tests/plugins/post_message_as.js /usr/src/tests/plugins/post_message_as.js
|
||||
COPY ./utils/webhook_utils.js /usr/src/utils/webhook_utils.js
|
||||
COPY ./webhook_serve.js /usr/src
|
||||
|
||||
EXPOSE 3000
|
||||
CMD [ "node", "webhook_serve.js" ]
|
||||
132
e2e/cypress/README-Subpath.md
Обычный файл
@@ -0,0 +1,132 @@
|
||||
# Testing with subpath servers
|
||||
Some tests need multiple servers running in subpath mode. These tests have the cypress `Group: @subpath` metadata near the top of the test file. Instructions on running a server under subpath can be found here: [https://developers.mattermost.com/blog/subpath/](https://developers.mattermost.com/blog/subpath/)
|
||||
|
||||
In the `cypress.json` configuration file, the `baseURL` setting will need to be updated with the subpath URL of the first server, and the `secondServerURL` setting with the subpath URL of the second server.
|
||||
|
||||
### Running subpath tests on local machine
|
||||
Two mattermost servers running on the same machine must be served from different ports. To have the servers respond on the same URL and the same port under different subpaths, you will need to use a reverse proxy (nginx or apache) to proxy the same local url to both mattermost servers under different subpaths.
|
||||
|
||||
#### Example set up using NGINX:
|
||||
|
||||
You'll need to run two Mattermost servers.
|
||||
|
||||
1. Set the `SiteURL` and the listening port for the first server:
|
||||
|
||||
```
|
||||
"SiteURL": "http://localhost/company/mattermost1"
|
||||
"ListenAddress": ":8065",
|
||||
```
|
||||
|
||||
2. Set the `SiteURL` and the listening port for the second server:
|
||||
|
||||
```
|
||||
"SiteURL": "http://localhost/company/mattermost2"
|
||||
"ListenAddress": ":8066",
|
||||
```
|
||||
|
||||
The DB `DataSource` will need to be different for both servers.
|
||||
|
||||
3. Install NGINX - exact steps depend on your OS
|
||||
|
||||
4. Update your NGINX site configuration. The specific details for each setting can be found in the [Mattermost docs](https://docs.mattermost.com/install/config-proxy-nginx.html)
|
||||
|
||||
```
|
||||
upstream backend1 {
|
||||
server localhost:8065;
|
||||
keepalive 32;
|
||||
}
|
||||
|
||||
upstream backend2 {
|
||||
server localhost:8066;
|
||||
keepalive 32;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
location ~ /company/mattermost1/api/v[0-9]+/(users/)?websocket$ {
|
||||
client_body_timeout 60;
|
||||
client_max_body_size 50M;
|
||||
lingering_timeout 5;
|
||||
proxy_buffer_size 16k;
|
||||
proxy_buffers 256 16k;
|
||||
proxy_connect_timeout 90;
|
||||
proxy_pass http://backend1;
|
||||
proxy_read_timeout 90s;
|
||||
proxy_send_timeout 300;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Frame-Options SAMEORIGIN;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
send_timeout 300;
|
||||
}
|
||||
|
||||
location /company/mattermost1 {
|
||||
client_max_body_size 50M;
|
||||
proxy_buffer_size 16k;
|
||||
proxy_buffers 256 16k;
|
||||
proxy_cache_lock on;
|
||||
proxy_cache_min_uses 2;
|
||||
proxy_cache_revalidate on;
|
||||
proxy_cache_use_stale timeout;
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://backend1;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_set_header Connection "";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Frame-Options SAMEORIGIN;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
location ~ /company/mattermost2/api/v[0-9]+/(users/)?websocket$ {
|
||||
client_body_timeout 60;
|
||||
client_max_body_size 50M;
|
||||
lingering_timeout 5;
|
||||
proxy_buffer_size 16k;
|
||||
proxy_buffers 256 16k;
|
||||
proxy_connect_timeout 90;
|
||||
proxy_pass http://backend2;
|
||||
proxy_read_timeout 90s;
|
||||
proxy_send_timeout 300;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Frame-Options SAMEORIGIN;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
send_timeout 300;
|
||||
}
|
||||
|
||||
location /company/mattermost2 {
|
||||
proxy_buffer_size 16k;
|
||||
proxy_buffers 256 16k;
|
||||
proxy_cache_lock on;
|
||||
proxy_cache_min_uses 2;
|
||||
proxy_cache_revalidate on;
|
||||
proxy_cache_use_stale timeout;
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://backend2;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_set_header Connection "";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Frame-Options SAMEORIGIN;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
client_max_body_size 50M;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
5. Restart NGINX to reload the configuration. Exact steps depend on your OS/distribution. On most Linux distributions you can run `sudo systemctl restart nginx`
|
||||
|
||||
6. In the `cypress.json` file, set `baseURL` to `"http://localhost/company/mattermost1"` and `secondServerURL` to `"http://localhost/company/mattermost2"`
|
||||
|
||||
7. Start both Mattermost tests and run the e2e tests.
|
||||
59
e2e/cypress/cypress.config.ts
Обычный файл
@@ -0,0 +1,59 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {defineConfig} from 'cypress';
|
||||
|
||||
export default defineConfig({
|
||||
chromeWebSecurity: false,
|
||||
defaultCommandTimeout: 20000,
|
||||
downloadsFolder: 'tests/downloads',
|
||||
fixturesFolder: 'tests/fixtures',
|
||||
numTestsKeptInMemory: 0,
|
||||
screenshotsFolder: 'tests/screenshots',
|
||||
taskTimeout: 20000,
|
||||
video: false,
|
||||
viewportWidth: 1300,
|
||||
env: {
|
||||
adminEmail: 'sysadmin@sample.mattermost.com',
|
||||
adminUsername: 'sysadmin',
|
||||
adminPassword: 'Sys@dmin-sample1',
|
||||
allowedUntrustedInternalConnections: 'localhost',
|
||||
cwsURL: 'http://localhost:8076',
|
||||
cwsAPIURL: 'http://localhost:8076',
|
||||
dbClient: 'postgres',
|
||||
dbConnection: 'postgres://mmuser:mostest@localhost/mattermost_test?sslmode=disable&connect_timeout=10',
|
||||
elasticsearchConnectionURL: 'http://localhost:9200',
|
||||
firstTest: false,
|
||||
keycloakAppName: 'mattermost',
|
||||
keycloakBaseUrl: 'http://localhost:8484',
|
||||
keycloakUsername: 'mmuser',
|
||||
keycloakPassword: 'mostest',
|
||||
ldapServer: 'localhost',
|
||||
ldapPort: 389,
|
||||
minioAccessKey: 'minioaccesskey',
|
||||
minioSecretKey: 'miniosecretkey',
|
||||
minioS3Bucket: 'mattermost-test',
|
||||
minioS3Endpoint: 'localhost:9000',
|
||||
minioS3SSL: false,
|
||||
numberOfTrialUsers: 100,
|
||||
resetBeforeTest: false,
|
||||
runLDAPSync: true,
|
||||
secondServerURL: 'http://localhost/s/p',
|
||||
serverEdition: 'Team',
|
||||
serverClusterEnabled: false,
|
||||
serverClusterName: 'mm_dev_cluster',
|
||||
serverClusterHostCount: 3,
|
||||
smtpUrl: 'http://localhost:9001',
|
||||
webhookBaseUrl: 'http://localhost:3000',
|
||||
},
|
||||
e2e: {
|
||||
setupNodeEvents(on, config) {
|
||||
return require('./tests/plugins/index.js')(on, config); // eslint-disable-line global-require
|
||||
},
|
||||
baseUrl: process.env.MM_SERVICESETTINGS_SITEURL || 'http://localhost:8065',
|
||||
excludeSpecPattern: '**/node_modules/**/*',
|
||||
specPattern: 'tests/integration/**/*_spec.{js,ts}',
|
||||
supportFile: 'tests/support/index.js',
|
||||
testIsolation: false,
|
||||
},
|
||||
});
|
||||
104
e2e/cypress/generate_test_cycle.js
Обычный файл
@@ -0,0 +1,104 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
/* eslint-disable no-await-in-loop, no-console */
|
||||
|
||||
/*
|
||||
* This command, which is normally used in CI, generates test cycle in full or partial
|
||||
* depending on test metadata and environment capabilities into the Test Automation Dashboard.
|
||||
* Such generated test cycle is then used to run each spec file by "node run_test_cycle.js".
|
||||
*
|
||||
* Usage: [ENVIRONMENT] node generate_test_cycle.js [options]
|
||||
*
|
||||
* Options:
|
||||
* --stage=[stage]
|
||||
* Selects spec files with matching stage. It can be of multiple values separated by comma.
|
||||
* E.g. "--stage='@prod,@dev'" will select files with either @prod or @dev.
|
||||
* --group=[group]
|
||||
* Selects spec files with matching group. It can be of multiple values separated by comma.
|
||||
* E.g. "--group='@channel,@messaging'" will select files with either @channel or @messaging.
|
||||
* --invert
|
||||
* Selected files are those not matching any of the specified stage or group.
|
||||
* --include-group=[group]
|
||||
* Include spec files with matching group. It can be of multiple values separated by comma.
|
||||
* E.g. "--include-group='@enterprise'" will select files including @enterprise.
|
||||
* --exclude-group=[group]
|
||||
* Exclude spec files with matching group. It can be of multiple values separated by comma.
|
||||
* E.g. "--exclude-group='@enterprise'" will select files except @enterprise.
|
||||
* --include-file=[filename or directory]
|
||||
* Include spec files with matching directory or filename pattern. Uses `find` command under the hood. It can be of multiple values separated by comma.
|
||||
* E.g. "--include-file='channel'" will include files recursively under `channel` directory/s.
|
||||
* E.g. "--include-file='*channel*'" will include files and files under directory/s recursively that matches the name with `*channel*`.
|
||||
* --exclude-file=[filename or directory]
|
||||
* Exclude spec files with matching directory or filename pattern. Uses `find` command under the hood. It can be of multiple values separated by comma.
|
||||
* E.g. "--exclude-file='channel'" will exclude files recursively under `channel` directory/s.
|
||||
* E.g. "--exclude-file='*channel*'" will exclude files and files under directory/s recursively that matches the name with `*channel*`.
|
||||
|
||||
*
|
||||
* Environment:
|
||||
* AUTOMATION_DASHBOARD_URL : Dashboard URL
|
||||
* AUTOMATION_DASHBOARD_TOKEN : Dashboard token
|
||||
* REPO : Project repository, ex. mattermost-webapp
|
||||
* BRANCH : Branch identifier from CI
|
||||
* BUILD_ID : Build identifier from CI
|
||||
* BROWSER : Chrome by default. Set to run test on other browser such as chrome, edge, electron and firefox.
|
||||
* The environment should have the specified browser to successfully run.
|
||||
* HEADLESS : Headless by default (true) or false to run on headed mode.
|
||||
* CI_BASE_URL : Test server base URL in CI
|
||||
*
|
||||
* Example:
|
||||
* 1. "node generate_test_cycle.js"
|
||||
* - will create test cycle based on default test environment, except those matching skipped metadata
|
||||
* 2. "node generate_test_cycle.js --stage='@prod'"
|
||||
* - will create test cycle for production tests, except those matching skipped metadata
|
||||
* 3. "node generate_test_cycle.js --stage='@prod' --invert"
|
||||
* - will create test cycle for all non-production tests
|
||||
* 4. "BROWSER='chrome' HEADLESS='false' node generate_test_cycle.js --stage='@prod' --group='@channel,@messaging'"
|
||||
* - will create test cycle for spec files matching stage and group values in Chrome (headed)
|
||||
* 5. "node generate_test_cycle.js --stage='@prod' --exclude-group='@enterprise'"
|
||||
* - will create test cycle for all production tests except @enterprise group
|
||||
* - typical test run for Team Edition
|
||||
* 6. "node generate_test_cycle.js --stage='@prod' --sort-first='@elasticsearch' --sort-last='@mfa'"
|
||||
* - will create test cycle for all production tests with specs specifically ordered as first and last
|
||||
*/
|
||||
|
||||
const os = require('os');
|
||||
|
||||
const chalk = require('chalk');
|
||||
|
||||
const {createAndStartCycle} = require('./utils/dashboard');
|
||||
const {getSortedTestFiles} = require('./utils/file');
|
||||
|
||||
require('dotenv').config();
|
||||
|
||||
const {
|
||||
BRANCH,
|
||||
BROWSER,
|
||||
BUILD_ID,
|
||||
HEADLESS,
|
||||
REPO,
|
||||
} = process.env;
|
||||
|
||||
async function main() {
|
||||
const browser = BROWSER || 'chrome';
|
||||
const headless = typeof HEADLESS === 'undefined' ? true : HEADLESS === 'true';
|
||||
const platform = os.platform();
|
||||
const {weightedTestFiles} = getSortedTestFiles(platform, browser, headless);
|
||||
|
||||
if (!weightedTestFiles.length) {
|
||||
console.log(chalk.red('Nothing to test!'));
|
||||
return;
|
||||
}
|
||||
|
||||
const data = await createAndStartCycle({
|
||||
repo: REPO,
|
||||
branch: BRANCH,
|
||||
build: BUILD_ID,
|
||||
files: weightedTestFiles,
|
||||
});
|
||||
|
||||
console.log(chalk.green('Successfully generated a test cycle.'));
|
||||
console.log(data.cycle);
|
||||
}
|
||||
|
||||
main();
|
||||
31177
e2e/cypress/package-lock.json
сгенерированный
Обычный файл
100
e2e/cypress/package.json
Обычный файл
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@babel/eslint-parser": "7.19.1",
|
||||
"@babel/eslint-plugin": "7.19.1",
|
||||
"@cypress/request": "2.88.11",
|
||||
"@cypress/skip-test": "2.6.1",
|
||||
"@mattermost/types": "7.4.0",
|
||||
"@testing-library/cypress": "9.0.0",
|
||||
"@types/async": "3.2.16",
|
||||
"@types/authenticator": "1.1.1",
|
||||
"@types/express": "4.17.15",
|
||||
"@types/fs-extra": "11.0.1",
|
||||
"@types/lodash": "4.14.191",
|
||||
"@types/lodash.intersection": "4.4.7",
|
||||
"@types/lodash.mapkeys": "4.6.7",
|
||||
"@types/lodash.without": "4.4.7",
|
||||
"@types/mime-types": "2.1.1",
|
||||
"@types/mochawesome": "6.2.1",
|
||||
"@types/pdf-parse": "1.1.1",
|
||||
"@types/recursive-readdir": "2.2.1",
|
||||
"@types/shelljs": "0.8.11",
|
||||
"@types/uuid": "9.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.55.0",
|
||||
"@typescript-eslint/parser": "5.55.0",
|
||||
"async": "3.2.4",
|
||||
"authenticator": "1.1.5",
|
||||
"aws-sdk": "2.1295.0",
|
||||
"axios": "1.2.2",
|
||||
"axios-retry": "3.3.1",
|
||||
"chai": "4.3.7",
|
||||
"chalk": "4.1.2",
|
||||
"client-oauth2": "github:larkox/js-client-oauth2#e24e2eb5dfcbbbb3a59d095e831dbe0012b0ac49",
|
||||
"cross-env": "7.0.3",
|
||||
"cypress": "12.3.0",
|
||||
"cypress-file-upload": "5.0.8",
|
||||
"cypress-multi-reporters": "1.6.2",
|
||||
"cypress-plugin-tab": "1.0.5",
|
||||
"cypress-wait-until": "1.7.2",
|
||||
"dayjs": "1.11.7",
|
||||
"deepmerge": "4.2.2",
|
||||
"dotenv": "16.0.3",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-import-resolver-webpack": "0.13.2",
|
||||
"eslint-plugin-cypress": "2.12.1",
|
||||
"eslint-plugin-header": "3.1.1",
|
||||
"eslint-plugin-import": "2.27.5",
|
||||
"eslint-plugin-mattermost": "github:mattermost/eslint-plugin-mattermost#5b0c972eacf19286e4c66221b39113bf8728a99e",
|
||||
"eslint-plugin-no-only-tests": "3.1.0",
|
||||
"eslint-plugin-react": "7.32.2",
|
||||
"express": "4.18.2",
|
||||
"extract-zip": "2.0.1",
|
||||
"knex": "2.4.0",
|
||||
"localforage": "1.10.0",
|
||||
"lodash.intersection": "4.4.0",
|
||||
"lodash.mapkeys": "4.6.0",
|
||||
"lodash.without": "4.4.0",
|
||||
"lodash.xor": "4.5.0",
|
||||
"mattermost-redux": "5.33.1",
|
||||
"mime": "3.0.0",
|
||||
"mime-types": "2.1.35",
|
||||
"mocha": "10.2.0",
|
||||
"mocha-junit-reporter": "2.2.0",
|
||||
"mocha-multi-reporters": "1.5.1",
|
||||
"mochawesome": "7.1.3",
|
||||
"mochawesome-merge": "4.2.2",
|
||||
"mochawesome-report-generator": "6.2.0",
|
||||
"moment-timezone": "0.5.40",
|
||||
"mysql": "2.18.1",
|
||||
"path": "0.12.7",
|
||||
"pdf-parse": "1.1.1",
|
||||
"pg": "8.8.0",
|
||||
"recursive-readdir": "2.2.3",
|
||||
"shelljs": "0.8.5",
|
||||
"timezones.json": "1.6.1",
|
||||
"typescript": "4.9.4",
|
||||
"uuid": "9.0.0",
|
||||
"yargs": "17.6.2"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "patch-package",
|
||||
"check-types": "tsc -b",
|
||||
"cypress:open": "cross-env TZ=Etc/UTC cypress open",
|
||||
"cypress:run": "cross-env TZ=Etc/UTC cypress run",
|
||||
"cypress:run:chrome": "cross-env TZ=Etc/UTC cypress run --browser chrome",
|
||||
"cypress:run:firefox": "cross-env TZ=Etc/UTC cypress run --browser firefox",
|
||||
"cypress:run:edge": "cross-env TZ=Etc/UTC cypress run --browser edge",
|
||||
"cypress:run:electron": "cross-env TZ=Etc/UTC cypress run --browser electron",
|
||||
"benchmarks:run-server": "cd mattermost && bin/mattermost",
|
||||
"start:webhook": "node webhook_serve.js",
|
||||
"pretest": "npm run clean",
|
||||
"test": "cross-env TZ=Etc/UTC cypress run",
|
||||
"test:ci": "node run_tests.js",
|
||||
"uniq-meta": "grep -r \"^// $META:\" cypress | grep -ow '@\\w*' | sort | uniq",
|
||||
"check": "eslint --ext .js,.ts . --quiet --cache",
|
||||
"fix": "eslint --ext .js,.ts . --quiet --fix --cache"
|
||||
},
|
||||
"dependencies": {
|
||||
"patch-package": "6.5.1"
|
||||
}
|
||||
}
|
||||
13
e2e/cypress/patches/@testing-library+cypress+9.0.0.patch
Обычный файл
@@ -0,0 +1,13 @@
|
||||
diff --git a/node_modules/@testing-library/cypress/dist/index.js b/node_modules/@testing-library/cypress/dist/index.js
|
||||
index 9a03c94..b2d3aac 100644
|
||||
--- a/node_modules/@testing-library/cypress/dist/index.js
|
||||
+++ b/node_modules/@testing-library/cypress/dist/index.js
|
||||
@@ -38,7 +38,7 @@ function createQuery(queryName, implementationName) {
|
||||
};
|
||||
const log = options.log !== false && Cypress.log({
|
||||
name: queryName,
|
||||
- type: this.get('prev').get('chainerId') === this.get('chainerId') ? 'child' : 'parent',
|
||||
+ type: this.get('prev') && this.get('prev').get('chainerId') === this.get('chainerId') ? 'child' : 'parent',
|
||||
message: inputArr,
|
||||
timeout: options.timeout,
|
||||
consoleProps: () => consoleProps
|
||||
278
e2e/cypress/run_test_cycle.js
Обычный файл
@@ -0,0 +1,278 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
/* eslint-disable no-await-in-loop, no-console */
|
||||
|
||||
/*
|
||||
* This command, which is normally used in CI, runs Cypress test in full or partial
|
||||
* depending on test metadata and environment capabilities.
|
||||
* Spec file to run is dependent from Test Automation Dashboard and each test result is being
|
||||
* recorded on a per spec file basis.
|
||||
*
|
||||
* Usage: [ENVIRONMENT] node run_test_cycle.js
|
||||
*
|
||||
* Environment:
|
||||
* AUTOMATION_DASHBOARD_URL : Dashboard URL
|
||||
* AUTOMATION_DASHBOARD_TOKEN : Dashboard token
|
||||
* REPO : Project repository, ex. mattermost-webapp
|
||||
* BRANCH : Branch identifier from CI
|
||||
* BUILD_ID : Build identifier from CI
|
||||
* CI_BASE_URL : Test server base URL in CI
|
||||
*
|
||||
* Example:
|
||||
* 1. "node run_test_cycle.js"
|
||||
* - will run all the specs available from the Automation dashboard
|
||||
*/
|
||||
|
||||
const axios = require('axios');
|
||||
const axiosRetry = require('axios-retry');
|
||||
const chalk = require('chalk');
|
||||
const cypress = require('cypress');
|
||||
|
||||
const {
|
||||
getSpecToTest,
|
||||
recordSpecResult,
|
||||
updateCycle,
|
||||
uploadScreenshot,
|
||||
} = require('./utils/dashboard');
|
||||
const {writeJsonToFile} = require('./utils/report');
|
||||
const {MOCHAWESOME_REPORT_DIR, RESULTS_DIR} = require('./utils/constants');
|
||||
|
||||
require('dotenv').config();
|
||||
axiosRetry(axios, {
|
||||
retries: 5,
|
||||
retryDelay: axiosRetry.exponentialDelay,
|
||||
});
|
||||
|
||||
const {
|
||||
BRANCH,
|
||||
BROWSER,
|
||||
BUILD_ID,
|
||||
CI_BASE_URL,
|
||||
HEADLESS,
|
||||
REPO,
|
||||
} = process.env;
|
||||
|
||||
async function runCypressTest(specExecution) {
|
||||
const browser = BROWSER || 'chrome';
|
||||
const headless = isHeadless();
|
||||
|
||||
const result = await cypress.run({
|
||||
browser,
|
||||
headless,
|
||||
spec: specExecution.file,
|
||||
config: {
|
||||
screenshotsFolder: `${MOCHAWESOME_REPORT_DIR}/screenshots`,
|
||||
trashAssetsBeforeRuns: false,
|
||||
},
|
||||
reporter: 'cypress-multi-reporters',
|
||||
reporterOptions: {
|
||||
reporterEnabled: 'mocha-junit-reporter, mochawesome',
|
||||
mochaJunitReporterReporterOptions: {
|
||||
mochaFile: 'results/junit/test_results[hash].xml',
|
||||
toConsole: false,
|
||||
},
|
||||
mochawesomeReporterOptions: {
|
||||
reportDir: MOCHAWESOME_REPORT_DIR,
|
||||
reportFilename: `json/${specExecution.file}`,
|
||||
quiet: true,
|
||||
overwrite: false,
|
||||
html: false,
|
||||
json: true,
|
||||
testMeta: {
|
||||
browser,
|
||||
headless,
|
||||
branch: BRANCH,
|
||||
buildId: BUILD_ID,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
async function saveResult(specExecution, result, testIndex) {
|
||||
// Write and update test environment details once
|
||||
if (testIndex === 0) {
|
||||
const environment = {
|
||||
cypress_version: result.cypressVersion,
|
||||
browser_name: result.browserName,
|
||||
browser_version: result.browserVersion,
|
||||
headless: isHeadless(),
|
||||
os_name: result.osName,
|
||||
os_version: result.osVersion,
|
||||
node_version: process.version,
|
||||
};
|
||||
|
||||
writeJsonToFile(environment, 'environment.json', RESULTS_DIR);
|
||||
await updateCycle(specExecution.cycle_id, environment);
|
||||
}
|
||||
|
||||
const {stats, tests, spec} = result.runs[0];
|
||||
|
||||
const specPatch = {
|
||||
file: spec.relative,
|
||||
tests: spec.tests,
|
||||
pass: stats.passes,
|
||||
fail: stats.failures,
|
||||
pending: stats.pending,
|
||||
skipped: stats.skipped,
|
||||
duration: stats.duration || 0,
|
||||
test_start_at: stats.startedAt,
|
||||
test_end_at: stats.endedAt,
|
||||
};
|
||||
|
||||
const testCases = [];
|
||||
for (let i = 0; i < tests.length; i++) {
|
||||
const test = tests[i];
|
||||
const attempts = test.attempts[0];
|
||||
|
||||
const testCase = {
|
||||
title: test.title,
|
||||
full_title: test.title.join(' '),
|
||||
state: attempts.state,
|
||||
duration: attempts.duration || 0,
|
||||
code: trimToMaxLength(test.body),
|
||||
};
|
||||
|
||||
if (attempts.startedAt) {
|
||||
testCase.test_start_at = attempts.startedAt;
|
||||
}
|
||||
|
||||
if (test.displayError) {
|
||||
testCase.error_display = trimToMaxLength(test.displayError);
|
||||
}
|
||||
|
||||
const errorFrame = attempts.error && attempts.error.codeFrame && attempts.error.codeFrame.frame;
|
||||
if (errorFrame) {
|
||||
testCase.error_frame = trimToMaxLength(errorFrame);
|
||||
}
|
||||
|
||||
if (attempts.screenshots && attempts.screenshots.length > 0) {
|
||||
const path = test.attempts[0].screenshots[0].path;
|
||||
const screenshotUrl = await uploadScreenshot(path, REPO, BRANCH, BUILD_ID);
|
||||
if (typeof screenshotUrl === 'string' && !screenshotUrl.error) {
|
||||
testCase.screenshot = {url: screenshotUrl};
|
||||
}
|
||||
}
|
||||
|
||||
testCases.push(testCase);
|
||||
}
|
||||
|
||||
await recordSpecResult(specExecution.id, specPatch, testCases);
|
||||
}
|
||||
|
||||
function isHeadless() {
|
||||
return typeof HEADLESS === 'undefined' ? true : HEADLESS === 'true';
|
||||
}
|
||||
|
||||
function trimToMaxLength(text) {
|
||||
const maxLength = 5000;
|
||||
return text && text.length > maxLength ? text.substring(0, maxLength) : text;
|
||||
}
|
||||
|
||||
function printSummary(summary) {
|
||||
const obj = summary.reduce((acc, item) => {
|
||||
const {server, state, count} = item;
|
||||
if (!server) {
|
||||
return acc;
|
||||
}
|
||||
|
||||
if (acc[server]) {
|
||||
acc[server][state] = count;
|
||||
} else {
|
||||
acc[server] = {[state]: count, server};
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
Object.values(obj).sort((a, b) => {
|
||||
return a.server.localeCompare(b.server);
|
||||
}).forEach((item) => {
|
||||
const {server, done, started} = item;
|
||||
console.log(chalk.magenta(`${server}: done: ${done || 0}, started: ${started || 0}`));
|
||||
});
|
||||
}
|
||||
|
||||
const maxRetryCount = 5;
|
||||
async function runSpecFragment(count, retry) {
|
||||
console.log(chalk.magenta(`Preparing for: ${count + 1}`));
|
||||
|
||||
const spec = await getSpecToTest({
|
||||
repo: REPO,
|
||||
branch: BRANCH,
|
||||
build: BUILD_ID,
|
||||
server: CI_BASE_URL,
|
||||
});
|
||||
|
||||
// Retry on connection/timeout errors
|
||||
if (!spec || spec.code) {
|
||||
if (retry >= maxRetryCount) {
|
||||
return {
|
||||
tryNext: false,
|
||||
count,
|
||||
message: `Test ended due to multiple (${retry}) connection/timeout errors with the dashboard server.`,
|
||||
};
|
||||
}
|
||||
|
||||
console.log(chalk.red(`Retry count: ${retry}`));
|
||||
return runSpecFragment(count, retry + 1);
|
||||
}
|
||||
|
||||
if (!spec.execution || !spec.execution.file) {
|
||||
return {
|
||||
tryNext: false,
|
||||
count,
|
||||
message: spec.message,
|
||||
};
|
||||
}
|
||||
|
||||
const currentTestCount = spec.summary.reduce((total, item) => {
|
||||
return total + parseInt(item.count, 10);
|
||||
}, 0);
|
||||
|
||||
printSummary(spec.summary);
|
||||
console.log(chalk.magenta(`\n(Testing ${currentTestCount} of ${spec.cycle.specs_registered}) - ${spec.execution.file}`));
|
||||
console.log(chalk.magenta(`At "${process.env.CI_BASE_URL}" server`));
|
||||
|
||||
const result = await runCypressTest(spec.execution);
|
||||
await saveResult(spec.execution, result, count);
|
||||
|
||||
const newCount = count + 1;
|
||||
|
||||
if (spec.cycle.specs_registered === currentTestCount) {
|
||||
return {
|
||||
tryNext: false,
|
||||
count: newCount,
|
||||
message: `Completed testing of all registered ${currentTestCount} spec/s.`,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
tryNext: true,
|
||||
count: newCount,
|
||||
retry: 0,
|
||||
message: 'Continue testing',
|
||||
};
|
||||
}
|
||||
|
||||
async function runSpec(count = 0, retry = 0) {
|
||||
const fragment = await runSpecFragment(count, retry);
|
||||
if (fragment.tryNext) {
|
||||
return runSpec(fragment.count, fragment.retry);
|
||||
}
|
||||
|
||||
return {
|
||||
count: fragment.count,
|
||||
message: fragment.message,
|
||||
};
|
||||
}
|
||||
|
||||
runSpec().then(({count, message}) => {
|
||||
console.log(chalk.magenta(message));
|
||||
if (count > 0) {
|
||||
console.log(chalk.magenta(`This test runner has completed ${count} spec file/s.`));
|
||||
}
|
||||
});
|
||||
177
e2e/cypress/run_tests.js
Обычный файл
@@ -0,0 +1,177 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
/* eslint-disable no-await-in-loop, no-console */
|
||||
|
||||
/*
|
||||
* This command, which normally use in CI, runs Cypress test in full or partial
|
||||
* depending on test metadata and environment capabilities.
|
||||
*
|
||||
* Usage: [ENVIRONMENT] node run_tests.js [options]
|
||||
*
|
||||
* Options:
|
||||
* --stage=[stage]
|
||||
* Selects spec files with matching stage. It can be of multiple values separated by comma.
|
||||
* E.g. "--stage='@prod,@dev'" will select files with either @prod or @dev.
|
||||
* --group=[group]
|
||||
* Selects spec files with matching group. It can be of multiple values separated by comma.
|
||||
* E.g. "--group='@channel,@messaging'" will select files with either @channel or @messaging.
|
||||
* --invert
|
||||
* Selected files are those not matching any of the specified stage or group.
|
||||
* --include-group=[group]
|
||||
* Include spec files with matching group. It can be of multiple values separated by comma.
|
||||
* E.g. "--include-group='@enterprise'" will select files including @enterprise.
|
||||
* --exclude-group=[group]
|
||||
* Exclude spec files with matching group. It can be of multiple values separated by comma.
|
||||
* E.g. "--exclude-group='@enterprise'" will select files except @enterprise.
|
||||
* --include-file=[filename or directory]
|
||||
* Include spec files with matching directory or filename pattern. Uses `find` command under the hood. It can be of multiple values separated by comma.
|
||||
* E.g. "--include-file='channel'" will include files recursively under `channel` directory/s.
|
||||
* E.g. "--include-file='*channel*'" will include files and files under directory/s recursively that matches the name with `*channel*`.
|
||||
* --exclude-file=[filename or directory]
|
||||
* Exclude spec files with matching directory or filename pattern. Uses `find` command under the hood. It can be of multiple values separated by comma.
|
||||
* E.g. "--exclude-file='channel'" will exclude files recursively under `channel` directory/s.
|
||||
* E.g. "--exclude-file='*channel*'" will exclude files and files under directory/s recursively that matches the name with `*channel*`.
|
||||
|
||||
*
|
||||
* Environment:
|
||||
* BROWSER=[browser] : Chrome by default. Set to run test on other browser such as chrome, edge, electron and firefox.
|
||||
* The environment should have the specified browser to successfully run.
|
||||
* HEADLESS=[boolean] : Headless by default (true) or false to run on headed mode.
|
||||
* BRANCH=[branch] : Branch identifier from CI
|
||||
* BUILD_ID=[build_id] : Build identifier from CI
|
||||
* CI_BASE_URL=[ci_base_url] : Test server base URL in CI
|
||||
*
|
||||
* Example:
|
||||
* 1. "node run_tests.js"
|
||||
* - will run all the specs on default test environment, except those matching skipped metadata
|
||||
* 2. "node run_tests.js --stage='@prod'"
|
||||
* - will run all production tests, except those matching skipped metadata
|
||||
* 3. "node run_tests.js --stage='@prod' --invert"
|
||||
* - will run all non-production tests
|
||||
* 4. "BROWSER='chrome' HEADLESS='false' node run_tests.js --stage='@prod' --group='@channel,@messaging'"
|
||||
* - will run spec files matching stage and group values in Chrome (headed)
|
||||
* 5. "node run_tests.js --stage='@prod' --exclude-group='@enterprise'"
|
||||
* - will run all production tests except @enterprise group
|
||||
* - typical test run for Team Edition
|
||||
* 6. "node run_tests.js --stage='@prod' --part=1 --of=2"
|
||||
* - will run the first half (1 of 2) of all production tests
|
||||
* - will be used for parallel testing where each part could run separately against its own test server
|
||||
*/
|
||||
|
||||
const os = require('os');
|
||||
|
||||
const chalk = require('chalk');
|
||||
const cypress = require('cypress');
|
||||
const argv = require('yargs').argv;
|
||||
|
||||
const {getSortedTestFiles} = require('./utils/file');
|
||||
const {getTestFilesIdentifier} = require('./utils/even_distribution');
|
||||
const {writeJsonToFile} = require('./utils/report');
|
||||
const {MOCHAWESOME_REPORT_DIR, RESULTS_DIR} = require('./utils/constants');
|
||||
|
||||
require('dotenv').config();
|
||||
|
||||
async function runTests() {
|
||||
const {
|
||||
BRANCH,
|
||||
BROWSER,
|
||||
BUILD_ID,
|
||||
HEADLESS,
|
||||
} = process.env;
|
||||
|
||||
const browser = BROWSER || 'chrome';
|
||||
const headless = typeof HEADLESS === 'undefined' ? true : HEADLESS === 'true';
|
||||
const platform = os.platform();
|
||||
|
||||
const {sortedFiles} = getSortedTestFiles(platform, browser, headless);
|
||||
const numberOfTestFiles = sortedFiles.length;
|
||||
|
||||
if (!numberOfTestFiles) {
|
||||
console.log(chalk.red('Nothing to test!'));
|
||||
return;
|
||||
}
|
||||
|
||||
const {
|
||||
start,
|
||||
end,
|
||||
count,
|
||||
} = getTestFilesIdentifier(numberOfTestFiles, argv.part, argv.of);
|
||||
|
||||
for (let i = start, j = 0; i < end && j < count; i++, j++) {
|
||||
printMessage(sortedFiles, i, j + 1, count);
|
||||
|
||||
const testFile = sortedFiles[i];
|
||||
|
||||
const result = await cypress.run({
|
||||
browser,
|
||||
headless,
|
||||
spec: testFile,
|
||||
config: {
|
||||
screenshotsFolder: `${MOCHAWESOME_REPORT_DIR}/screenshots`,
|
||||
trashAssetsBeforeRuns: false,
|
||||
},
|
||||
env: {
|
||||
firstTest: j === 0,
|
||||
},
|
||||
reporter: 'cypress-multi-reporters',
|
||||
reporterOptions: {
|
||||
reporterEnabled: 'mocha-junit-reporter, mochawesome',
|
||||
mochaJunitReporterReporterOptions: {
|
||||
mochaFile: 'results/junit/test_results[hash].xml',
|
||||
toConsole: false,
|
||||
},
|
||||
mochawesomeReporterOptions: {
|
||||
reportDir: MOCHAWESOME_REPORT_DIR,
|
||||
reportFilename: `json/${testFile}`,
|
||||
quiet: true,
|
||||
overwrite: false,
|
||||
html: false,
|
||||
json: true,
|
||||
testMeta: {
|
||||
platform,
|
||||
browser,
|
||||
headless,
|
||||
branch: BRANCH,
|
||||
buildId: BUILD_ID,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// Write test environment details once only
|
||||
if (i === 0) {
|
||||
const environment = {
|
||||
cypress_version: result.cypressVersion,
|
||||
browser_name: result.browserName,
|
||||
browser_version: result.browserVersion,
|
||||
headless,
|
||||
os_name: result.osName,
|
||||
os_version: result.osVersion,
|
||||
node_version: process.version,
|
||||
};
|
||||
|
||||
writeJsonToFile(environment, 'environment.json', RESULTS_DIR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function printMessage(testFiles, overallIndex, currentItem, lastItem) {
|
||||
const {invert, excludeGroup, group, stage} = argv;
|
||||
|
||||
const testFile = testFiles[overallIndex];
|
||||
const testStage = stage ? `Stage: "${stage}" ` : '';
|
||||
const withGroup = group || excludeGroup;
|
||||
const groupMessage = group ? `"${group}"` : 'All';
|
||||
const excludeGroupMessage = excludeGroup ? `except "${excludeGroup}"` : '';
|
||||
const testGroup = withGroup ? `Group: ${groupMessage} ${excludeGroupMessage}` : '';
|
||||
|
||||
// Log which files were being tested
|
||||
console.log(chalk.magenta.bold(`${invert ? 'All Except --> ' : ''}${testStage}${stage && withGroup ? '| ' : ''}${testGroup}`));
|
||||
console.log(chalk.magenta(`(Testing ${overallIndex + 1} of ${testFiles.length}) - `, testFile));
|
||||
if (process.env.CI_BASE_URL) {
|
||||
console.log(chalk.magenta(`Testing ${currentItem}/${lastItem} in "${process.env.CI_BASE_URL}" server`));
|
||||
}
|
||||
}
|
||||
|
||||
runTests();
|
||||
114
e2e/cypress/save_report.js
Обычный файл
@@ -0,0 +1,114 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
/* eslint-disable no-console */
|
||||
|
||||
/*
|
||||
* This is used for saving artifacts to AWS S3, sending data to automation dashboard and
|
||||
* publishing quick summary to community channels.
|
||||
*
|
||||
* Usage: [ENV] node save_report.js
|
||||
*
|
||||
* Environment variables:
|
||||
* BRANCH=[branch] : Branch identifier from CI
|
||||
* BUILD_ID=[build_id] : Build identifier from CI
|
||||
* BUILD_TAG=[build_tag] : Docker image used to run the test
|
||||
*
|
||||
* For saving artifacts to AWS S3
|
||||
* - AWS_S3_BUCKET, AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
|
||||
* For saving test cases to Test Management
|
||||
* - TM4J_ENABLE=true|false
|
||||
* - TM4J_API_KEY=[api_key]
|
||||
* - JIRA_PROJECT_KEY=[project_key], e.g. "MM",
|
||||
* - TM4J_FOLDER_ID=[folder_id], e.g. 847997
|
||||
* For sending hooks to Mattermost channels
|
||||
* - FULL_REPORT, WEBHOOK_URL and DIAGNOSTIC_WEBHOOK_URL
|
||||
* Test type
|
||||
* - TYPE=[type], e.g. "MASTER", "PR", "RELEASE", "CLOUD"
|
||||
*/
|
||||
|
||||
const {merge} = require('mochawesome-merge');
|
||||
const generator = require('mochawesome-report-generator');
|
||||
|
||||
const {
|
||||
generateDiagnosticReport,
|
||||
generateShortSummary,
|
||||
generateTestReport,
|
||||
removeOldGeneratedReports,
|
||||
sendReport,
|
||||
readJsonFromFile,
|
||||
writeJsonToFile,
|
||||
} = require('./utils/report');
|
||||
const {saveArtifacts} = require('./utils/artifacts');
|
||||
const {MOCHAWESOME_REPORT_DIR, RESULTS_DIR} = require('./utils/constants');
|
||||
const {createTestCycle, createTestExecutions} = require('./utils/test_cases');
|
||||
|
||||
require('dotenv').config();
|
||||
|
||||
const saveReport = async () => {
|
||||
const {
|
||||
BRANCH,
|
||||
BUILD_ID,
|
||||
BUILD_TAG,
|
||||
DIAGNOSTIC_WEBHOOK_URL,
|
||||
DIAGNOSTIC_USER_ID,
|
||||
DIAGNOSTIC_TEAM_ID,
|
||||
TM4J_ENABLE,
|
||||
TM4J_CYCLE_KEY,
|
||||
TYPE,
|
||||
WEBHOOK_URL,
|
||||
} = process.env;
|
||||
|
||||
removeOldGeneratedReports();
|
||||
|
||||
// Merge all json reports into one single json report
|
||||
const jsonReport = await merge({files: [`${MOCHAWESOME_REPORT_DIR}/**/*.json`]});
|
||||
writeJsonToFile(jsonReport, 'all.json', MOCHAWESOME_REPORT_DIR);
|
||||
|
||||
// Generate the html report file
|
||||
await generator.create(
|
||||
jsonReport,
|
||||
{
|
||||
reportDir: MOCHAWESOME_REPORT_DIR,
|
||||
reportTitle: `Build:${BUILD_ID} Branch: ${BRANCH} Tag: ${BUILD_TAG}`,
|
||||
},
|
||||
);
|
||||
|
||||
// Generate short summary, write to file and then send report via webhook
|
||||
const summary = generateShortSummary(jsonReport);
|
||||
console.log(summary);
|
||||
writeJsonToFile(summary, 'summary.json', MOCHAWESOME_REPORT_DIR);
|
||||
|
||||
const result = await saveArtifacts();
|
||||
if (result && result.success) {
|
||||
console.log('Successfully uploaded artifacts to S3:', result.reportLink);
|
||||
}
|
||||
|
||||
// Create or use an existing test cycle
|
||||
let testCycle = {};
|
||||
if (TM4J_ENABLE === 'true') {
|
||||
const {start, end} = jsonReport.stats;
|
||||
testCycle = TM4J_CYCLE_KEY ? {key: TM4J_CYCLE_KEY} : await createTestCycle(start, end);
|
||||
}
|
||||
|
||||
// Send test report to "QA: UI Test Automation" channel via webhook
|
||||
if (TYPE && TYPE !== 'NONE' && WEBHOOK_URL) {
|
||||
const environment = readJsonFromFile(`${RESULTS_DIR}/environment.json`);
|
||||
const data = generateTestReport(summary, result && result.success, result && result.reportLink, environment, testCycle.key);
|
||||
await sendReport('summary report to Community channel', WEBHOOK_URL, data);
|
||||
}
|
||||
|
||||
// Send diagnostic report via webhook
|
||||
// Send on "RELEASE" type only
|
||||
if (TYPE === 'RELEASE' && DIAGNOSTIC_WEBHOOK_URL && DIAGNOSTIC_USER_ID && DIAGNOSTIC_TEAM_ID) {
|
||||
const data = generateDiagnosticReport(summary, {userId: DIAGNOSTIC_USER_ID, teamId: DIAGNOSTIC_TEAM_ID});
|
||||
await sendReport('test info for diagnostic analysis', DIAGNOSTIC_WEBHOOK_URL, data);
|
||||
}
|
||||
|
||||
// Save test cases to Test Management
|
||||
if (TM4J_ENABLE === 'true') {
|
||||
await createTestExecutions(jsonReport, testCycle);
|
||||
}
|
||||
};
|
||||
|
||||
saveReport();
|
||||
@@ -0,0 +1,21 @@
|
||||
/* eslint-disable header/header */
|
||||
|
||||
// taken from https://github.com/guilryder/chrome-extensions/tree/master/xframe_ignore
|
||||
|
||||
/*global chrome*/
|
||||
|
||||
var HEADERS_TO_STRIP_LOWERCASE = [
|
||||
'content-security-policy',
|
||||
'x-frame-options',
|
||||
];
|
||||
|
||||
chrome.webRequest.onHeadersReceived.addListener(
|
||||
(details) => {
|
||||
return {
|
||||
responseHeaders: details.responseHeaders.filter((header) => {
|
||||
return HEADERS_TO_STRIP_LOWERCASE.indexOf(header.name.toLowerCase()) < 0;
|
||||
}),
|
||||
};
|
||||
}, {
|
||||
urls: ['<all_urls>'],
|
||||
}, ['blocking', 'responseHeaders']);
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"update_url": "https://clients2.google.com/service/update2/crx",
|
||||
"manifest_version": 2,
|
||||
"name": "Ignore X-Frame headers",
|
||||
"description": "Drops X-Frame-Options and Content-Security-Policy HTTP response headers, allowing all pages to be iframed.",
|
||||
"version": "1.1",
|
||||
"background": {
|
||||
"scripts": [
|
||||
"background.js"
|
||||
]
|
||||
},
|
||||
"permissions": [
|
||||
"webRequest",
|
||||
"webRequestBlocking",
|
||||
"<all_urls>"
|
||||
]
|
||||
}
|
||||
Двоичные данные
e2e/cypress/tests/fixtures/MM-logo-horizontal.png
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 21 KiB |
Двоичные данные
e2e/cypress/tests/fixtures/animated-gif-image-file.gif
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 341 KiB |
Двоичные данные
e2e/cypress/tests/fixtures/bmp-image-file.bmp
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 769 KiB |
Двоичные данные
e2e/cypress/tests/fixtures/bot-default-avatar.png
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 3.3 KiB |
22
e2e/cypress/tests/fixtures/client_billing.json
поставляемый
Обычный файл
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"mastercard":{
|
||||
"cardNumber":"5555555555554444",
|
||||
"expDate":"4242",
|
||||
"cvc":"412"
|
||||
},
|
||||
"visa":{
|
||||
"cardNumber":"4242424242424242",
|
||||
"expDate":"4242",
|
||||
"cvc":"412"
|
||||
},
|
||||
"unionpay":{
|
||||
"cardNumber":"6200000000000005",
|
||||
"expDate":"1244",
|
||||
"cvc":"123"
|
||||
},
|
||||
"invalidvisa":{
|
||||
"cardNumber":"4242424242424141",
|
||||
"expDate":"1212",
|
||||
"cvc":"12"
|
||||
}
|
||||
}
|
||||
425
e2e/cypress/tests/fixtures/console-example-inputs.json
поставляемый
Обычный файл
@@ -0,0 +1,425 @@
|
||||
[
|
||||
{
|
||||
"section": "about.license",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/about/license",
|
||||
"selector": "remove-button"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "reporting.system_analytics",
|
||||
"disabledInputs": []
|
||||
},
|
||||
{
|
||||
"section": "reporting.team_statistics",
|
||||
"disabledInputs": []
|
||||
},
|
||||
{
|
||||
"section": "reporting.server_logs",
|
||||
"disabledInputs": []
|
||||
},
|
||||
{
|
||||
"section": "user_management.system_users",
|
||||
"disabledInputs": []
|
||||
},
|
||||
{
|
||||
"section": "user_management.groups",
|
||||
"disabledInputs": []
|
||||
},
|
||||
{
|
||||
"section": "user_management.teams",
|
||||
"disabledInputs": []
|
||||
},
|
||||
{
|
||||
"section": "user_management.channel",
|
||||
"disabledInputs": []
|
||||
},
|
||||
{
|
||||
"section": "user_management.permissions",
|
||||
"disabledInputs": []
|
||||
},
|
||||
{
|
||||
"section": "environment.web_server",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/environment/web_server",
|
||||
"selector": "ServiceSettings.ListenAddressinput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "site.customization",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "admin_console/site_config/customization",
|
||||
"selector": "TeamSettings.SiteNameinput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "site.localization",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "admin_console/site_config/localization",
|
||||
"selector": "LocalizationSettings.DefaultServerLocaledropdown"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "site.users_and_teams",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "admin_console/site_config/users_and_teams",
|
||||
"selector": "TeamSettings.MaxUsersPerTeamnumber"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "site.notifications",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "admin_console/environment/notifications",
|
||||
"selector": "TeamSettings.EnableConfirmNotificationsToChanneltrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "site.announcement_banner",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "admin_console/site_config/announcement_banner",
|
||||
"selector": "AnnouncementSettings.EnableBannertrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "site.emoji",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "admin_console/site_config/emoji",
|
||||
"selector": "ServiceSettings.EnableEmojiPickertrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "site.posts",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "admin_console/site_config/posts",
|
||||
"selector": "ServiceSettings.EnableLinkPreviewstrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "site.file_sharing_downloads",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "admin_console/site_config/file_sharing_downloads",
|
||||
"selector": "FileSettings.EnableFileAttachmentstrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "site.public_links",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "admin_console/site_config/public_links",
|
||||
"selector": "FileSettings.EnablePublicLinktrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "site.notices",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "admin_console/site_config/notices",
|
||||
"selector": "AnnouncementSettings.AdminNoticesEnabledtrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "environment.database",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/environment/database",
|
||||
"selector": "maxIdleConnsinput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "environment.elasticsearch",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/environment/elasticsearch",
|
||||
"selector": "enableIndexingtrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "environment.storage",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/environment/file_storage",
|
||||
"selector": "FileSettings.DriverNamedropdown"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "environment.image_proxy",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/environment/image_proxy",
|
||||
"selector": "ImageProxySettings.Enabletrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "environment.smtp",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/environment/smtp",
|
||||
"selector": "EmailSettings.EnableSMTPAuthtrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "environment.push_notification_server",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/environment/push_notification_server",
|
||||
"selector": "pushNotificationServerTypedropdown"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "environment.high_availability",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/environment/high_availability",
|
||||
"selector": "Enabletrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "environment.rate_limiting",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/environment/rate_limiting",
|
||||
"selector": "RateLimitSettings.Enabletrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "environment.logging",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/environment/logging",
|
||||
"selector": "LogSettings.ConsoleLeveldropdown"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "environment.session_lengths",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/environment/session_lengths",
|
||||
"selector": "sessionLengthWebInDaysinput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "environment.metrics",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/environment/performance_monitoring",
|
||||
"selector": "MetricsSettings.ListenAddressinput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "environment.developer",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/environment/developer",
|
||||
"selector": "ServiceSettings.EnableTestingtrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "authentication.signup",
|
||||
"disabledInputs":[
|
||||
{
|
||||
"path": "/admin_console/authentication/signup",
|
||||
"selector": "TeamSettings.EnableUserCreationfalse"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "authentication.email",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/authentication/email",
|
||||
"selector": "EmailSettings.EnableSignUpWithEmailfalse"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "authentication.password",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/authentication/password",
|
||||
"selector": "passwordMinimumLengthinput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "authentication.mfa",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/authentication/mfa",
|
||||
"selector": "ServiceSettings.EnableMultifactorAuthenticationfalse"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "authentication.ldap",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/authentication/ldap",
|
||||
"selector": "LdapSettings.Enablefalse"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "authentication.saml",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/authentication/saml",
|
||||
"selector": "SamlSettings.Enablefalse"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "authentication.openid",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/authentication/openid",
|
||||
"selector": "openidTypedropdown"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "authentication.guest_access",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/authentication/guest_access",
|
||||
"selector": "GuestAccountsSettings.Enablefalse"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "plugins",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/plugins/plugin_management",
|
||||
"selector": "marketplaceUrlinput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "integrations.integration_management",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/integrations/integration_management",
|
||||
"selector": "ServiceSettings.EnableIncomingWebhookstrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "integrations.bot_accounts",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/integrations/bot_accounts",
|
||||
"selector": "ServiceSettings.EnableBotAccountCreationtrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "integrations.gif",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/integrations/gif",
|
||||
"selector": "ServiceSettings.EnableGifPickertrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "integrations.cors",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/integrations/cors",
|
||||
"selector": "ServiceSettings.AllowCorsFrominput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "compliance.data_retention",
|
||||
"disabledInputs": []
|
||||
},
|
||||
{
|
||||
"section": "compliance.message_export",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/compliance/export",
|
||||
"selector": "enableComplianceExporttrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "compliance.audits",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/compliance/monitoring",
|
||||
"selector": "ComplianceSettings.Enabletrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "compliance.custom_terms_of_service",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/compliance/custom_terms_of_service",
|
||||
"selector": "SupportSettings.CustomTermsOfServiceEnabledtrue"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "experimental.experimental_features",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/experimental/features",
|
||||
"selector": "ExperimentalSettings.LinkMetadataTimeoutMillisecondsnumber"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "experimental.feature_flags",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/experimental/feature_flags",
|
||||
"selector": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "experimental.bleve",
|
||||
"disabledInputs": [
|
||||
{
|
||||
"path": "/admin_console/experimental/blevesearch",
|
||||
"selector": "indexDirinput"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
7
e2e/cypress/tests/fixtures/date_time_format.js
поставляемый
Обычный файл
@@ -0,0 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
module.exports = {
|
||||
TIME_12_HOUR: 'h:mm A', // no leading zeros
|
||||
TIME_24_HOUR: 'HH:mm', // with leading zeros
|
||||
};
|
||||
Двоичные данные
e2e/cypress/tests/fixtures/favicon-16x16.png
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 356 B |
Двоичные данные
e2e/cypress/tests/fixtures/favicon-default-16x16.png
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 559 B |
Двоичные данные
e2e/cypress/tests/fixtures/favicon-mentions-16x16.png
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 382 B |
Двоичные данные
e2e/cypress/tests/fixtures/favicon-unread-16x16.png
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 514 B |
Двоичные данные
e2e/cypress/tests/fixtures/gif-image-file-resized.gif
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 114 KiB |
Двоичные данные
e2e/cypress/tests/fixtures/gif-image-file.gif
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 470 KiB |
26
e2e/cypress/tests/fixtures/hooks/message_menus.json
поставляемый
Обычный файл
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"attachments": [{
|
||||
"pretext": "This is the attachment pretext.",
|
||||
"text": "This is the attachment text.",
|
||||
"actions": [{
|
||||
"name": "Select an option...",
|
||||
"integration": {
|
||||
"url": "http://localhost:3000/message_menus",
|
||||
"context": {
|
||||
"action": "do_something"
|
||||
}
|
||||
},
|
||||
"type": "select",
|
||||
"options": [{
|
||||
"text": "Option 1",
|
||||
"value": "option1"
|
||||
}, {
|
||||
"text": "Option 2",
|
||||
"value": "option2"
|
||||
}, {
|
||||
"text": "Option 3",
|
||||
"value": "option3"
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
}
|
||||
17
e2e/cypress/tests/fixtures/hooks/message_menus_with_datasource.json
поставляемый
Обычный файл
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"attachments": [{
|
||||
"pretext": "This is the attachment pretext.",
|
||||
"text": "This is the attachment text.",
|
||||
"actions": [{
|
||||
"name": "Select an option...",
|
||||
"integration": {
|
||||
"url": "http://localhost:3000/message_menus_datasource",
|
||||
"context": {
|
||||
"action": "do_something"
|
||||
}
|
||||
},
|
||||
"type": "select",
|
||||
"data_source": "channels"
|
||||
}]
|
||||
}]
|
||||
}
|
||||
Двоичные данные
e2e/cypress/tests/fixtures/huge-image.jpg
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 611 KiB |
Двоичные данные
e2e/cypress/tests/fixtures/image-1000x40.jpg
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 7.7 KiB |
Двоичные данные
e2e/cypress/tests/fixtures/image-1600x40.jpg
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 11 KiB |
Двоичные данные
e2e/cypress/tests/fixtures/image-20x20.jpg
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 956 B |
Двоичные данные
e2e/cypress/tests/fixtures/image-400x40.jpg
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 3.5 KiB |
Двоичные данные
e2e/cypress/tests/fixtures/image-400x400.jpg
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 14 KiB |
Двоичные данные
e2e/cypress/tests/fixtures/image-40x400.jpg
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 2.3 KiB |
Двоичные данные
e2e/cypress/tests/fixtures/image-50x50.jpg
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 1.0 KiB |
Двоичные данные
e2e/cypress/tests/fixtures/image-60x60.jpg
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 1.3 KiB |
Двоичные данные
e2e/cypress/tests/fixtures/image-small-height.png
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 16 KiB |
Двоичные данные
e2e/cypress/tests/fixtures/image-small-width.png
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 13 KiB |
72
e2e/cypress/tests/fixtures/interactive_message_menus_options.json
поставляемый
Обычный файл
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"many-options": [
|
||||
{"text": "Afghanistan", "value": "AF"},
|
||||
{"text": "Åland Islands", "value": "AX"},
|
||||
{"text": "Albania", "value": "AL"},
|
||||
{"text": "Algeria", "value": "DZ"},
|
||||
{"text": "American Samoa", "value": "AS"},
|
||||
{"text": "AndorrA", "value": "AD"},
|
||||
{"text": "Angola", "value": "AO"},
|
||||
{"text": "Anguilla", "value": "AI"},
|
||||
{"text": "Antarctica", "value": "AQ"},
|
||||
{"text": "Antigua and Barbuda", "value": "AG"},
|
||||
{"text": "Argentina", "value": "AR"},
|
||||
{"text": "Armenia", "value": "AM"},
|
||||
{"text": "Aruba", "value": "AW"},
|
||||
{"text": "Australia", "value": "AU"},
|
||||
{"text": "Austria", "value": "AT"},
|
||||
{"text": "Azerbaijan", "value": "AZ"},
|
||||
{"text": "Bahamas", "value": "BS"},
|
||||
{"text": "Bahrain", "value": "BH"},
|
||||
{"text": "Bangladesh", "value": "BD"},
|
||||
{"text": "Barbados", "value": "BB"},
|
||||
{"text": "Belarus", "value": "BY"},
|
||||
{"text": "Belgium", "value": "BE"},
|
||||
{"text": "Belize", "value": "BZ"},
|
||||
{"text": "Benin", "value": "BJ"},
|
||||
{"text": "Bermuda", "value": "BM"},
|
||||
{"text": "Bhutan", "value": "BT"},
|
||||
{"text": "Bolivia", "value": "BO"},
|
||||
{"text": "Bosnia and Herzegovina", "value": "BA"},
|
||||
{"text": "Botswana", "value": "BW"},
|
||||
{"text": "Bouvet Island", "value": "BV"},
|
||||
{"text": "Brazil", "value": "BR"},
|
||||
{"text": "British Indian Ocean Territory", "value": "IO"},
|
||||
{"text": "Brunei Darussalam", "value": "BN"},
|
||||
{"text": "Bulgaria", "value": "BG"},
|
||||
{"text": "Burkina Faso", "value": "BF"},
|
||||
{"text": "Burundi", "value": "BI"},
|
||||
{"text": "Cambodia", "value": "KH"},
|
||||
{"text": "Cameroon", "value": "CM"},
|
||||
{"text": "Canada", "value": "CA"},
|
||||
{"text": "Cape Verde", "value": "CV"},
|
||||
{"text": "Cayman Islands", "value": "KY"},
|
||||
{"text": "Central African Republic", "value": "CF"},
|
||||
{"text": "Chad", "value": "TD"},
|
||||
{"text": "Chile", "value": "CL"},
|
||||
{"text": "China", "value": "CN"},
|
||||
{"text": "Christmas Island", "value": "CX"},
|
||||
{"text": "Cocos (Keeling) Islands", "value": "CC"},
|
||||
{"text": "Colombia", "value": "CO"},
|
||||
{"text": "Comoros", "value": "KM"},
|
||||
{"text": "Congo", "value": "CG"},
|
||||
{"text": "Congo, The Democratic Republic of the", "value": "CD"},
|
||||
{"text": "Cook Islands", "value": "CK"},
|
||||
{"text": "Costa Rica", "value": "CR"},
|
||||
{"text": "Cote D\"Ivoire", "value": "CI"},
|
||||
{"text": "Croatia", "value": "HR"},
|
||||
{"text": "Cuba", "value": "CU"},
|
||||
{"text": "Cyprus", "value": "CY"},
|
||||
{"text": "Czech Republic", "value": "CZ"}
|
||||
],
|
||||
"distinct-options": [
|
||||
{"text": "Apple", "value": "apple"},
|
||||
{"text": "Orange", "value": "orange"},
|
||||
{"text": "Banana", "value": "banana"},
|
||||
{"text": "Grapes", "value": "grapes"},
|
||||
{"text": "Melon", "value": "melon"},
|
||||
{"text": "Mango", "value": "mango"},
|
||||
{"text": "Mango Raw", "value": "mangoraw"},
|
||||
{"text": "Avocado", "value": "avocado"}
|
||||
]
|
||||
}
|
||||
Двоичные данные
e2e/cypress/tests/fixtures/jpg-image-file.jpg
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 89 KiB |
8
e2e/cypress/tests/fixtures/ldap-add-user.ldif
поставляемый
Обычный файл
@@ -0,0 +1,8 @@
|
||||
dn: uid=e2etest.four,ou=e2etest,dc=mm,dc=test,dc=com
|
||||
changetype: add
|
||||
objectclass: iNetOrgPerson
|
||||
sn: FourLDAP
|
||||
cn: TestLDAP
|
||||
uid: e2etest.four
|
||||
mail: e2etest.four@mmtest.com
|
||||
userPassword: Password1
|
||||
43
e2e/cypress/tests/fixtures/ldap-reset-data.ldif
поставляемый
Обычный файл
@@ -0,0 +1,43 @@
|
||||
dn: uid=e2etest.one,ou=e2etest,dc=mm,dc=test,dc=com
|
||||
changetype: delete
|
||||
|
||||
dn: uid=e2etest.two,ou=e2etest,dc=mm,dc=test,dc=com
|
||||
changetype: delete
|
||||
|
||||
dn: uid=e2etest.three,ou=e2etest,dc=mm,dc=test,dc=com
|
||||
changetype: delete
|
||||
|
||||
dn: uid=e2etest.four,ou=e2etest,dc=mm,dc=test,dc=com
|
||||
changetype: delete
|
||||
|
||||
dn: ou=e2etest,dc=mm,dc=test,dc=com
|
||||
changetype: add
|
||||
objectclass: organizationalunit
|
||||
|
||||
# generic test users
|
||||
dn: uid=e2etest.one,ou=e2etest,dc=mm,dc=test,dc=com
|
||||
changetype: add
|
||||
objectclass: iNetOrgPerson
|
||||
sn: OneLDAP
|
||||
cn: TestLDAP
|
||||
uid: e2etest.one
|
||||
mail: e2etest.one@mmtest.com
|
||||
userPassword: Password1
|
||||
|
||||
dn: uid=e2etest.two,ou=e2etest,dc=mm,dc=test,dc=com
|
||||
changetype: add
|
||||
objectclass: iNetOrgPerson
|
||||
sn: TwoLDAP
|
||||
cn: TestLDAP
|
||||
uid: e2etest.two
|
||||
mail: e2etest.two@mmtest.com
|
||||
userPassword: Password1
|
||||
|
||||
dn: uid=e2etest.three,ou=e2etest,dc=mm,dc=test,dc=com
|
||||
changetype: add
|
||||
objectclass: iNetOrgPerson
|
||||
sn: ThreeLDAP
|
||||
cn: TestLDAP
|
||||
uid: e2etest.three.ldap
|
||||
mail: e2etest.three@mmtest.com
|
||||
userPassword: Password1
|
||||
44
e2e/cypress/tests/fixtures/ldap_users.json
поставляемый
Обычный файл
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"dev-1": {
|
||||
"username": "dev.one",
|
||||
"password": "Password1",
|
||||
"email": "success+devone@simulator.amazonses.com",
|
||||
"userType": "Admin"
|
||||
},
|
||||
"dev-2": {
|
||||
"username": "dev.two",
|
||||
"password": "Password1",
|
||||
"email": "success+devtwo@simulator.amazonses.com",
|
||||
"userType": "Admin"
|
||||
},
|
||||
"test-1": {
|
||||
"username": "test.one",
|
||||
"password": "Password1",
|
||||
"email": "success+testone@simulator.amazonses.com",
|
||||
"userType": ""
|
||||
},
|
||||
"test-2": {
|
||||
"username": "test.two",
|
||||
"password": "Password1",
|
||||
"email": "success+testtwo@simulator.amazonses.com",
|
||||
"userType": ""
|
||||
},
|
||||
"test-3": {
|
||||
"username": "test.three",
|
||||
"password": "Password1",
|
||||
"email": "success+testthree@simulator.amazonses.com",
|
||||
"userType": ""
|
||||
},
|
||||
"board-1": {
|
||||
"username": "board.one",
|
||||
"password": "Password1",
|
||||
"email": "success+boardone@simulator.amazonses.com",
|
||||
"userType": ""
|
||||
},
|
||||
"board-2": {
|
||||
"username": "board.two",
|
||||
"password": "Password1",
|
||||
"email": "success+boardtwo@simulator.amazonses.com",
|
||||
"userType": ""
|
||||
}
|
||||
}
|
||||
2
e2e/cypress/tests/fixtures/long_text_post.txt
поставляемый
Обычный файл
@@ -0,0 +1,2 @@
|
||||
The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Bright vixens jump; dozy fowl quack. Quick wafting zephyrs vex bold Jim. Quick zephyrs blow, vexing daft Jim. Sex-charged fop blew my junk TV quiz. How quickly daft jumping zebras vex. Two driven jocks help fax my big quiz. Quick, Baz, get my woven flax jodhpurs! "Now fax quiz Jack!" my brave ghost pled. Five quacking zephyrs jolt my wax bed. Flummoxed by job, kvetching W. zaps Iraq. Cozy sphinx waves quart jug of bad milk. A very bad quack might jinx zippy fowls. Few quips galvanized the mock jury box. Quick brown dogs jump over the lazy fox. The jay, pig, fox, zebra, and my wolves quack! Blowzy red vixens fight for a quick jump. Joaquin Phoenix was gazed by MTV for luck. A wizard’s job is to vex chumps quickly in fog. Watch "Jeopardy!", Alex Trebek's fun TV quiz game. Woven silk pyjamas exchanged for blue quartz. Brawny gods just flocked up to quiz and vex him. Adjusting quiver and bow, Zompyc[1] killed the fox. My faxed joke won a pager in the cable TV quiz show. Amazingly few discotheques provide jukeboxes. My girl wove six dozen plaid jackets before she quit. Six big devils from Japan quickly forgot how to waltz. Big July earthquakes confound zany experimental vow. Foxy parsons quiz and cajole the lovably dim wiki-girl. Have a pick: twenty six letters - no forcing a jumbled quiz! Crazy Fredericka bought many very exquisite opal jewels. Sixty zippers were quickly picked from the woven jute bag. A quick movement of the enemy will jeopardize six gunboats. All questions asked by five watch experts amazed the judge. Jack quietly moved up front and seized the big ball of wax. The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Bright vixens jump; dozy fowl quack. Quick wafting zephyrs vex bold Jim. Quick zephyrs blow, vexing daft Jim. Sex-charged fop blew my junk TV quiz. How quickly daft jumping zebras vex. Two driven jocks help fax my big quiz. Quick, Baz, get my woven flax jodhpurs! "Now fax quiz Jack!" my brave ghost pled. Five quacking zephyrs jolt my wax bed. Flummoxed by job, kvetching W. zaps Iraq. Cozy sphinx waves quart jug of bad milk. A very bad quack might jinx zippy fowls. Few quips galvanized the mock jury box. Quick brown dogs jump over the lazy fox. The jay, pig, fox, zebra, and my wolves quack! Blowzy red vixens fight for a quick jump. Joaquin Phoenix was gazed by MTV for luck. A wizard’s job is to vex chumps quickly in fog. Watch "Jeopardy!", Alex Trebek's fun TV quiz game. Woven silk pyjamas exchanged for blue quartz. Brawny gods just flocked up to quiz and vex him. Adjusting quiver and bow, Zompyc[1] killed the fox. My faxed joke won a pager in the cable TV quiz show. Amazingly few discotheques provide jukeboxes. My girl wove six dozen plaid jackets before she quit. Six big devils from Japan quickly forgot how to waltz. Big July earthquakes confound zany experimental vow. Foxy parsons quiz and cajole the lovably dim wiki-girl. Have a pick: twenty six letters - no forcing a jumbled quiz! Crazy Fredericka bought many very exquisite opal jewels. Sixty zippers were quickly picked from the woven jute bag. A quick movement of the enemy will jeopardize six gunboats. All questions asked by five watch experts amazed the judge. Jack quietly moved up front and seized the big ball of wax. The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Hello this is a long post, with more than 4000 characters, plus multiple attachments.
|
||||
The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Bright vixens jump; dozy fowl quack. Quick wafting zephyrs vex bold Jim. Quick zephyrs blow, vexing daft Jim. Sex-charged fop blew my junk TV quiz. How quickly daft jumping zebras vex. Two driven jocks help fax my big quiz. Quick, Baz, get my woven flax jodhpurs! "Now fax quiz Jack!" my brave ghost pled. Five quacking zephyrs jolt my wax bed. Flummoxed by job, kvetching W. zaps Iraq. Cozy sphinx waves quart jug of bad milk. A very bad quack might jinx zippy fowls. Few quips galvanized the mock jury box. Quick brown dogs jump over the lazy fox. The jay, pig, fox, zebra, and my wolves quack! Blowzy red vixens fight for a quick jump. Joaquin Phoenix was gazed by MTV for luck. A wizard’s job is to vex chumps quickly in fog. Watch "Jeopardy!", Alex Trebek's fun TV quiz game. Woven silk pyjamas exchanged for blue quartz. Brawny gods just flocked up to quiz and vex him. Adjusting quiver and bow, Zompyc[1] killed the fox. My faxed joke won a pager in the cable TV quiz show. Amazingly few discotheques provide jukeboxes. My girl wove six dozen plaid jackets before she quit. Six big devils from Japan quickly forgot how to waltz. Big July earthquakes confound zany experimental vow. Foxy parsons quiz and cajole the lovably dim wiki-girl. Have a pick: twenty six letters - no forcing a jumbled quiz! Crazy Fredericka bought many very exquisite opal jewels. Sixty zippers were quickly picked from the woven jute bag. A quick movement of the enemy will jeopardize six gunboats. All questions asked by five watch experts amazed the judge. Jack quietly moved up front and seized the big ball of wax. The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Bright vixens jump; dozy fowl quack. Quick wafting zephyrs vex bold Jim. Quick zephyrs blow, vexing daft Jim. Sex-charged fop blew my junk TV quiz. How quickly daft jumping zebras vex. Two driven jocks help fax my big quiz. Quick, Baz, get my woven flax jodhpurs! "Now fax quiz Jack!" my brave ghost pled. Five quacking zephyrs jolt my wax bed. Flummoxed by job, kvetching W. zaps Iraq. Cozy sphinx waves quart jug of bad milk. A very bad quack might jinx zippy fowls. Few quips galvanized the mock jury box. Quick brown dogs jump over the lazy fox. The jay, pig, fox, zebra, and my wolves quack! Blowzy red vixens fight for a quick jump. Joaquin Phoenix was gazed by MTV for luck. A wizard’s job is to vex chumps quickly in fog. Watch "Jeopardy!", Alex Trebek's fun TV quiz game. Woven silk pyjamas exchanged for blue quartz. Brawny gods just flocked up to quiz and vex him. Adjusting quiver and bow, Zompyc[1] killed the fox. My faxed joke won a pager in the cable TV quiz show. Amazingly few discotheques provide jukeboxes. My girl wove six dozen plaid jackets before she quit. Six big devils from Japan quickly forgot how to waltz. Big July earthquakes confound zany experimental vow. Foxy parsons quiz and cajole the lovably dim wiki-girl. Have a pick: twenty six letters - no forcing a jumbled quiz! Crazy Fredericka bought many very exquisite opal jewels. Sixty zippers were quickly picked from the woven jute bag. A quick movement of the enemy will jeopardize six gunboats. All questions asked by five watch experts amazed the judge. Jack quietly moved up front and seized the big ball of wax. The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Hello this is a long post, with more than 4000 characters, plus multiple attachments.
|
||||
Двоичные данные
e2e/cypress/tests/fixtures/m4a-audio-file.m4a
поставляемый
Обычный файл
1
e2e/cypress/tests/fixtures/markdown/markdown_basic.html
поставляемый
Обычный файл
@@ -0,0 +1 @@
|
||||
<h1 class="markdown__heading">Basic Markdown Testing</h1><p>Tests for text style, code blocks, in-line code and images, lines, block quotes, and headings.</p>
|
||||
2
e2e/cypress/tests/fixtures/markdown/markdown_basic.md
поставляемый
Обычный файл
@@ -0,0 +1,2 @@
|
||||
# Basic Markdown Testing
|
||||
Tests for text style, code blocks, in-line code and images, lines, block quotes, and headings.
|
||||
11
e2e/cypress/tests/fixtures/markdown/markdown_block_quotes_1.html
поставляемый
Обычный файл
@@ -0,0 +1,11 @@
|
||||
<h3 class="markdown__heading">Block Quotes</h3><blockquote>
|
||||
<p>This text should render in a block quote.</p>
|
||||
</blockquote>
|
||||
<p><strong>The following text should render in two block quotes separated by one line of text:</strong></p>
|
||||
<blockquote>
|
||||
<p>Block quote 1</p>
|
||||
</blockquote>
|
||||
<p>Text between block quotes</p>
|
||||
<blockquote>
|
||||
<p>Block quote 2</p>
|
||||
</blockquote>
|
||||
10
e2e/cypress/tests/fixtures/markdown/markdown_block_quotes_1.md
поставляемый
Обычный файл
@@ -0,0 +1,10 @@
|
||||
### Block Quotes
|
||||
|
||||
>This text should render in a block quote.
|
||||
|
||||
**The following text should render in two block quotes separated by one line of text:**
|
||||
> Block quote 1
|
||||
|
||||
Text between block quotes
|
||||
|
||||
> Block quote 2
|
||||
6
e2e/cypress/tests/fixtures/markdown/markdown_block_quotes_2.md
поставляемый
Обычный файл
@@ -0,0 +1,6 @@
|
||||
### Block Quotes
|
||||
|
||||
**The following markdown should render within the block quote:**
|
||||
> #### Heading 4
|
||||
> _Italics_, *Italics*, **Bold**, ***Bold-italics***, **_Bold-italics_**, ~~Strikethrough~~
|
||||
> :) :-) ;) :-O :bamboo: :gift_heart: :dolls:
|
||||
4
e2e/cypress/tests/fixtures/markdown/markdown_carriage_return.html
поставляемый
Обычный файл
@@ -0,0 +1,4 @@
|
||||
<h3 class="markdown__heading">Carriage Return</h3><p>Line #1 followed by one blank line</p>
|
||||
<p>Line #2 followed by one blank line</p>
|
||||
<p>Line #3 followed by Line #4
|
||||
Line #4</p>
|
||||
8
e2e/cypress/tests/fixtures/markdown/markdown_carriage_return.md
поставляемый
Обычный файл
@@ -0,0 +1,8 @@
|
||||
### Carriage Return
|
||||
|
||||
Line #1 followed by one blank line
|
||||
|
||||
Line #2 followed by one blank line
|
||||
|
||||
Line #3 followed by Line #4
|
||||
Line #4
|
||||
4
e2e/cypress/tests/fixtures/markdown/markdown_carriage_return_two_lines.html
поставляемый
Обычный файл
@@ -0,0 +1,4 @@
|
||||
<p><strong>The following should appear as a carriage return separating two lines of text:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="post-code__overlay"><span class="post-code__clipboard"><i role="button" class="icon icon-content-copy"></i></span></div><div class="hljs"><code>Line #1 followed by a blank line
|
||||
|
||||
Line #2 following a blank line</code></div></div>
|
||||
6
e2e/cypress/tests/fixtures/markdown/markdown_carriage_return_two_lines.md
поставляемый
Обычный файл
@@ -0,0 +1,6 @@
|
||||
**The following should appear as a carriage return separating two lines of text:**
|
||||
```
|
||||
Line #1 followed by a blank line
|
||||
|
||||
Line #2 following a blank line
|
||||
```
|
||||
1
e2e/cypress/tests/fixtures/markdown/markdown_code_block.html
поставляемый
Обычный файл
@@ -0,0 +1 @@
|
||||
<h3 class="markdown__heading">Code Blocks</h3><div class="post-code post-code--wrap"><div class="post-code__overlay"><span class="post-code__clipboard"><i role="button" class="icon icon-content-copy"></i></span></div><div class="hljs"><code>This text should render in a code block</code></div></div>
|
||||
5
e2e/cypress/tests/fixtures/markdown/markdown_code_block.md
поставляемый
Обычный файл
@@ -0,0 +1,5 @@
|
||||
### Code Blocks
|
||||
|
||||
```
|
||||
This text should render in a code block
|
||||
```
|
||||
116
e2e/cypress/tests/fixtures/markdown/markdown_code_syntax.html
поставляемый
Обычный файл
@@ -0,0 +1,116 @@
|
||||
<h1 class="markdown__heading">Code Syntax Highlighting</h1><p>Verify the following code blocks render as code blocks and highlight properly. </p>
|
||||
<h3 class="markdown__heading">Diff</h3><div class="post-code"><span class="post-code__language">Diff</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10</div><code><span class="hljs-comment">*** /path/to/original ''timestamp''</span>
|
||||
<span class="hljs-comment">--- /path/to/new ''timestamp''</span>
|
||||
<span class="hljs-comment">***************</span>
|
||||
<span class="hljs-comment">*** 1 ****</span>
|
||||
<span class="hljs-addition">! This is a line.</span>
|
||||
<span class="hljs-comment">--- 1 ---</span>
|
||||
<span class="hljs-addition">! This is a replacement line.</span>
|
||||
It is important to spell
|
||||
<span class="hljs-deletion">-removed line</span>
|
||||
<span class="hljs-addition">+new line</span></code></div></div><h3 class="markdown__heading">Makefile</h3><div class="post-code"><span class="post-code__language">Makefile</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5</div><code>CC=gcc
|
||||
CFLAGS=-I.
|
||||
|
||||
<span class="hljs-section">hellomake: hellomake.o hellofunc.o</span>
|
||||
<span class="hljs-variable">$(CC)</span> -o hellomake hellomake.o hellofunc.o -I.</code></div></div><h3 class="markdown__heading">JSON</h3><div class="post-code"><span class="post-code__language">JSON</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3</div><code>{<span class="hljs-attr">"employees"</span>:[
|
||||
{<span class="hljs-attr">"firstName"</span>:<span class="hljs-string">"John"</span>, <span class="hljs-attr">"lastName"</span>:<span class="hljs-string">"Doe"</span>},
|
||||
]}</code></div></div><h3 class="markdown__heading">Markdown</h3><div class="post-code"><span class="post-code__language">Markdown</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3</div><code><span class="hljs-strong">**bold**</span>
|
||||
<span class="hljs-emphasis">*italics*</span>
|
||||
[<span class="hljs-string">link</span>](<span class="hljs-link">www.example.com</span>)</code></div></div><h3 class="markdown__heading">JavaScript</h3><div class="post-code"><span class="post-code__language">JavaScript</span><div class="hljs"><div class="post-code__line-numbers">1</div><code><span class="hljs-built_in">document</span>.write(<span class="hljs-string">'Hello, world!'</span>);</code></div></div><h3 class="markdown__heading">CSS</h3><div class="post-code"><span class="post-code__language">CSS</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3</div><code><span class="hljs-selector-tag">body</span> {
|
||||
<span class="hljs-attribute">background-color</span>: red;
|
||||
}</code></div></div><h3 class="markdown__heading">Objective C</h3><div class="post-code"><span class="post-code__language">Objective C</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6</div><code><span class="hljs-meta">#import <span class="hljs-meta-string"><stdio.h></span></span>
|
||||
|
||||
<span class="hljs-keyword">int</span> main (<span class="hljs-keyword">void</span>)
|
||||
{
|
||||
printf (<span class="hljs-string">"Hello world!\n"</span>);
|
||||
}</code></div></div><h3 class="markdown__heading">Python</h3><div class="post-code"><span class="post-code__language">Python</span><div class="hljs"><div class="post-code__line-numbers">1</div><code><span class="hljs-built_in">print</span> <span class="hljs-string">"Hello, world!"</span></code></div></div><h3 class="markdown__heading">XML</h3><div class="post-code"><span class="post-code__language">HTML, XML</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5</div><code><span class="hljs-tag"><<span class="hljs-name">employees</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">employee</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">firstName</span>></span>John<span class="hljs-tag"></<span class="hljs-name">firstName</span>></span> <span class="hljs-tag"><<span class="hljs-name">lastName</span>></span>Doe<span class="hljs-tag"></<span class="hljs-name">lastName</span>></span>
|
||||
<span class="hljs-tag"></<span class="hljs-name">employee</span>></span>
|
||||
<span class="hljs-tag"></<span class="hljs-name">employees</span>></span></code></div></div><h3 class="markdown__heading">Perl</h3><div class="post-code"><span class="post-code__language">Perl</span><div class="hljs"><div class="post-code__line-numbers">1</div><code><span class="hljs-keyword">print</span> <span class="hljs-string">"Hello, World!\n"</span>;</code></div></div><h3 class="markdown__heading">Bash</h3><div class="post-code"><span class="post-code__language">Bash</span><div class="hljs"><div class="post-code__line-numbers">1</div><code><span class="hljs-built_in">echo</span> <span class="hljs-string">"Hello World"</span></code></div></div><h3 class="markdown__heading">PHP</h3><div class="post-code"><span class="post-code__language">PHP</span><div class="hljs"><div class="post-code__line-numbers">1</div><code> <span class="hljs-meta"><?php</span> <span class="hljs-keyword">echo</span> <span class="hljs-string">'<p>Hello World</p>'</span>; <span class="hljs-meta">?></span> </code></div></div><h3 class="markdown__heading">CoffeeScript</h3><div class="post-code"><span class="post-code__language">CoffeeScript</span><div class="hljs"><div class="post-code__line-numbers">1</div><code><span class="hljs-built_in">console</span>.log(“Hello world!”);</code></div></div><h3 class="markdown__heading">C</h3><div class="post-code"><span class="post-code__language">C#</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8</div><code><span class="hljs-keyword">using</span> System;
|
||||
<span class="hljs-keyword">class</span> <span class="hljs-title">Program</span>
|
||||
{
|
||||
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">Main</span>(<span class="hljs-params"><span class="hljs-built_in">string</span>[] args</span>)</span>
|
||||
{
|
||||
Console.WriteLine(<span class="hljs-string">"Hello, world!"</span>);
|
||||
}
|
||||
}</code></div></div><h3 class="markdown__heading">C++</h3><div class="post-code"><span class="post-code__language">C/C++</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7</div><code><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span> <span class="hljs-meta-string"><iostream.h></span></span>
|
||||
|
||||
main()
|
||||
{
|
||||
<span class="hljs-built_in">cout</span> << <span class="hljs-string">"Hello World!"</span>;
|
||||
<span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
|
||||
}</code></div></div><h3 class="markdown__heading">SQL</h3><div class="post-code"><span class="post-code__language">SQL</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2</div><code><span class="hljs-keyword">SELECT</span> column_name,column_name
|
||||
<span class="hljs-keyword">FROM</span> table_name;</code></div></div><h3 class="markdown__heading">Go</h3><div class="post-code"><span class="post-code__language">Go</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5</div><code><span class="hljs-keyword">package</span> main
|
||||
<span class="hljs-keyword">import</span> <span class="hljs-string">"fmt"</span>
|
||||
<span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span> {
|
||||
fmt.Println(<span class="hljs-string">"Hello, 世界"</span>)
|
||||
}</code></div></div><h3 class="markdown__heading">Ruby</h3><div class="post-code"><span class="post-code__language">Ruby</span><div class="hljs"><div class="post-code__line-numbers">1</div><code>puts <span class="hljs-string">"Hello, world!"</span></code></div></div><h3 class="markdown__heading">Java</h3><div class="post-code"><span class="post-code__language">Java</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12</div><code><span class="hljs-keyword">import</span> javax.swing.JFrame; <span class="hljs-comment">//Importing class JFrame</span>
|
||||
<span class="hljs-keyword">import</span> javax.swing.JLabel; <span class="hljs-comment">//Importing class JLabel</span>
|
||||
<span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">HelloWorld</span> </span>{
|
||||
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] args)</span> </span>{
|
||||
JFrame frame = <span class="hljs-keyword">new</span> JFrame(); <span class="hljs-comment">//Creating frame</span>
|
||||
frame.setTitle(<span class="hljs-string">"Hi!"</span>); <span class="hljs-comment">//Setting title frame</span>
|
||||
frame.add(<span class="hljs-keyword">new</span> JLabel(<span class="hljs-string">"Hello, world!"</span>));<span class="hljs-comment">//Adding text to frame</span>
|
||||
frame.pack(); <span class="hljs-comment">//Setting size to smallest</span>
|
||||
frame.setLocationRelativeTo(<span class="hljs-keyword">null</span>); <span class="hljs-comment">//Centering frame</span>
|
||||
frame.setVisible(<span class="hljs-keyword">true</span>); <span class="hljs-comment">//Showing frame</span>
|
||||
}
|
||||
}</code></div></div><h3 class="markdown__heading">Latex Equation</h3><div class="post-body--code tex"><span class="katex-display fleqn"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mfrac><mi>d</mi><mrow><mi>d</mi><mi>x</mi></mrow></mfrac><mrow><mo fence="true">(</mo><msubsup><mo>∫</mo><mn>0</mn><mi>x</mi></msubsup><mi>f</mi><mo stretchy="false">(</mo><mi>u</mi><mo stretchy="false">)</mo><mtext> </mtext><mi>d</mi><mi>u</mi><mo fence="true">)</mo></mrow><mo>=</mo><mi>f</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mi mathvariant="normal">.</mi></mrow><annotation encoding="application/x-tex">\frac{d}{dx}\left( \int_{0}^{x} f(u)\,du\right)=f(x).</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:2.40003em;vertical-align:-0.95003em;"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.37144em;"><span style="top:-2.314em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="mord mathnormal">x</span></span></span><span style="top:-3.23em;"><span class="pstrut" style="height:3em;"></span><span class="frac-line" style="border-bottom-width:0.04em;"></span></span><span style="top:-3.677em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord mathnormal">d</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.686em;"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="minner"><span class="mopen delimcenter" style="top:0em;"><span class="delimsizing size3">(</span></span><span class="mop"><span class="mop op-symbol large-op" style="margin-right:0.44445em;position:relative;top:-0.0011249999999999316em;">∫</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.414292em;"><span style="top:-1.7880500000000001em;margin-left:-0.44445em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">0</span></span></span></span><span style="top:-3.8129000000000004em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">x</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.9119499999999999em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="mord mathnormal" style="margin-right:0.10764em;">f</span><span class="mopen">(</span><span class="mord mathnormal">u</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="mord mathnormal">d</span><span class="mord mathnormal">u</span><span class="mclose delimcenter" style="top:0em;"><span class="delimsizing size3">)</span></span></span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.10764em;">f</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mclose">)</span><span class="mord">.</span></span></span></span></span></div>
|
||||
7
e2e/cypress/tests/fixtures/markdown/markdown_escape_characters.html
поставляемый
Обычный файл
@@ -0,0 +1,7 @@
|
||||
<h3 class="markdown__heading">Escaped Characters</h3><p><strong>The following text should render the same as the raw text:</strong>
|
||||
Raw: <span class="codespan__pre-wrap"><code>\\teamlinux\IT-Stuff\WorkingStuff</code></span>
|
||||
Markdown: \\teamlinux\IT-Stuff\WorkingStuff</p>
|
||||
<p><strong>The following text should escape out the first backslash so only one backslash appears:</strong>
|
||||
Raw: <span class="codespan__pre-wrap"><code>\\()#</code></span>
|
||||
Markdown: \()#</p>
|
||||
<p>The end of this long post will be hidden until you choose to <span class="codespan__pre-wrap"><code>Show More</code></span>.</p>
|
||||
11
e2e/cypress/tests/fixtures/markdown/markdown_escape_characters.md
поставляемый
Обычный файл
@@ -0,0 +1,11 @@
|
||||
### Escaped Characters
|
||||
|
||||
**The following text should render the same as the raw text:**
|
||||
Raw: `\\teamlinux\IT-Stuff\WorkingStuff`
|
||||
Markdown: \\teamlinux\IT-Stuff\WorkingStuff
|
||||
|
||||
**The following text should escape out the first backslash so only one backslash appears:**
|
||||
Raw: `\\()#`
|
||||
Markdown: \\()#
|
||||
|
||||
The end of this long post will be hidden until you choose to `Show More`.
|
||||
1
e2e/cypress/tests/fixtures/markdown/markdown_headings.html
поставляемый
Обычный файл
@@ -0,0 +1 @@
|
||||
<h3 class="markdown__heading">Headings</h3><h1 class="markdown__heading">Heading 1 font size</h1><h2 class="markdown__heading">Heading 2 font size</h2><h3 class="markdown__heading">Heading 3 font size</h3><h4 class="markdown__heading">Heading 4 font size</h4><h5 class="markdown__heading">Heading 5 font size</h5><h6 class="markdown__heading">Heading 6 font size</h6>
|
||||
8
e2e/cypress/tests/fixtures/markdown/markdown_headings.md
поставляемый
Обычный файл
@@ -0,0 +1,8 @@
|
||||
### Headings
|
||||
|
||||
# Heading 1 font size
|
||||
## Heading 2 font size
|
||||
### Heading 3 font size
|
||||
#### Heading 4 font size
|
||||
##### Heading 5 font size
|
||||
###### Heading 6 font size
|
||||
6
e2e/cypress/tests/fixtures/markdown/markdown_inline_code.html
поставляемый
Обычный файл
@@ -0,0 +1,6 @@
|
||||
<h3 class="markdown__heading">In-line Code</h3><p>The word <span class="codespan__pre-wrap"><code>monospace</code></span> should render as in-line code.</p>
|
||||
<p>The following markdown in-line code should not render:
|
||||
<span class="codespan__pre-wrap"><code>_Italics_</code></span>, <span class="codespan__pre-wrap"><code>*Italics*</code></span>, <span class="codespan__pre-wrap"><code>**Bold**</code></span>, <span class="codespan__pre-wrap"><code>***Bold-italics***</code></span>, <span class="codespan__pre-wrap"><code>**Bold-italics_**</code></span>, <span class="codespan__pre-wrap"><code>~~Strikethrough~~</code></span>, <span class="codespan__pre-wrap"><code>:)</code></span> , <span class="codespan__pre-wrap"><code>:-)</code></span> , <span class="codespan__pre-wrap"><code>;)</code></span> , <span class="codespan__pre-wrap"><code>:-O</code></span> , <span class="codespan__pre-wrap"><code>:bamboo:</code></span> , <span class="codespan__pre-wrap"><code>:gift_heart:</code></span> , <span class="codespan__pre-wrap"><code>:dolls:</code></span> , <span class="codespan__pre-wrap"><code># Heading 1</code></span>, <span class="codespan__pre-wrap"><code>## Heading 2</code></span>, <span class="codespan__pre-wrap"><code>### Heading 3</code></span>, <span class="codespan__pre-wrap"><code>#### Heading 4</code></span>, <span class="codespan__pre-wrap"><code>##### Heading 5</code></span>, <span class="codespan__pre-wrap"><code>###### Heading 6</code></span></p>
|
||||
<p>This GIF link should not preview: <span class="codespan__pre-wrap"><code>http://i.giphy.com/xNrM4cGJ8u3ao.gif</code></span>
|
||||
This link should not auto-link: <span class="codespan__pre-wrap"><code>https://en.wikipedia.org/wiki/Dolphin</code></span></p>
|
||||
<p>This sentence with <span class="codespan__pre-wrap"><code>in-line code</code></span> should appear on one line.</p>
|
||||
13
e2e/cypress/tests/fixtures/markdown/markdown_inline_code.md
поставляемый
Обычный файл
@@ -0,0 +1,13 @@
|
||||
### In-line Code
|
||||
|
||||
The word `monospace` should render as in-line code.
|
||||
|
||||
The following markdown in-line code should not render:
|
||||
`_Italics_`, `*Italics*`, `**Bold**`, `***Bold-italics***`, `**Bold-italics_**`, `~~Strikethrough~~`, `:)` , `:-)` , `;)` , `:-O` , `:bamboo:` , `:gift_heart:` , `:dolls:` , `# Heading 1`, `## Heading 2`, `### Heading 3`, `#### Heading 4`, `##### Heading 5`, `###### Heading 6`
|
||||
|
||||
This GIF link should not preview: `http://i.giphy.com/xNrM4cGJ8u3ao.gif`
|
||||
This link should not auto-link: `https://en.wikipedia.org/wiki/Dolphin`
|
||||
|
||||
This sentence with `
|
||||
in-line code
|
||||
` should appear on one line.
|
||||
3
e2e/cypress/tests/fixtures/markdown/markdown_inline_images_1.md
поставляемый
Обычный файл
@@ -0,0 +1,3 @@
|
||||
### In-line Images
|
||||
|
||||
Mattermost/platform build status: [](https://docs.mattermost.com/_images/icon-76x76.png)
|
||||
3
e2e/cypress/tests/fixtures/markdown/markdown_inline_images_2.md
поставляемый
Обычный файл
@@ -0,0 +1,3 @@
|
||||
### In-line Images
|
||||
|
||||
GitHub favicon: 
|
||||
4
e2e/cypress/tests/fixtures/markdown/markdown_inline_images_3.md
поставляемый
Обычный файл
@@ -0,0 +1,4 @@
|
||||
### In-line Images
|
||||
|
||||
GIF Image:
|
||||

|
||||
4
e2e/cypress/tests/fixtures/markdown/markdown_inline_images_4.md
поставляемый
Обычный файл
@@ -0,0 +1,4 @@
|
||||
### In-line Images
|
||||
|
||||
4K Wallpaper Image (11Mb):
|
||||

|
||||
4
e2e/cypress/tests/fixtures/markdown/markdown_inline_images_5.md
поставляемый
Обычный файл
@@ -0,0 +1,4 @@
|
||||
### In-line Images
|
||||
|
||||
Panorama Image:
|
||||

|
||||
3
e2e/cypress/tests/fixtures/markdown/markdown_inline_images_6.md
поставляемый
Обычный файл
@@ -0,0 +1,3 @@
|
||||
### In-line Images
|
||||
|
||||

|
||||
26
e2e/cypress/tests/fixtures/markdown/markdown_latex.html
поставляемый
Обычный файл
@@ -0,0 +1,26 @@
|
||||
<div class="post-code"><span class="post-code__language">LaTeX</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7</div><code><span class="hljs-keyword">\documentclass</span>{article}
|
||||
|
||||
<span class="hljs-keyword">\begin</span>{document}
|
||||
|
||||
Hello World!
|
||||
|
||||
<span class="hljs-keyword">\end</span>{document}</code></div></div><p>AND/OR</p>
|
||||
<div class="post-code"><span class="post-code__language">LaTeX</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7</div><code><span class="hljs-keyword">\documentclass</span>{article}
|
||||
|
||||
<span class="hljs-keyword">\begin</span>{document}
|
||||
|
||||
Hello World!
|
||||
|
||||
<span class="hljs-keyword">\end</span>{document}</code></div></div>
|
||||
21
e2e/cypress/tests/fixtures/markdown/markdown_latex.md
поставляемый
Обычный файл
@@ -0,0 +1,21 @@
|
||||
```texcode
|
||||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
Hello World!
|
||||
|
||||
\end{document}
|
||||
```
|
||||
|
||||
AND/OR
|
||||
|
||||
```latexcode
|
||||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
Hello World!
|
||||
|
||||
\end{document}
|
||||
```
|
||||
8
e2e/cypress/tests/fixtures/markdown/markdown_lines.html
поставляемый
Обычный файл
@@ -0,0 +1,8 @@
|
||||
<h3 class="markdown__heading">Lines</h3><p>Three lines should render with text between them:</p>
|
||||
<p>Text above line</p>
|
||||
<hr>
|
||||
<p>Text between lines</p>
|
||||
<hr>
|
||||
<p>Text between lines</p>
|
||||
<hr>
|
||||
<p>Text below line</p>
|
||||
16
e2e/cypress/tests/fixtures/markdown/markdown_lines.md
поставляемый
Обычный файл
@@ -0,0 +1,16 @@
|
||||
### Lines
|
||||
|
||||
Three lines should render with text between them:
|
||||
|
||||
Text above line
|
||||
|
||||
***
|
||||
|
||||
Text between lines
|
||||
|
||||
---
|
||||
|
||||
Text between lines
|
||||
___
|
||||
|
||||
Text below line
|
||||
137
e2e/cypress/tests/fixtures/markdown/markdown_list.html
поставляемый
Обычный файл
@@ -0,0 +1,137 @@
|
||||
<h1 class="markdown__heading">Markdown List Testing</h1><p>Verify that all list types render as expected.</p>
|
||||
<h3 class="markdown__heading">Single-Item Ordered List</h3><p><strong>Expected:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>7. Single Item</code></div></div><p><strong>Actual:</strong></p>
|
||||
<ol class="markdown__list" style="counter-reset: list 6;">
|
||||
<li><span>Single Item</span></li></ol><h3 class="markdown__heading">Multi-Item Ordered List</h3><p><strong>Expected:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>1. One
|
||||
2. Two
|
||||
3. Three</code></div></div><p><strong>Actual:</strong></p>
|
||||
<ol class="markdown__list" style="counter-reset: list 0;">
|
||||
<li><span>One</span></li><li><span>Two</span></li><li><span>Three</span></li></ol><h3 class="markdown__heading">Nested Ordered List</h3><p><strong>Expected:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>1. Alpha
|
||||
1. Bravo
|
||||
2. Charlie
|
||||
3. Delta
|
||||
1. Echo
|
||||
2. Foxtrot</code></div></div><p><strong>Actual:</strong></p>
|
||||
<ol class="markdown__list" style="counter-reset: list 0;">
|
||||
<li><span>Alpha<ol class="markdown__list" style="counter-reset: list 0;">
|
||||
<li><span>Bravo</span></li></ol></span></li><li><span>Charlie</span></li><li><span>Delta<ol class="markdown__list" style="counter-reset: list 0;">
|
||||
<li><span>Echo</span></li><li><span>Foxtrot</span></li></ol></span></li></ol><h3 class="markdown__heading">Single-Item Unordered List</h3><p><strong>Expected:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>• Single Item</code></div></div><p><strong>Actual:</strong></p>
|
||||
<ul class="markdown__list">
|
||||
<li><span>Single Item</span></li></ul><h3 class="markdown__heading">Multi-Item Unordered List</h3><p><strong>Expected:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>• One
|
||||
• Two
|
||||
• Three</code></div></div><p><strong>Actual:</strong></p>
|
||||
<ul class="markdown__list">
|
||||
<li><span>One</span></li><li><span>Two</span></li><li><span>Three</span></li></ul><h3 class="markdown__heading">Multi-Item Unordered List with Line Break (Break should not render)</h3><p><strong>Expected:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>• Item A
|
||||
• Item B
|
||||
• Item C
|
||||
• Item D</code></div></div><p><strong>Actual:</strong></p>
|
||||
<ul class="markdown__list">
|
||||
<li><span>Item A</span></li><li><span><p>Item B</p>
|
||||
</span></li><li><span><p>Item C</p>
|
||||
</span></li><li><span>Item D</span></li></ul><h3 class="markdown__heading">Nested Unordered List</h3><p><strong>Expected:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>• Alpha
|
||||
• Bravo
|
||||
• Charlie
|
||||
• Delta
|
||||
• Echo
|
||||
• Foxtrot</code></div></div><p><strong>Actual:</strong></p>
|
||||
<ul class="markdown__list">
|
||||
<li><span>Alpha<ul class="markdown__list">
|
||||
<li><span>Bravo</span></li></ul></span></li><li><span>Charlie</span></li><li><span>Delta<ul class="markdown__list">
|
||||
<li><span>Echo</span></li><li><span>Foxtrot</span></li></ul></span></li></ul><h3 class="markdown__heading">Mixed List Starting Ordered</h3><p><strong>Expected:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>1. One
|
||||
2. Two
|
||||
3. Three</code></div></div><p><strong>Actual:</strong></p>
|
||||
<ol class="markdown__list" style="counter-reset: list 0;">
|
||||
<li><span>One</span></li><li><span>Two</span></li><li><span>Three</span></li></ol><h3 class="markdown__heading">Mixed List Starting Unordered</h3><p><strong>Expected:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>• Monday
|
||||
• Tuesday
|
||||
• Wednesday</code></div></div><p><strong>Actual:</strong></p>
|
||||
<ul class="markdown__list">
|
||||
<li><span>Monday</span></li><li><span>Tuesday</span></li><li><span>Wednesday</span></li></ul><h3 class="markdown__heading">Nested Mixed List</h3><p><strong>Expected:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>• Alpha
|
||||
1. Bravo
|
||||
• Charlie
|
||||
• Delta
|
||||
• Echo
|
||||
• Foxtrot
|
||||
• Golf
|
||||
1. Hotel
|
||||
• India
|
||||
1. Juliet
|
||||
2. Kilo
|
||||
• Lima
|
||||
• Mike
|
||||
1. November
|
||||
4. Oscar
|
||||
5. Papa</code></div></div><p><strong>Actual:</strong></p>
|
||||
<ul class="markdown__list">
|
||||
<li><span>Alpha<ol class="markdown__list" style="counter-reset: list 0;">
|
||||
<li><span>Bravo<ul class="markdown__list">
|
||||
<li><span>Charlie</span></li><li><span>Delta</span></li></ul></span></li></ol></span></li><li><span>Echo</span></li><li><span>Foxtrot<ul class="markdown__list">
|
||||
<li><span>Golf<ol class="markdown__list" style="counter-reset: list 0;">
|
||||
<li><span>Hotel</span></li></ol></span></li><li><span>India<ol class="markdown__list" style="counter-reset: list 0;">
|
||||
<li><span>Juliet</span></li><li><span>Kilo</span></li></ol></span></li><li><span>Lima</span></li></ul></span></li><li><span>Mike<ol class="markdown__list" style="counter-reset: list 0;">
|
||||
<li><span>November<ol class="markdown__list" style="counter-reset: list 3;">
|
||||
<li><span>Oscar<ol class="markdown__list" style="counter-reset: list 4;">
|
||||
<li><span>Papa</span></li></ol></span></li></ol></span></li></ol></span></li></ul><h3 class="markdown__heading">Ordered Lists Separated by Carriage Returns</h3><p><strong>Expected:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>1. One
|
||||
• Two
|
||||
2. Two
|
||||
3. Three</code></div></div><p><strong>Actual:</strong></p>
|
||||
<ol class="markdown__list" style="counter-reset: list 0;">
|
||||
<li><span><p>One</p>
|
||||
<ul class="markdown__list">
|
||||
<li><span>Two</span></li></ul></span></li><li><span><p>Two</p>
|
||||
</span></li><li><span>Three</span></li></ol><h3 class="markdown__heading">New Line After a List</h3><p><strong>Expected:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>1. One
|
||||
2. Two
|
||||
|
||||
This text should be on a new line.</code></div></div><p><strong>Actual:</strong></p>
|
||||
<ol class="markdown__list" style="counter-reset: list 0;">
|
||||
<li><span>One</span></li><li><span>Two</span></li></ol><p>This text should be on a new line.</p>
|
||||
<h3 class="markdown__heading">Task Lists</h3><p><strong>Expected:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>[ ] One
|
||||
[ ] Subpoint one
|
||||
- Normal Bullet
|
||||
[ ] Two
|
||||
[x] Completed item</code></div></div><p><strong>Actual:</strong></p>
|
||||
<ul class="markdown__list">
|
||||
<li class="list-item--task-list"><input type="checkbox" disabled=""> One<ul class="markdown__list">
|
||||
<li class="list-item--task-list"><input type="checkbox" disabled=""> Subpoint one</li><li><span>Normal Bullet</span></li></ul></li><li class="list-item--task-list"><input type="checkbox" disabled=""> Two</li><li class="list-item--task-list"><input type="checkbox" disabled="" checked=""> Completed item</li></ul><h3 class="markdown__heading">Numbered Task Lists</h3><p><strong>Expected:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>1. [ ] One
|
||||
2. [ ] Two
|
||||
3. [x] Completed item</code></div></div><p><strong>Actual:</strong></p>
|
||||
<ol class="markdown__list" style="counter-reset: list 0;">
|
||||
<li class="list-item--task-list"><input type="checkbox" disabled=""> One</li><li class="list-item--task-list"><input type="checkbox" disabled=""> Two</li><li class="list-item--task-list"><input type="checkbox" disabled="" checked=""> Completed item</li></ol><h3 class="markdown__heading">Multiple Lists</h3><p><strong>Expected:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>List A:
|
||||
|
||||
1. One
|
||||
|
||||
List B:
|
||||
|
||||
2. Two</code></div></div><p>List A:</p>
|
||||
<ol class="markdown__list" style="counter-reset: list 0;">
|
||||
<li><span>One</span></li></ol><p>List B:</p>
|
||||
<ol class="markdown__list" style="counter-reset: list 1;">
|
||||
<li><span>Two</span></li></ol><h3 class="markdown__heading">Lists with blank lines before and after</h3><p><strong>Expected:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>Line with blank line after
|
||||
|
||||
Line with blank line after and before
|
||||
|
||||
1. Bullet
|
||||
2. Bullet
|
||||
3. Bullet
|
||||
|
||||
Line with blank line after and before
|
||||
|
||||
Line with blank line before</code></div></div><p>Line with blank line after </p>
|
||||
<p>Line with blank line after and before </p>
|
||||
<ol class="markdown__list" style="counter-reset: list 0;">
|
||||
<li><span>Bullet </span></li><li><span>Bullet </span></li><li><span>Bullet </span></li></ol><p>Line with blank line after and before </p>
|
||||
<p>Line with blank line before</p>
|
||||
3
e2e/cypress/tests/fixtures/markdown/markdown_not_autolink.html
поставляемый
Обычный файл
@@ -0,0 +1,3 @@
|
||||
<p><strong>The following links should not auto-link or generate previews:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="post-code__overlay"><span class="post-code__clipboard"><i role="button" class="icon icon-content-copy"></i></span></div><div class="hljs"><code>GIF: http://i.giphy.com/xNrM4cGJ8u3ao.gif
|
||||
Website: https://en.wikipedia.org/wiki/Dolphin</code></div></div>
|
||||
5
e2e/cypress/tests/fixtures/markdown/markdown_not_autolink.md
поставляемый
Обычный файл
@@ -0,0 +1,5 @@
|
||||
**The following links should not auto-link or generate previews:**
|
||||
```
|
||||
GIF: http://i.giphy.com/xNrM4cGJ8u3ao.gif
|
||||
Website: https://en.wikipedia.org/wiki/Dolphin
|
||||
```
|
||||
23
e2e/cypress/tests/fixtures/markdown/markdown_not_in_code_block.html
поставляемый
Обычный файл
@@ -0,0 +1,23 @@
|
||||
<p><strong>The following markdown should not render:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="post-code__overlay"><span class="post-code__clipboard"><i role="button" class="icon icon-content-copy"></i></span></div><div class="hljs"><code>_Italics_
|
||||
*Italics*
|
||||
**Bold**
|
||||
***Bold-italics***
|
||||
**Bold-italics_**
|
||||
~~Strikethrough~~
|
||||
:) :-) ;) ;-) :o :O :-o :-O
|
||||
:bamboo: :gift_heart: :dolls: :school_satchel: :mortar_board:
|
||||
# Heading 1
|
||||
## Heading 2
|
||||
### Heading 3
|
||||
#### Heading 4
|
||||
##### Heading 5
|
||||
###### Heading 6
|
||||
> Block Quote
|
||||
- List
|
||||
- List Sub-item
|
||||
[Link](http://i.giphy.com/xNrM4cGJ8u3ao.gif)
|
||||
[](https://github.com/mattermost/platform)
|
||||
| Left-Aligned Text | Center Aligned Text | Right Aligned Text |
|
||||
| :------------ |:---------------:| -----:|
|
||||
| Left column 1 | this text | $100 |</code></div></div>
|
||||
25
e2e/cypress/tests/fixtures/markdown/markdown_not_in_code_block.md
поставляемый
Обычный файл
@@ -0,0 +1,25 @@
|
||||
**The following markdown should not render:**
|
||||
```
|
||||
_Italics_
|
||||
*Italics*
|
||||
**Bold**
|
||||
***Bold-italics***
|
||||
**Bold-italics_**
|
||||
~~Strikethrough~~
|
||||
:) :-) ;) ;-) :o :O :-o :-O
|
||||
:bamboo: :gift_heart: :dolls: :school_satchel: :mortar_board:
|
||||
# Heading 1
|
||||
## Heading 2
|
||||
### Heading 3
|
||||
#### Heading 4
|
||||
##### Heading 5
|
||||
###### Heading 6
|
||||
> Block Quote
|
||||
- List
|
||||
- List Sub-item
|
||||
[Link](http://i.giphy.com/xNrM4cGJ8u3ao.gif)
|
||||
[](https://github.com/mattermost/platform)
|
||||
| Left-Aligned Text | Center Aligned Text | Right Aligned Text |
|
||||
| :------------ |:---------------:| -----:|
|
||||
| Left column 1 | this text | $100 |
|
||||
```
|
||||
50
e2e/cypress/tests/fixtures/markdown/markdown_postgres.html
поставляемый
Обычный файл
@@ -0,0 +1,50 @@
|
||||
<div class="post-code"><span class="post-code__language">PostgreSQL</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7</div><code><span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">OR REPLACE</span> <span class="hljs-keyword">FUNCTION</span> snitch() <span class="hljs-keyword">RETURNS</span> <span class="hljs-type">event_trigger</span> <span class="hljs-keyword">AS</span> $$<span class="pgsql">
|
||||
<span class="hljs-keyword">BEGIN</span>
|
||||
<span class="hljs-keyword">RAISE</span> <span class="hljs-keyword">NOTICE</span> <span class="hljs-string">'snitch: % %'</span>, <span class="hljs-built_in">tg_event</span>, <span class="hljs-built_in">tg_tag</span>;
|
||||
<span class="hljs-keyword">END</span>;
|
||||
$$</span> <span class="hljs-keyword">LANGUAGE</span> plpgsql;
|
||||
|
||||
<span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">EVENT TRIGGER</span> snitch <span class="hljs-keyword">ON</span> ddl_command_start <span class="hljs-keyword">EXECUTE</span> <span class="hljs-keyword">PROCEDURE</span> snitch();</code></div></div><p>and</p>
|
||||
<div class="post-code"><span class="post-code__language">PostgreSQL</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7</div><code><span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">OR REPLACE</span> <span class="hljs-keyword">FUNCTION</span> snitch() <span class="hljs-keyword">RETURNS</span> <span class="hljs-type">event_trigger</span> <span class="hljs-keyword">AS</span> $$<span class="pgsql">
|
||||
<span class="hljs-keyword">BEGIN</span>
|
||||
<span class="hljs-keyword">RAISE</span> <span class="hljs-keyword">NOTICE</span> <span class="hljs-string">'snitch: % %'</span>, <span class="hljs-built_in">tg_event</span>, <span class="hljs-built_in">tg_tag</span>;
|
||||
<span class="hljs-keyword">END</span>;
|
||||
$$</span> <span class="hljs-keyword">LANGUAGE</span> plpgsql;
|
||||
|
||||
<span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">EVENT TRIGGER</span> snitch <span class="hljs-keyword">ON</span> ddl_command_start <span class="hljs-keyword">EXECUTE</span> <span class="hljs-keyword">PROCEDURE</span> snitch();</code></div></div><p>and</p>
|
||||
<div class="post-code"><span class="post-code__language">PostgreSQL</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7</div><code><span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">OR REPLACE</span> <span class="hljs-keyword">FUNCTION</span> snitch() <span class="hljs-keyword">RETURNS</span> <span class="hljs-type">event_trigger</span> <span class="hljs-keyword">AS</span> $$<span class="pgsql">
|
||||
<span class="hljs-keyword">BEGIN</span>
|
||||
<span class="hljs-keyword">RAISE</span> <span class="hljs-keyword">NOTICE</span> <span class="hljs-string">'snitch: % %'</span>, <span class="hljs-built_in">tg_event</span>, <span class="hljs-built_in">tg_tag</span>;
|
||||
<span class="hljs-keyword">END</span>;
|
||||
$$</span> <span class="hljs-keyword">LANGUAGE</span> plpgsql;
|
||||
|
||||
<span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">EVENT TRIGGER</span> snitch <span class="hljs-keyword">ON</span> ddl_command_start <span class="hljs-keyword">EXECUTE</span> <span class="hljs-keyword">PROCEDURE</span> snitch();</code></div></div><p>or</p>
|
||||
<div class="post-code"><span class="post-code__language">PostgreSQL</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6</div><code>CREATE OR REPLACE FUNCTION add(x int, y int)
|
||||
RETURNS int
|
||||
LANGUAGE SQL
|
||||
AS $myfunc$
|
||||
SELECT x + y
|
||||
$myfunc$</code></div></div>
|
||||
41
e2e/cypress/tests/fixtures/markdown/markdown_postgres.md
поставляемый
Обычный файл
@@ -0,0 +1,41 @@
|
||||
```postgres
|
||||
CREATE OR REPLACE FUNCTION snitch() RETURNS event_trigger AS $$
|
||||
BEGIN
|
||||
RAISE NOTICE 'snitch: % %', tg_event, tg_tag;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
CREATE EVENT TRIGGER snitch ON ddl_command_start EXECUTE PROCEDURE snitch();
|
||||
```
|
||||
and
|
||||
|
||||
```pgsql
|
||||
CREATE OR REPLACE FUNCTION snitch() RETURNS event_trigger AS $$
|
||||
BEGIN
|
||||
RAISE NOTICE 'snitch: % %', tg_event, tg_tag;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
CREATE EVENT TRIGGER snitch ON ddl_command_start EXECUTE PROCEDURE snitch();
|
||||
```
|
||||
and
|
||||
|
||||
```postgresql
|
||||
CREATE OR REPLACE FUNCTION snitch() RETURNS event_trigger AS $$
|
||||
BEGIN
|
||||
RAISE NOTICE 'snitch: % %', tg_event, tg_tag;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
CREATE EVENT TRIGGER snitch ON ddl_command_start EXECUTE PROCEDURE snitch();
|
||||
```
|
||||
or
|
||||
|
||||
```pgsql
|
||||
CREATE OR REPLACE FUNCTION add(x int, y int)
|
||||
RETURNS int
|
||||
LANGUAGE SQL
|
||||
AS $myfunc$
|
||||
SELECT x + y
|
||||
$myfunc$
|
||||
```
|
||||
7
e2e/cypress/tests/fixtures/markdown/markdown_python.html
поставляемый
Обычный файл
@@ -0,0 +1,7 @@
|
||||
<div class="post-code"><span class="post-code__language">Python</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3
|
||||
4</div><code>op.execute(<span class="hljs-string">"""
|
||||
UPDATE events.settings
|
||||
SET name = 'paper_review_conditions'
|
||||
WHERE module = 'editing' AND name = 'review_conditions' """</span>)</code></div></div>
|
||||
6
e2e/cypress/tests/fixtures/markdown/markdown_python.md
поставляемый
Обычный файл
@@ -0,0 +1,6 @@
|
||||
```python
|
||||
op.execute("""
|
||||
UPDATE events.settings
|
||||
SET name = 'paper_review_conditions'
|
||||
WHERE module = 'editing' AND name = 'review_conditions' """)
|
||||
```
|
||||
7
e2e/cypress/tests/fixtures/markdown/markdown_shell.html
поставляемый
Обычный файл
@@ -0,0 +1,7 @@
|
||||
<div class="post-code"><span class="post-code__language">Bash</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2
|
||||
3
|
||||
4</div><code>find /path/to/whatever -<span class="hljs-built_in">type</span> f | sed <span class="hljs-string">"1,<span class="hljs-variable">$MAX_FILES</span> d' | while read fn; do
|
||||
echo "</span>deleting <span class="hljs-variable">$fn</span><span class="hljs-string">"
|
||||
rm -f <span class="hljs-variable">$fn</span>
|
||||
done</span></code></div></div>
|
||||
6
e2e/cypress/tests/fixtures/markdown/markdown_shell.md
поставляемый
Обычный файл
@@ -0,0 +1,6 @@
|
||||
```sh
|
||||
find /path/to/whatever -type f | sed "1,$MAX_FILES d' | while read fn; do
|
||||
echo "deleting $fn"
|
||||
rm -f $fn
|
||||
done
|
||||
```
|
||||
21
e2e/cypress/tests/fixtures/markdown/markdown_tables.html
поставляемый
Обычный файл
@@ -0,0 +1,21 @@
|
||||
<h1 class="markdown__heading">Markdown Tables</h1><p>Verify that all tables render as described. First row is boldface.</p>
|
||||
<h3 class="markdown__heading">Normal Tables</h3><p>These tables use different raw text as inputs, but all three should render as the same table. </p>
|
||||
<h4 class="markdown__heading">Table 1</h4><p>Raw text:</p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>First Header | Second Header
|
||||
------------- | -------------
|
||||
Content Cell | Content Cell
|
||||
Content Cell | Content Cell</code></div></div><p>Renders as:</p>
|
||||
<div class="table-responsive"><table class="markdown__table"><thead><tr><th>First Header</th><th>Second Header</th></tr></thead><tbody><tr><td>Content Cell</td><td>Content Cell</td></tr><tr><td>Content Cell</td><td>Content Cell</td></tr></tbody></table></div><h4 class="markdown__heading">Table 2</h4><p>Raw Text:</p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>| First Header | Second Header |
|
||||
| ------------- | ------------- |
|
||||
| Content Cell | Content Cell |
|
||||
| Content Cell | Content Cell |</code></div></div><p>Renders as:</p>
|
||||
<div class="table-responsive"><table class="markdown__table"><thead><tr><th>First Header</th><th>Second Header</th></tr></thead><tbody><tr><td>Content Cell</td><td>Content Cell</td></tr><tr><td>Content Cell</td><td>Content Cell</td></tr></tbody></table></div><h4 class="markdown__heading">Table 3</h4><p>Raw Text:</p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>| First Header | Second Header |
|
||||
| ------------- | ----------- |
|
||||
| Content Cell | Content Cell|
|
||||
| Content Cell | Content Cell |</code></div></div><p>Renders as:</p>
|
||||
<div class="table-responsive"><table class="markdown__table"><thead><tr><th>First Header</th><th>Second Header</th></tr></thead><tbody><tr><td>Content Cell</td><td>Content Cell</td></tr><tr><td>Content Cell</td><td>Content Cell</td></tr></tbody></table></div><h3 class="markdown__heading">Tables Containing Markdown</h3><p>This table should contain A1: Strikethrough, A2: Bold, B1: Italics, B2: Dolphin emoticon.</p>
|
||||
<div class="table-responsive"><table class="markdown__table"><thead><tr><th>Column\Row</th><th>1</th><th>2</th></tr></thead><tbody><tr><td>A</td><td><del>Strikethrough</del></td><td><strong>Bold</strong></td></tr><tr><td>B</td><td><em>italics</em></td><td><span data-emoticon="dolphin"><span alt=":dolphin:" class="emoticon" title=":dolphin:" style="background-image: url("http://localhost:8065/static/emoji/1f42c.png");">:dolphin:</span></span></td></tr></tbody></table></div><h3 class="markdown__heading">Table with Left, Center, and Right Aligned Columns</h3><p>The left column should be left aligned, the center column centered and the right column should be right aligned. </p>
|
||||
<div class="table-responsive"><table class="markdown__table"><thead><tr><th style="text-align: left;">Left-Aligned</th><th style="text-align: center;">Center Aligned</th><th style="text-align: right;">Right Aligned</th></tr></thead><tbody><tr><td style="text-align: left;">1</td><td style="text-align: center;">this text</td><td style="text-align: right;">$100</td></tr><tr><td style="text-align: left;">2</td><td style="text-align: center;">is</td><td style="text-align: right;">$10</td></tr><tr><td style="text-align: left;">3</td><td style="text-align: center;">centered</td><td style="text-align: right;">$1</td></tr></tbody></table></div><h3 class="markdown__heading">Table with Escaped Pipes</h3><p>First row cells: single backslash, "asdf". Second row cells: "ab" , "a|d"</p>
|
||||
<div class="table-responsive"><table class="markdown__table"><thead><tr><th>\</th><th>asdf</th></tr></thead><tbody><tr><td>ab</td><td>a|d</td></tr></tbody></table></div>
|
||||
70
e2e/cypress/tests/fixtures/markdown/markdown_test_basic.html
поставляемый
Обычный файл
@@ -0,0 +1,70 @@
|
||||
<h1 class="markdown__heading">Basic Markdown Testing</h1><p>Tests for text style, code blocks, in-line code and images, lines, block quotes, and headings.</p>
|
||||
<h3 class="markdown__heading">Text Style</h3><p><strong>The following text should render as:</strong><br><em>Italics</em>
|
||||
<em>Ita_lics</em>
|
||||
<em>Italics</em>
|
||||
<strong>Bold</strong>
|
||||
<strong><em>Bold-italics</em></strong>
|
||||
<strong><em>Bold-italics</em></strong>
|
||||
<del>Strikethrough</del></p>
|
||||
<p>This sentence contains <strong>bold</strong>, <em>italic</em>, <strong><em>bold-italic</em></strong>, and <del>stikethrough</del> text. </p>
|
||||
<p><strong>The following should render as normal text:</strong><br>Normal Text_<br>_Normal Text<br>_Normal Text*</p>
|
||||
<h3 class="markdown__heading">Carriage Return</h3><p>Line #1 followed by one blank line </p>
|
||||
<p>Line #2 followed by one blank line</p>
|
||||
<p>Line #3 followed by Line #4
|
||||
Line #4 </p>
|
||||
<h3 class="markdown__heading">Code Blocks</h3><div class="post-code post-code--wrap"><div class="hljs"><code>This text should render in a code block</code></div></div><p><strong>The following markdown should not render:</strong> </p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>_Italics_
|
||||
*Italics*
|
||||
**Bold**
|
||||
***Bold-italics***
|
||||
**Bold-italics_**
|
||||
~~Strikethrough~~
|
||||
:) :-) ;) ;-) :o :O :-o :-O
|
||||
:bamboo: :gift_heart: :dolls: :school_satchel: :mortar_board:
|
||||
# Heading 1
|
||||
## Heading 2
|
||||
### Heading 3
|
||||
#### Heading 4
|
||||
##### Heading 5
|
||||
###### Heading 6
|
||||
> Block Quote
|
||||
- List
|
||||
- List Sub-item
|
||||
[Link](http://i.giphy.com/xNrM4cGJ8u3ao.gif)
|
||||
[](https://github.com/mattermost/platform)
|
||||
| Left-Aligned Text | Center Aligned Text | Right Aligned Text |
|
||||
| :------------ |:---------------:| -----:|
|
||||
| Left column 1 | this text | $100 |</code></div></div><p><strong>The following links should not auto-link or generate previews:</strong> </p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>GIF: http://i.giphy.com/xNrM4cGJ8u3ao.gif
|
||||
Website: https://en.wikipedia.org/wiki/Dolphin</code></div></div><p><strong>The following should appear as a carriage return separating two lines of text:</strong></p>
|
||||
<div class="post-code post-code--wrap"><div class="hljs"><code>Line #1 followed by a blank line
|
||||
|
||||
Line #2 following a blank line</code></div></div><h3 class="markdown__heading">In-line Code</h3><p>The word <span class="codespan__pre-wrap"><code>monospace</code></span> should render as in-line code. </p>
|
||||
<p>The following markdown in-line code should not render:<br><span class="codespan__pre-wrap"><code>_Italics_</code></span>, <span class="codespan__pre-wrap"><code>*Italics*</code></span>, <span class="codespan__pre-wrap"><code>**Bold**</code></span>, <span class="codespan__pre-wrap"><code>***Bold-italics***</code></span>, <span class="codespan__pre-wrap"><code>**Bold-italics_**</code></span>, <span class="codespan__pre-wrap"><code>~~Strikethrough~~</code></span>, <span class="codespan__pre-wrap"><code>:)</code></span> , <span class="codespan__pre-wrap"><code>:-)</code></span> , <span class="codespan__pre-wrap"><code>;)</code></span> , <span class="codespan__pre-wrap"><code>:-O</code></span> , <span class="codespan__pre-wrap"><code>:bamboo:</code></span> , <span class="codespan__pre-wrap"><code>:gift_heart:</code></span> , <span class="codespan__pre-wrap"><code>:dolls:</code></span> , <span class="codespan__pre-wrap"><code># Heading 1</code></span>, <span class="codespan__pre-wrap"><code>## Heading 2</code></span>, <span class="codespan__pre-wrap"><code>### Heading 3</code></span>, <span class="codespan__pre-wrap"><code>#### Heading 4</code></span>, <span class="codespan__pre-wrap"><code>##### Heading 5</code></span>, <span class="codespan__pre-wrap"><code>###### Heading 6</code></span></p>
|
||||
<p>This GIF link should not preview: <span class="codespan__pre-wrap"><code>http://i.giphy.com/xNrM4cGJ8u3ao.gif</code></span><br>This link should not auto-link: <span class="codespan__pre-wrap"><code>https://en.wikipedia.org/wiki/Dolphin</code></span> </p>
|
||||
<p>This sentence with <span class="codespan__pre-wrap"><code>in-line code</code></span> should appear on one line.</p>
|
||||
<h3 class="markdown__heading">In-line Images</h3><p>(These image tests were moved into Se: MessagingMan.html) </p>
|
||||
<h3 class="markdown__heading">Lines</h3><p>Three lines should render with text between them: </p>
|
||||
<p>Text above line</p>
|
||||
<hr>
|
||||
<p>Text between lines</p>
|
||||
<hr>
|
||||
<p>Text between lines</p>
|
||||
<hr>
|
||||
<p>Text below line</p>
|
||||
<h3 class="markdown__heading">Block Quotes</h3><blockquote>
|
||||
<p>This text should render in a block quote.</p>
|
||||
</blockquote>
|
||||
<p><strong>The following markdown should render within the block quote:</strong> </p>
|
||||
<blockquote>
|
||||
<h4 class="markdown__heading">Heading 4</h4><p><em>Italics</em>, <em>Italics</em>, <strong>Bold</strong>, <strong><em>Bold-italics</em></strong>, <strong><em>Bold-italics</em></strong>, <del>Strikethrough</del><br><span data-emoticon="slightly_smiling_face"><span alt=":slightly_smiling_face:" class="emoticon" title=":slightly_smiling_face:" style="background-image: url("http://localhost:8065/static/emoji/1f642.png");">:slightly_smiling_face:</span></span> <span data-emoticon="slightly_smiling_face"><span alt=":slightly_smiling_face:" class="emoticon" title=":slightly_smiling_face:" style="background-image: url("http://localhost:8065/static/emoji/1f642.png");">:slightly_smiling_face:</span></span> <span data-emoticon="wink"><span alt=":wink:" class="emoticon" title=":wink:" style="background-image: url("http://localhost:8065/static/emoji/1f609.png");">:wink:</span></span> <span data-emoticon="scream"><span alt=":scream:" class="emoticon" title=":scream:" style="background-image: url("http://localhost:8065/static/emoji/1f631.png");">:scream:</span></span> <span data-emoticon="bamboo"><span alt=":bamboo:" class="emoticon" title=":bamboo:" style="background-image: url("http://localhost:8065/static/emoji/1f38d.png");">:bamboo:</span></span> <span data-emoticon="gift_heart"><span alt=":gift_heart:" class="emoticon" title=":gift_heart:" style="background-image: url("http://localhost:8065/static/emoji/1f49d.png");">:gift_heart:</span></span> <span data-emoticon="dolls"><span alt=":dolls:" class="emoticon" title=":dolls:" style="background-image: url("http://localhost:8065/static/emoji/1f38e.png");">:dolls:</span></span> </p>
|
||||
</blockquote>
|
||||
<p><strong>The following text should render in two block quotes separated by one line of text:</strong></p>
|
||||
<blockquote>
|
||||
<p>Block quote 1</p>
|
||||
</blockquote>
|
||||
<p>Text between block quotes</p>
|
||||
<blockquote>
|
||||
<p>Block quote 2</p>
|
||||
</blockquote>
|
||||
<h3 class="markdown__heading">Headings</h3><h1 class="markdown__heading">Heading 1 font size</h1><h2 class="markdown__heading">Heading 2 font size</h2><h3 class="markdown__heading">Heading 3 font size</h3><h4 class="markdown__heading">Heading 4 font size</h4><h5 class="markdown__heading">Heading 5 font size</h5><h6 class="markdown__heading">Heading 6 font size</h6>
|
||||
13
e2e/cypress/tests/fixtures/markdown/markdown_text_style.html
поставляемый
Обычный файл
@@ -0,0 +1,13 @@
|
||||
<h3 class="markdown__heading">Text Style</h3><p><strong>The following text should render as:</strong>
|
||||
<em>Italics</em>
|
||||
<em>Ita_lics</em>
|
||||
<em>Italics</em>
|
||||
<strong>Bold</strong>
|
||||
<strong><em>Bold-italics</em></strong>
|
||||
<strong><em>Bold-italics</em></strong>
|
||||
<del>Strikethrough</del></p>
|
||||
<p>This sentence contains <strong>bold</strong>, <em>italic</em>, <strong><em>bold-italic</em></strong>, and <del>strikethrough</del> text.</p>
|
||||
<p><strong>The following should render as normal text:</strong>
|
||||
Normal Text_
|
||||
_Normal Text
|
||||
_Normal Text*</p>
|
||||
17
e2e/cypress/tests/fixtures/markdown/markdown_text_style.md
поставляемый
Обычный файл
@@ -0,0 +1,17 @@
|
||||
### Text Style
|
||||
|
||||
**The following text should render as:**
|
||||
_Italics_
|
||||
_Ita_lics_
|
||||
*Italics*
|
||||
**Bold**
|
||||
***Bold-italics***
|
||||
**_Bold-italics_**
|
||||
~~Strikethrough~~
|
||||
|
||||
This sentence contains **bold**, _italic_, ***bold-italic***, and ~~strikethrough~~ text.
|
||||
|
||||
**The following should render as normal text:**
|
||||
Normal Text_
|
||||
_Normal Text
|
||||
_Normal Text*
|
||||
9
e2e/cypress/tests/fixtures/markdown/markdown_typescript.html
поставляемый
Обычный файл
@@ -0,0 +1,9 @@
|
||||
<div class="post-code"><span class="post-code__language">TypeScript</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2</div><code><span class="hljs-keyword">const</span> message: <span class="hljs-built_in">string</span> = <span class="hljs-string">'hello world'</span>;
|
||||
<span class="hljs-built_in">console</span>.log(message);</code></div></div><p>and</p>
|
||||
<div class="post-code"><span class="post-code__language">TypeScript</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2</div><code><span class="hljs-keyword">const</span> message: <span class="hljs-built_in">string</span> = <span class="hljs-string">'hello world'</span>;
|
||||
<span class="hljs-built_in">console</span>.log(message);</code></div></div><p>and</p>
|
||||
<div class="post-code"><span class="post-code__language">TypeScript</span><div class="hljs"><div class="post-code__line-numbers">1
|
||||
2</div><code><span class="hljs-keyword">const</span> message: <span class="hljs-built_in">string</span> = <span class="hljs-string">'hello world'</span>;
|
||||
<span class="hljs-built_in">console</span>.log(message);</code></div></div>
|
||||
17
e2e/cypress/tests/fixtures/markdown/markdown_typescript.md
поставляемый
Обычный файл
@@ -0,0 +1,17 @@
|
||||
```ts
|
||||
const message: string = 'hello world';
|
||||
console.log(message);
|
||||
```
|
||||
and
|
||||
|
||||
```tsx
|
||||
const message: string = 'hello world';
|
||||
console.log(message);
|
||||
```
|
||||
|
||||
and
|
||||
|
||||
```typescript
|
||||
const message: string = 'hello world';
|
||||
console.log(message);
|
||||
```
|
||||
Двоичные данные
e2e/cypress/tests/fixtures/mattermost-icon.png
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 13 KiB |
Двоичные данные
e2e/cypress/tests/fixtures/mattermost-icon_128x128.png
поставляемый
Обычный файл
|
После Ширина: | Высота: | Размер: 13 KiB |
10
e2e/cypress/tests/fixtures/messages.js
поставляемый
Обычный файл
@@ -0,0 +1,10 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
module.exports = {
|
||||
TINY: `${Date.now()} : Hi`,
|
||||
SMALL: `${Date.now()} : Hello world`,
|
||||
MEDIUM: `${Date.now()} The quick brown fox jumps over the lazy dog`,
|
||||
LARGE: `${Date.now()} This pangram contains four As, one B, two Cs, one D, thirty Es, six Fs, five Gs, seven Hs, eleven Is, one J, one K, two Ls, two Ms, eighteen Ns, fifteen Os, two Ps, one Q, five Rs, twenty-seven Ss, eighteen Ts, two Us, seven Vs, eight Ws, two Xs, three Ys, & one Z`,
|
||||
HUGE: `${Date.now()} The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Bright vixens jump; dozy fowl quack. Quick wafting zephyrs vex bold Jim. Quick zephyrs blow, vexing daft Jim. Sex-charged fop blew my junk TV quiz. How quickly daft jumping zebras vex. Two driven jocks help fax my big quiz. Quick, Baz, get my woven flax jodhpurs! "Now fax quiz Jack!" my brave ghost pled. Five quacking zephyrs jolt my wax bed. Flummoxed by job, kvetching W. zaps Iraq. Cozy sphinx waves quart jug of bad milk. A very bad quack might jinx zippy fowls. Few quips galvanized the mock jury box. Quick brown dogs jump over the lazy fox. The jay, pig, fox, zebra, and my wolves quack! Blowzy red vixens fight for a quick jump. Joaquin Phoenix was gazed by MTV for luck. A wizard’s job is to vex chumps quickly in fog. Watch "Jeopardy!", Alex Trebek's fun TV quiz game. Woven silk pyjamas exchanged for blue quartz. Brawny gods just flocked up to quiz and vex him. Adjusting quiver and bow, Zompyc[1] killed the fox. My faxed joke won a pager in the cable TV quiz show. Amazingly few discotheques provide jukeboxes. My girl wove six dozen plaid jackets before she quit. Six big devils from Japan quickly forgot how to waltz. Big July earthquakes confound zany experimental vow. Foxy parsons quiz and cajole the lovably dim wiki-girl. Have a pick: twenty six letters - no forcing a jumbled quiz! Crazy Fredericka bought many very exquisite opal jewels. Sixty zippers were quickly picked from the woven jute bag. A quick movement of the enemy will jeopardize six gunboats. All questions asked by five watch experts amazed the judge. Jack quietly moved up front and seized the big ball of wax. The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Bright vixens jump; dozy fowl quack. Quick wafting zephyrs vex bold Jim. Quick zephyrs blow, vexing daft Jim. Sex-charged fop blew my junk TV quiz. How quickly daft jumping zebras vex. Two driven jocks help fax my big quiz. Quick, Baz, get my woven flax jodhpurs! "Now fax quiz Jack!" my brave ghost pled. Five quacking zephyrs jolt my wax bed. Flummoxed by job, kvetching W. zaps Iraq. Cozy sphinx waves quart jug of bad milk. A very bad quack might jinx zippy fowls. Few quips galvanized the mock jury box. Quick brown dogs jump over the lazy fox. The jay, pig, fox, zebra, and my wolves quack! Blowzy red vixens fight for a quick jump. Joaquin Phoenix was gazed by MTV for luck. A wizard’s job is to vex chumps quickly in fog. Watch "Jeopardy!", Alex Trebek's fun TV quiz game. Woven silk pyjamas exchanged for blue quartz. Brawny gods just flocked up to quiz and vex him. Adjusting quiver and bow, Zompyc[1] killed the fox. My faxed joke won a pager in the cable TV quiz show. Amazingly few discotheques provide jukeboxes. My girl wove six dozen plaid jackets before she quit. Six big devils from Japan quickly forgot how to waltz. Big July earthquakes confound zany experimental vow. Foxy parsons quiz and cajole the lovably dim wiki-girl. Have a pick: twenty six letters - no forcing a jumbled quiz! Crazy Fredericka bought many very exquisite opal jewels. Sixty zippers were quickly picked from the woven jute bag. A quick movement of the enemy will jeopardize six gunboats. All questions asked by five watch experts amazed the judge. Jack quietly moved up front and seized the big ball of wax. The quick, brown fox jumps over a lazy dog. DJs flock by when MTV ax quiz prog. Junk MTV quiz graced by fox whelps. Bawds jog, flick quartz, vex nymphs. Waltz, bad nymph, for quick jigs vex! Fox nymphs grab quick-jived waltz. Brick quiz whangs jumpy veldt fox. Hello this is a long post, with more than 4000 characters, plus multiple attachments.`,
|
||||
};
|
||||