Skip to content

Commit

Permalink
run prettier on whole project (#2039)
Browse files Browse the repository at this point in the history
  • Loading branch information
Baoyuantop authored Aug 6, 2021
1 parent 005fd90 commit af85591
Show file tree
Hide file tree
Showing 160 changed files with 3,366 additions and 2,642 deletions.
11 changes: 6 additions & 5 deletions web/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ export default defineConfig({
},
outputPath: '../output/html',
extraBabelPlugins: [
['babel-plugin-istanbul', {
"exclude": [
"**/.umi", "**/locales"
]
}],
[
'babel-plugin-istanbul',
{
exclude: ['**/.umi', '**/locales'],
},
],
],
});
4 changes: 2 additions & 2 deletions web/cypress/fixtures/plugin-dataset.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@
{
"shouldValid": true,
"data": {
"client_id" : "foo",
"token_endpoint" : "https://host.domain/auth/realms/foo/protocol/openid-connect/token"
"client_id": "foo",
"token_endpoint": "https://host.domain/auth/realms/foo/protocol/openid-connect/token"
}
},
{
Expand Down
14 changes: 2 additions & 12 deletions web/cypress/fixtures/rawDataEditor-dataset.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
{
"Route": {
"uris": [
"/*"
],
"uris": ["/*"],
"name": "root",
"methods": [
"GET",
"HEAD",
"POST",
"PUT",
"DELETE",
"OPTIONS",
"PATCH"
],
"methods": ["GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"],
"upstream": {
"nodes": [
{
Expand Down
12 changes: 7 additions & 5 deletions web/cypress/fixtures/route-json-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
"vars": [],
"upstream": {
"type": "roundrobin",
"nodes": [{
"host": "httpbin.org",
"port": 80,
"weight": 1
}],
"nodes": [
{
"host": "httpbin.org",
"port": 80,
"weight": 1
}
],
"pass_host": "pass",
"timeout": {
"connect": 6,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,25 @@
/* eslint-disable no-undef */

context('Create and delete consumer with api-breaker plugin form', () => {

const selector = {
break_response_code: "#break_response_code",
empty:'.ant-empty-normal',
break_response_code: '#break_response_code',
empty: '.ant-empty-normal',
username: '#username',
description: '#desc',
pluginCard: '.ant-card',
drawer: '.ant-drawer-content',
disabledSwitcher: '#disable',
notification: '.ant-notification-notice-message',
monacoViewZones: '.view-zones'
}
monacoViewZones: '.view-zones',
};

const data = {
break_response_code: 200,
consumerName: 'test_consumer',
description: 'desc_by_autotest',
createConsumerSuccess: 'Create Consumer Successfully',
deleteConsumerSuccess: 'Delete Consumer Successfully'
}
deleteConsumerSuccess: 'Delete Consumer Successfully',
};

beforeEach(() => {
cy.login();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
/* eslint-disable no-undef */

context('Create and delete consumer with limit-count plugin form', () => {

const selector = {
empty:'.ant-empty-normal',
empty: '.ant-empty-normal',
username: '#username',
description: '#desc',
pluginCard: '.ant-card',
Expand All @@ -39,8 +38,8 @@ context('Create and delete consumer with limit-count plugin form', () => {
redis_cluster_name: '#redis_cluster_name',
redis_cluster_nodes_0: '#redis_cluster_nodes_0',
redis_cluster_nodes_1: '#redis_cluster_nodes_1',
monacoViewZones: '.view-zones'
}
monacoViewZones: '.view-zones',
};

const data = {
consumerName: 'test_consumer',
Expand All @@ -49,7 +48,7 @@ context('Create and delete consumer with limit-count plugin form', () => {
deleteConsumerSuccess: 'Delete Consumer Successfully',
redisClusterName: 'Please Enter redis_cluster_name',
redisClusterNode: 'Please Enter redis_cluster_node',
}
};

beforeEach(() => {
cy.login();
Expand Down Expand Up @@ -122,7 +121,6 @@ context('Create and delete consumer with limit-count plugin form', () => {
});
cy.get(selector.drawer).should('not.exist');


// config limit-count form with redis-cluster policy
cy.contains(selector.pluginCard, 'limit-count').within(() => {
cy.contains('Enable').click({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
/* eslint-disable no-undef */

context('Create and delete consumer with proxy-mirror plugin form', () => {

const selector = {
empty:'.ant-empty-normal',
empty: '.ant-empty-normal',
username: '#username',
description: '#desc',
pluginCard: '.ant-card',
Expand All @@ -32,16 +31,16 @@ context('Create and delete consumer with proxy-mirror plugin form', () => {
allow_origins_by_regex: '#allow_origins_by_regex_0',
host: '#host',
alert: '[role=alert]',
monacoViewZones: '.view-zones'
}
monacoViewZones: '.view-zones',
};

const data = {
consumerName: 'test_consumer',
description: 'desc_by_autotest',
createConsumerSuccess: 'Create Consumer Successfully',
deleteConsumerSuccess: 'Delete Consumer Successfully',
time: 2,
}
};

beforeEach(() => {
cy.login();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
/* eslint-disable no-undef */

context('Create and Delete Consumer', () => {

const selector = {
empty:'.ant-empty-normal',
empty: '.ant-empty-normal',
username: '#username',
description: '#desc',
pluginCard: '.ant-card',
Expand All @@ -34,16 +33,16 @@ context('Create and Delete Consumer', () => {
remote_addr: '[title=remote_addr]',
max_age: '#max_age',
allow_origins_by_regex: '#allow_origins_by_regex_0',
monacoViewZones: '.view-zones'
}
monacoViewZones: '.view-zones',
};

const data = {
consumerName: 'test_consumer',
description: 'desc_by_autotest',
createConsumerSuccess: 'Create Consumer Successfully',
deleteConsumerSuccess: 'Delete Consumer Successfully',
time: 2,
}
};

beforeEach(() => {
cy.login();
Expand All @@ -62,7 +61,7 @@ context('Create and Delete Consumer', () => {
// config auth plugin
cy.contains(selector.pluginCard, 'key-auth').within(() => {
cy.contains('Enable').click({
force: true
force: true,
});
});
cy.focused(selector.drawer).should('exist');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
/* eslint-disable no-undef */

context('Create and Delete Consumer', () => {

const selector = {
empty:'.ant-empty-normal',
empty: '.ant-empty-normal',
username: '#username',
description: '#desc',
pluginCard: '.ant-card',
Expand All @@ -31,16 +30,16 @@ context('Create and Delete Consumer', () => {
burst: '#burst',
key: '#key',
remote_addr: '[title=remote_addr]',
monacoViewZones: '.view-zones'
}
monacoViewZones: '.view-zones',
};

const data = {
consumerName: 'test_consumer',
description: 'desc_by_autotest',
createConsumerSuccess: 'Create Consumer Successfully',
deleteConsumerSuccess: 'Delete Consumer Successfully',
time: 2,
}
};

beforeEach(() => {
cy.login();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
/* eslint-disable no-undef */

context('Create and delete consumer with limit-conn plugin form', () => {

const selector = {
empty:'.ant-empty-normal',
empty: '.ant-empty-normal',
username: '#username',
description: '#desc',
pluginCard: '.ant-card',
Expand All @@ -34,8 +33,8 @@ context('Create and delete consumer with limit-conn plugin form', () => {
key: '#key',
rejected_code: '#rejected_code',
title: '[title="remote_addr"]',
monacoViewZones: '.view-zones'
}
monacoViewZones: '.view-zones',
};

const data = {
consumerName: 'test_consumer',
Expand All @@ -46,7 +45,7 @@ context('Create and delete consumer with limit-conn plugin form', () => {
burst: 0,
default_conn_delay: 1,
key: 'remote_addr',
}
};

beforeEach(() => {
cy.login();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,27 @@
/* eslint-disable no-undef */

context('Create and delete Consumer with referer-restriction form ', () => {

const selector = {
empty:'.ant-empty-normal',
empty: '.ant-empty-normal',
username: '#username',
description: '#desc',
pluginCard: '.ant-card',
drawer: '.ant-drawer-content',
dropdown: '.rc-virtual-list',
disabledSwitcher: '#disable',
notification: '.ant-notification-notice-message',
whitelist: "#whitelist_0",
bypass_missing: "#bypass_missing",
monacoViewZones: '.view-zones'
}
whitelist: '#whitelist_0',
bypass_missing: '#bypass_missing',
monacoViewZones: '.view-zones',
};

const data = {
consumerName: 'test_consumer',
description: 'desc_by_autotest',
createConsumerSuccess: 'Create Consumer Successfully',
deleteConsumerSuccess: 'Delete Consumer Successfully',
whitelist: 'yy.com',
}
};

beforeEach(() => {
cy.login();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
/* eslint-disable no-undef */

context('Create and Delete Consumer', () => {

const selector = {
empty:'.ant-empty-normal',
empty: '.ant-empty-normal',
username: '#username',
description: '#desc',
pluginCard: '.ant-card',
Expand All @@ -28,17 +27,17 @@ context('Create and Delete Consumer', () => {
notification: '.ant-notification-notice-message',
nameSelector: '[title=Name]',
serviceSelector: '[title=test_service]',
monacoScroll: ".monaco-scrollable-element",
monacoViewZones: '.view-zones'
}
monacoScroll: '.monaco-scrollable-element',
monacoViewZones: '.view-zones',
};

const data = {
consumerName: 'test_consumer',
description: 'desc_by_autotest',
createConsumerSuccess: 'Create Consumer Successfully',
deleteConsumerSuccess: 'Delete Consumer Successfully',
pluginErrorAlert: 'Invalid plugin data'
}
pluginErrorAlert: 'Invalid plugin data',
};

beforeEach(() => {
cy.login();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
context('dashboard page smoke test', () => {
const selector = {
pageContent: '.ant-pro-page-container',
}
};
beforeEach(() => {
cy.login();
});
Expand Down
2 changes: 1 addition & 1 deletion web/cypress/integration/lang/switch-language.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ context('Switch language', () => {

const selector = {
languageSwitcher: '.ant-space-align-center',
}
};

beforeEach(() => {
cy.login();
Expand Down
Loading

0 comments on commit af85591

Please sign in to comment.