Skip to content

Commit 5b9ee98

Browse files
committed
Init test data from remote url
1 parent daf850d commit 5b9ee98

File tree

5 files changed

+224
-223
lines changed

5 files changed

+224
-223
lines changed

package-lock.json

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"@types/react-router-dom": "^5.2.0",
3333
"@types/testing-library__jest-dom": "5.14.8",
3434
"@types/validator": "^13.15.0",
35+
"bson": "^6.10.4",
3536
"copy-webpack-plugin": "^11.0.0",
3637
"css-loader": "^6.7.3",
3738
"eslint-plugin-deprecation": "^2.0.0",

playwright.config.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type { PluginOptions } from "@grafana/plugin-e2e";
2-
import { defineConfig, devices } from "@playwright/test";
3-
import { dirname } from "node:path";
1+
import type { PluginOptions } from '@grafana/plugin-e2e';
2+
import { defineConfig, devices } from '@playwright/test';
3+
import { dirname } from 'node:path';
44

5-
const pluginE2eAuth = `${dirname(require.resolve("@grafana/plugin-e2e"))}/auth`;
5+
const pluginE2eAuth = `${dirname(require.resolve('@grafana/plugin-e2e'))}/auth`;
66

77
/**
88
* Read environment variables from file.
@@ -14,39 +14,39 @@ const pluginE2eAuth = `${dirname(require.resolve("@grafana/plugin-e2e"))}/auth`;
1414
* See https://playwright.dev/docs/test-configuration.
1515
*/
1616
export default defineConfig<PluginOptions>({
17-
testDir: "./tests",
17+
testDir: './tests',
1818
/* Run tests in files in parallel */
1919
fullyParallel: true,
2020
/* Fail the build on CI if you accidentally left test.only in the source code. */
2121
forbidOnly: !!process.env.CI,
2222
/* Retry on CI only */
2323
retries: process.env.CI ? 2 : 0,
2424
/* Opt out of parallel tests on CI. */
25-
workers: process.env.CI ? 1 : undefined,
25+
workers: 1,
2626
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
27-
reporter: "html",
27+
reporter: 'html',
2828
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
2929
use: {
3030
/* Base URL to use in actions like `await page.goto('/')`. */
31-
baseURL: "http://localhost:3000",
31+
baseURL: 'http://localhost:3000',
3232

3333
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
34-
trace: "on-first-retry",
34+
trace: 'on-first-retry',
3535
},
3636

3737
/* Configure projects for major browsers */
3838
projects: [
3939
// 1. Login to Grafana and store the cookie on disk for use in other tests.
4040
{
41-
name: "auth",
41+
name: 'auth',
4242
testDir: pluginE2eAuth,
4343
testMatch: [/.*\.js/],
4444
},
4545
// 2. Run tests in Google Chrome. Every test will start authenticated as admin user.
4646
{
47-
name: "chromium",
48-
use: { ...devices["Desktop Chrome"], storageState: "playwright/.auth/admin.json" },
49-
dependencies: ["auth"],
47+
name: 'chromium',
48+
use: { ...devices['Desktop Chrome'], storageState: 'playwright/.auth/admin.json' },
49+
dependencies: ['auth'],
5050
},
5151
],
5252
});

provisioning/datasources/test/mongo-default.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: 1
22

33
datasources:
4-
- name: 'MongoDB Datasource test'
4+
- name: 'Test MongoDB DS'
55
type: 'haohanyang-mongodb-datasource'
66
access: proxy
77
isDefault: false

0 commit comments

Comments
 (0)