Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
1b5e7cee
Commit
1b5e7cee
authored
Sep 27, 2019
by
Dominik Prokop
Committed by
Ryan McKinley
Sep 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grafana/toolkit: Remove hack to expose plugin/e2e exports & types (#19467)
parent
00e7c7c4
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
15 additions
and
37 deletions
+15
-37
packages/grafana-toolkit/package.json
+1
-2
packages/grafana-toolkit/src/cli/tasks/toolkit.build.ts
+0
-16
packages/grafana-toolkit/src/index.ts
+0
-6
packages/grafana-toolkit/src/plugins/e2e/commonPluginTests.ts
+3
-2
packages/grafana-toolkit/tsconfig.json
+1
-1
public/e2e-test/pages/dashboards/createDashboardPage.ts
+1
-1
public/e2e-test/pages/dashboards/dashboardsPage.ts
+1
-1
public/e2e-test/pages/dashboards/saveDashboardModal.ts
+1
-1
public/e2e-test/pages/datasources/addDataSourcePage.ts
+1
-1
public/e2e-test/pages/datasources/dataSources.ts
+1
-1
public/e2e-test/pages/datasources/editDataSourcePage.ts
+1
-1
public/e2e-test/pages/panels/editPanel.ts
+1
-1
public/e2e-test/pages/panels/panel.ts
+1
-1
public/e2e-test/pages/panels/sharePanelModal.ts
+1
-1
public/e2e-test/scenarios/smoke.test.ts
+1
-1
No files found.
packages/grafana-toolkit/package.json
View file @
1b5e7cee
...
@@ -100,6 +100,5 @@
...
@@ -100,6 +100,5 @@
},
},
"_moduleAliases"
:
{
"_moduleAliases"
:
{
"puppeteer"
:
"node_modules/puppeteer-core"
"puppeteer"
:
"node_modules/puppeteer-core"
},
}
"types"
:
"src/index.ts"
}
}
packages/grafana-toolkit/src/cli/tasks/toolkit.build.ts
View file @
1b5e7cee
...
@@ -3,7 +3,6 @@ import * as fs from 'fs';
...
@@ -3,7 +3,6 @@ import * as fs from 'fs';
import
chalk
from
'chalk'
;
import
chalk
from
'chalk'
;
import
{
useSpinner
}
from
'../utils/useSpinner'
;
import
{
useSpinner
}
from
'../utils/useSpinner'
;
import
{
Task
,
TaskRunner
}
from
'./task'
;
import
{
Task
,
TaskRunner
}
from
'./task'
;
import
escapeRegExp
from
'lodash/escapeRegExp'
;
const
path
=
require
(
'path'
);
const
path
=
require
(
'path'
);
...
@@ -120,21 +119,6 @@ const toolkitBuildTaskRunner: TaskRunner<ToolkitBuildOptions> = async () => {
...
@@ -120,21 +119,6 @@ const toolkitBuildTaskRunner: TaskRunner<ToolkitBuildOptions> = async () => {
fs
.
mkdirSync
(
'./dist/sass'
);
fs
.
mkdirSync
(
'./dist/sass'
);
await
copyFiles
();
await
copyFiles
();
await
copySassFiles
();
await
copySassFiles
();
// RYAN HACK HACK HACK
// when Dominik is back from vacation, we can find a better way
// This moves the index to the root so plugin e2e tests can import them
console
.
warn
(
'hacking an index.js file for toolkit. Help!'
);
const
index
=
`
${
distDir
}
/src/index.js`
;
fs
.
readFile
(
index
,
'utf8'
,
(
err
,
data
)
=>
{
const
pattern
=
'require("./'
;
const
js
=
data
.
replace
(
new
RegExp
(
escapeRegExp
(
pattern
),
'g'
),
'require("./src/'
);
fs
.
writeFile
(
`
${
distDir
}
/index.js`
,
js
,
err
=>
{
if
(
err
)
{
throw
new
Error
(
'Error writing index: '
+
err
);
}
});
});
};
};
export
const
toolkitBuildTask
=
new
Task
<
ToolkitBuildOptions
>
(
'@grafana/toolkit build'
,
toolkitBuildTaskRunner
);
export
const
toolkitBuildTask
=
new
Task
<
ToolkitBuildOptions
>
(
'@grafana/toolkit build'
,
toolkitBuildTaskRunner
);
packages/grafana-toolkit/src/index.ts
deleted
100644 → 0
View file @
00e7c7c4
export
*
from
'./e2e'
;
// Namespace for Plugins
import
*
as
plugins
from
'./plugins'
;
export
{
plugins
};
packages/grafana-toolkit/src/plugins/e2e/commonPluginTests.ts
View file @
1b5e7cee
import
{
Browser
,
Page
}
from
'puppeteer-core'
;
import
{
Browser
,
Page
}
from
'puppeteer-core'
;
import
{
e2eScenario
,
takeScreenShot
,
plugins
,
pages
}
from
'@grafana/toolkit'
;
import
{
e2eScenario
,
takeScreenShot
,
pages
}
from
'@grafana/toolkit/src/e2e'
;
import
{
getEndToEndSettings
}
from
'@grafana/toolkit/src/plugins'
;
// ****************************************************************
// ****************************************************************
// NOTE, This file is copied to plugins at runtime, it is not run locally
// NOTE, This file is copied to plugins at runtime, it is not run locally
...
@@ -11,7 +12,7 @@ const sleep = (milliseconds: number) => {
...
@@ -11,7 +12,7 @@ const sleep = (milliseconds: number) => {
};
};
e2eScenario
(
'Common Plugin Test'
,
'should pass'
,
async
(
browser
:
Browser
,
page
:
Page
)
=>
{
e2eScenario
(
'Common Plugin Test'
,
'should pass'
,
async
(
browser
:
Browser
,
page
:
Page
)
=>
{
const
settings
=
plugins
.
getEndToEndSettings
();
const
settings
=
getEndToEndSettings
();
const
pluginPage
=
pages
.
getPluginPage
(
settings
.
plugin
.
id
);
const
pluginPage
=
pages
.
getPluginPage
(
settings
.
plugin
.
id
);
await
pluginPage
.
init
(
page
);
await
pluginPage
.
init
(
page
);
await
pluginPage
.
navigateTo
();
await
pluginPage
.
navigateTo
();
...
...
packages/grafana-toolkit/tsconfig.json
View file @
1b5e7cee
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
"rootDirs"
:
[
"."
],
"rootDirs"
:
[
"."
],
"outDir"
:
"dist/src"
,
"outDir"
:
"dist/src"
,
"declaration"
:
true
,
"declaration"
:
true
,
"declarationDir"
:
"dist"
,
"declarationDir"
:
"dist
/src
"
,
"typeRoots"
:
[
"./node_modules/@types"
],
"typeRoots"
:
[
"./node_modules/@types"
],
"esModuleInterop"
:
true
,
"esModuleInterop"
:
true
,
"lib"
:
[
"es2015"
,
"es2017.string"
,
"dom"
]
"lib"
:
[
"es2015"
,
"es2017.string"
,
"dom"
]
...
...
public/e2e-test/pages/dashboards/createDashboardPage.ts
View file @
1b5e7cee
import
{
TestPage
,
ClickablePageObjectType
,
ClickablePageObject
,
Selector
}
from
'@grafana/toolkit'
;
import
{
TestPage
,
ClickablePageObjectType
,
ClickablePageObject
,
Selector
}
from
'@grafana/toolkit
/src/e2e
'
;
export
interface
CreateDashboardPage
{
export
interface
CreateDashboardPage
{
addQuery
:
ClickablePageObjectType
;
addQuery
:
ClickablePageObjectType
;
...
...
public/e2e-test/pages/dashboards/dashboardsPage.ts
View file @
1b5e7cee
import
{
TestPage
,
ClickablePageObjectType
,
ClickablePageObject
,
Selector
}
from
'@grafana/toolkit'
;
import
{
TestPage
,
ClickablePageObjectType
,
ClickablePageObject
,
Selector
}
from
'@grafana/toolkit
/src/e2e
'
;
export
interface
DashboardsPage
{
export
interface
DashboardsPage
{
dashboard
:
ClickablePageObjectType
;
dashboard
:
ClickablePageObjectType
;
...
...
public/e2e-test/pages/dashboards/saveDashboardModal.ts
View file @
1b5e7cee
...
@@ -6,7 +6,7 @@ import {
...
@@ -6,7 +6,7 @@ import {
InputPageObjectType
,
InputPageObjectType
,
InputPageObject
,
InputPageObject
,
PageObject
,
PageObject
,
}
from
'@grafana/toolkit'
;
}
from
'@grafana/toolkit
/src/e2e
'
;
export
interface
SaveDashboardModal
{
export
interface
SaveDashboardModal
{
name
:
InputPageObjectType
;
name
:
InputPageObjectType
;
...
...
public/e2e-test/pages/datasources/addDataSourcePage.ts
View file @
1b5e7cee
import
{
TestPage
,
ClickablePageObject
,
Selector
,
ClickablePageObjectType
}
from
'@grafana/toolkit'
;
import
{
TestPage
,
ClickablePageObject
,
Selector
,
ClickablePageObjectType
}
from
'@grafana/toolkit
/src/e2e
'
;
export
interface
AddDataSourcePage
{
export
interface
AddDataSourcePage
{
testDataDB
:
ClickablePageObjectType
;
testDataDB
:
ClickablePageObjectType
;
...
...
public/e2e-test/pages/datasources/dataSources.ts
View file @
1b5e7cee
import
{
TestPage
}
from
'@grafana/toolkit'
;
import
{
TestPage
}
from
'@grafana/toolkit
/src/e2e
'
;
export
interface
DataSourcesPage
{}
export
interface
DataSourcesPage
{}
...
...
public/e2e-test/pages/datasources/editDataSourcePage.ts
View file @
1b5e7cee
...
@@ -5,7 +5,7 @@ import {
...
@@ -5,7 +5,7 @@ import {
ClickablePageObject
,
ClickablePageObject
,
PageObject
,
PageObject
,
Selector
,
Selector
,
}
from
'@grafana/toolkit'
;
}
from
'@grafana/toolkit
/src/e2e
'
;
export
interface
EditDataSourcePage
{
export
interface
EditDataSourcePage
{
saveAndTest
:
ClickablePageObjectType
;
saveAndTest
:
ClickablePageObjectType
;
...
...
public/e2e-test/pages/panels/editPanel.ts
View file @
1b5e7cee
...
@@ -5,7 +5,7 @@ import {
...
@@ -5,7 +5,7 @@ import {
Selector
,
Selector
,
ClickablePageObjectType
,
ClickablePageObjectType
,
ClickablePageObject
,
ClickablePageObject
,
}
from
'@grafana/toolkit'
;
}
from
'@grafana/toolkit
/src/e2e
'
;
export
interface
EditPanelPage
{
export
interface
EditPanelPage
{
queriesTab
:
ClickablePageObjectType
;
queriesTab
:
ClickablePageObjectType
;
...
...
public/e2e-test/pages/panels/panel.ts
View file @
1b5e7cee
import
{
TestPage
,
ClickablePageObjectType
,
ClickablePageObject
,
Selector
}
from
'@grafana/toolkit'
;
import
{
TestPage
,
ClickablePageObjectType
,
ClickablePageObject
,
Selector
}
from
'@grafana/toolkit
/src/e2e
'
;
export
interface
Panel
{
export
interface
Panel
{
panelTitle
:
ClickablePageObjectType
;
panelTitle
:
ClickablePageObjectType
;
...
...
public/e2e-test/pages/panels/sharePanelModal.ts
View file @
1b5e7cee
import
{
TestPage
,
ClickablePageObjectType
,
ClickablePageObject
,
Selector
}
from
'@grafana/toolkit'
;
import
{
TestPage
,
ClickablePageObjectType
,
ClickablePageObject
,
Selector
}
from
'@grafana/toolkit
/src/e2e
'
;
export
interface
SharePanelModal
{
export
interface
SharePanelModal
{
directLinkRenderedImage
:
ClickablePageObjectType
;
directLinkRenderedImage
:
ClickablePageObjectType
;
...
...
public/e2e-test/scenarios/smoke.test.ts
View file @
1b5e7cee
import
{
Browser
,
Page
,
Target
}
from
'puppeteer-core'
;
import
{
Browser
,
Page
,
Target
}
from
'puppeteer-core'
;
import
{
e2eScenario
,
constants
,
takeScreenShot
,
compareScreenShots
}
from
'@grafana/toolkit'
;
import
{
e2eScenario
,
constants
,
takeScreenShot
,
compareScreenShots
}
from
'@grafana/toolkit
/src/e2e
'
;
import
{
addDataSourcePage
}
from
'e2e-test/pages/datasources/addDataSourcePage'
;
import
{
addDataSourcePage
}
from
'e2e-test/pages/datasources/addDataSourcePage'
;
import
{
editDataSourcePage
}
from
'e2e-test/pages/datasources/editDataSourcePage'
;
import
{
editDataSourcePage
}
from
'e2e-test/pages/datasources/editDataSourcePage'
;
import
{
dataSourcesPage
}
from
'e2e-test/pages/datasources/dataSources'
;
import
{
dataSourcesPage
}
from
'e2e-test/pages/datasources/dataSources'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment