Skip to content

Commit

Permalink
Merge pull request #245 from com-pas/244-disable-dublicate-tests-comp…
Browse files Browse the repository at this point in the history
…as-openscd

fix: disable dublicate tests compas openscd
  • Loading branch information
juancho0202 committed May 16, 2023
2 parents 2d4ca1c + d5d2181 commit 69b8636
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 13 deletions.
2 changes: 1 addition & 1 deletion public/js/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export const officialPlugins = [
},
{
name: 'Autogen Substation',
src: '/src/editors/substation/autogen-substation/autogen-substation.js',
src: '/src/compas-editors/autogen-substation.js',
icon: 'playlist_add_circle',
default: true,
kind: 'menu',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LitElement, property } from 'lit-element';
import { createElement, newActionEvent } from '../../../foundation.js';
import { createElement, newActionEvent } from '../foundation.js';

let cbNum = 1;
let dsNum = 1;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { expect, fixture, html } from '@open-wc/testing';

import '../../../../unit/mock-editor.js';
import { MockEditor } from '../../../../unit/mock-editor.js';
import '../../../../../src/editors/substation/autogen-substation/autogen-substation.js';
import CompasAutogenerateSubstation from '../../../../../src/editors/substation/autogen-substation/autogen-substation.js';
import '../../unit/mock-editor.js';
import { MockEditor } from '../../unit/mock-editor.js';
import '../../../src/compas-editors/autogen-substation.js';
import CompasAutogenerateSubstation from '../../../src/compas-editors/autogen-substation.js';

describe('autogen-substation-integration', () => {
if (customElements.get('') === undefined)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, fixture, html } from '@open-wc/testing';

import Sitipe from '../../../src/editors/Sitipe.js';
import Sitipe from '../../../src/compas-editors/Sitipe.js';

describe('Sitipe plugin', () => {
customElements.define('sitipe-plugin', Sitipe);
Expand Down
24 changes: 24 additions & 0 deletions test/unit/compas-editors/__snapshots__/Sitipe.test.snap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* @web/test-runner snapshot v1 */
export const snapshots = {};

snapshots["Sitipe plugin No doc loaded Should look like latest snapshot"] =
`<div class="container">
<h1>
<span style="color: var(--base1)">
[substation.missing]
</span>
</h1>
</div>
`;
/* end snapshot Sitipe plugin No doc loaded Should look like latest snapshot */

snapshots["Sitipe plugin With Doc loaded Should look like latest snapshot"] =
`<div class="container">
<section>
<sitipe-substation>
</sitipe-substation>
</section>
</div>
`;
/* end snapshot Sitipe plugin With Doc loaded Should look like latest snapshot */

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { fixture, html, expect } from '@open-wc/testing';

import '../../../../src/editors/sitipe/sitipe-substation.js';
import { SitipeSubstation } from '../../../../src/editors/sitipe/sitipe-substation.js';
import '../../../../src/compas-editors/sitipe/sitipe-substation.js';
import { SitipeSubstation } from '../../../../src/compas-editors/sitipe/sitipe-substation.js';

describe('sitipe-substation', () => {
let element: SitipeSubstation;
Expand Down
17 changes: 13 additions & 4 deletions web-test-runner.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,29 @@ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
/** filter browser logs
* Plugins have a fix URL and do not fit to the file structure in test environment.
* Creating open-scd in the tests leads to error in the browser log - we had to disable the browser log
*/
*/
browserLogs: false,

/** specify groups for unit and integrations tests
* hint: no --group definition runs all groups
*/
*/
groups: [
{
name: 'unit',
files: 'test/unit/**/*.test.ts',
files: [
'test/unit/compas/*.test.ts',
'test/unit/compas-editors/**/*.test.ts',
'test/unit/compas-services/*.test.ts',
'test/unit/compas-wizards/*.test.ts',
'test/unit/Plugging.test.ts',
],
},
{
name: 'integration',
files: 'test/integration/**/*.test.ts',
files: [
'test/integration/compas/*.test.ts',
'test/integration/compas-editors/*.test.ts',
],
},
],

Expand Down

0 comments on commit 69b8636

Please sign in to comment.