Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable dublicate tests compas openscd #245

Merged
merged 4 commits into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
juancho0202 marked this conversation as resolved.
Show resolved Hide resolved
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