Skip to content

Commit 38f6c21

Browse files
Merge pull request #542 from gemini-testing/kr/rebranding/use_tp
fix(html-reporter): dont require hermione dependency
2 parents 6874016 + 8e81dff commit 38f6c21

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+3236
-2532
lines changed

lib/gui/api/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {ApiFacade} from './facade';
2-
import type Testplane from 'hermione';
2+
import type Testplane from 'testplane';
33
import {Express} from 'express';
44

55
export interface ServerReadyData {

lib/gui/app.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import _ from 'lodash';
33

44
import {ToolRunner, ToolRunnerTree, UndoAcceptImagesResult} from './tool-runner';
55
import {HtmlReporterApi} from '../types';
6-
import type Testplane from 'hermione';
7-
import type {Config} from 'hermione';
6+
import type Testplane from 'testplane';
7+
import type {Config} from 'testplane';
88
import {GuiConfigs} from './index';
99
import {TestSpec} from './tool-runner/runner/runner';
1010
import {TestBranch, TestEqualDiffsData, TestRefUpdateData} from '../tests-tree-builder/gui';

lib/gui/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as server from './server';
66
import {logger} from '../common-utils';
77
import * as utils from '../server-utils';
88
import {HtmlReporterApi, ReporterConfig} from '../types';
9-
import type Testplane from 'hermione';
9+
import type Testplane from 'testplane';
1010
import {Api} from './api';
1111

1212
const {logError} = utils;

lib/gui/tool-runner/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import path from 'path';
33
import {CommanderStatic} from '@gemini-testing/commander';
44
import chalk from 'chalk';
55
import fs from 'fs-extra';
6-
import type Testplane from 'hermione';
7-
import type {TestCollection, Test as TestplaneTest, Config as TestplaneConfig} from 'hermione';
6+
import type Testplane from 'testplane';
7+
import type {TestCollection, Test as TestplaneTest, Config as TestplaneConfig} from 'testplane';
88
import _ from 'lodash';
99
import looksSame, {CoordBounds} from 'looks-same';
1010

lib/gui/tool-runner/report-subscriber.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os from 'os';
22
import PQueue from 'p-queue';
3-
import type Testplane from 'hermione';
4-
import type {Test as TestplaneTest} from 'hermione';
3+
import type Testplane from 'testplane';
4+
import type {Test as TestplaneTest} from 'testplane';
55
import {ClientEvents} from '../constants';
66
import {getSuitePath} from '../../plugin-utils';
77
import {createWorkers, CreateWorkersRunner} from '../../workers/create-workers';

lib/gui/tool-runner/runner/all-test-runner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {TestCollection} from 'hermione';
1+
import type {TestCollection} from 'testplane';
22
import {BaseRunner} from './runner';
33

44
export class AllTestRunner extends BaseRunner {

lib/gui/tool-runner/runner/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import _ from 'lodash';
2-
import type {TestCollection} from 'hermione';
2+
import type {TestCollection} from 'testplane';
33

44
import {TestRunner, TestSpec} from './runner';
55
import {AllTestRunner} from './all-test-runner';

lib/gui/tool-runner/runner/runner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {TestCollection} from 'hermione';
1+
import type {TestCollection} from 'testplane';
22

33
export interface TestRunner {
44
run<U>(handler: (testCollection: TestCollection) => U): U;

lib/gui/tool-runner/runner/specific-test-runner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {TestCollection} from 'hermione';
1+
import type {TestCollection} from 'testplane';
22
import {BaseRunner, TestSpec} from './runner';
33

44
export class SpecificTestRunner extends BaseRunner {

lib/server-utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import url from 'url';
55
import chalk from 'chalk';
66
import {Router} from 'express';
77
import fs from 'fs-extra';
8-
import type Testplane from 'hermione';
9-
import type {Test as TestplaneTest} from 'hermione';
8+
import type Testplane from 'testplane';
9+
import type {Test as TestplaneTest} from 'testplane';
1010
import _ from 'lodash';
1111
import tmp from 'tmp';
1212

lib/static/modules/load-plugin.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ const whitelistedDeps = {
3333
};
3434

3535
// It's expected that in the plugin code there is a
36-
// __hermione_html_reporter_register_plugin__ call,
36+
// __testplane_html_reporter_register_plugin__ call,
3737
// with actual plugin passed.
3838
// Such a plugin may be created by using the following webpack config:
3939
// ```
40-
// output: { libraryTarget: 'jsonp', library: '__hermione_html_reporter_register_plugin__' }
40+
// output: { libraryTarget: 'jsonp', library: '__testplane_html_reporter_register_plugin__' }
4141
// ```
4242
// or with a call to the function in the plugin code directly.
4343
//
@@ -102,7 +102,7 @@ async function initPlugin(plugin, pluginName, pluginConfig) {
102102
}
103103
}
104104

105-
// Actual plugin is passed to __hermione_html_reporter_register_plugin__ somewhere in the
105+
// Actual plugin is passed to __testplane_html_reporter_register_plugin__ somewhere in the
106106
// plugin code
107107
function executePluginCode(code) {
108108
const getRegisterFn = tool => `function __${tool}_html_reporter_register_plugin__(p) {return p;};`;

lib/test-adapter/testplane.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from 'path';
22
import _ from 'lodash';
3-
import type Testplane from 'hermione';
4-
import type {Test as TestplaneTest} from 'hermione';
3+
import type Testplane from 'testplane';
4+
import type {Test as TestplaneTest} from 'testplane';
55
import {ValueOf} from 'type-fest';
66

77
import {getCommandsHistory} from '../history-utils';

lib/types.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type {LooksSameOptions, CoordBounds} from 'looks-same';
2-
import type {default as Testplane, TestResult} from 'hermione';
2+
import type {default as Testplane, TestResult} from 'testplane';
33
import {DiffModeId, SaveFormat, SUITES_TABLE_COLUMNS, TestStatus, ViewMode} from './constants';
44
import type {HtmlReporter} from './plugin-api';
55
import {ImageDiffError, NoRefImageError} from './errors';
@@ -8,7 +8,7 @@ declare module 'tmp' {
88
export const tmpdir: string;
99
}
1010

11-
export {Suite as TestplaneSuite} from 'hermione';
11+
export {Suite as TestplaneSuite} from 'testplane';
1212

1313
export interface HermioneTestResult extends TestResult {
1414
timestamp?: number;

0 commit comments

Comments
 (0)