some reformattings

added badges
This commit is contained in:
lukas 2020-06-09 23:22:43 +02:00
parent 83823dceab
commit bb18a62a3d
14 changed files with 53 additions and 11 deletions

View File

@ -1,3 +1,5 @@
[![pipeline status](http://gitlab.heili.eu/lukas/openmediacenter/badges/master/pipeline.svg)](http://gitlab.heili.eu/lukas/openmediacenter/-/commits/master)
[![coverage report](http://gitlab.heili.eu/lukas/openmediacenter/badges/master/coverage.svg)](http://gitlab.heili.eu/lukas/openmediacenter/-/commits/master)
# Open Media Center # Open Media Center
Github: This is only a clone of the main Repository. Github: This is only a clone of the main Repository.

View File

@ -47,5 +47,8 @@
"last 1 firefox version", "last 1 firefox version",
"last 1 safari version" "last 1 safari version"
] ]
},
"devDependencies": {
"react-test-renderer": "^16.13.1"
} }
} }

View File

@ -0,0 +1,17 @@
import React from "react";
import ReactDom from 'react-dom'
import {render, cleanup} from '@testing-library/react'
import "@testing-library/jest-dom"
import AddTagPopup from "./AddTagPopup";
afterEach(cleanup);
describe('<AddTagPopup/>', function () {
it('renders without crashing ', function () {
const div = document.createElement("div");
ReactDom.render(<AddTagPopup/>,div);
ReactDom.unmountComponentAtNode(div);
});
});

View File

@ -1,5 +1,5 @@
import React from "react"; import React from "react";
import "../css/SideBar.css" import "./SideBar.css"
class SideBar extends React.Component { class SideBar extends React.Component {
render() { render() {

View File

@ -0,0 +1,20 @@
import React from "react";
import ReactDom from 'react-dom'
import SideBar from "./SideBar";
import {render} from '@testing-library/react'
import "@testing-library/jest-dom"
describe('<SideBar/>', function () {
it('renders without crashing ', function () {
const div = document.createElement("div");
ReactDom.render(<SideBar/>,div);
ReactDom.unmountComponentAtNode(div);
});
it('renders childs correctly', function () {
const {getByText} = render(<SideBar>test</SideBar>);
const randomElement = getByText(/test/i);
expect(randomElement).toBeInTheDocument();
});
});

View File

@ -1,6 +1,6 @@
import React from "react"; import React from "react";
import "../css/Tag.css" import "./Tag.css"
class Tag extends React.Component { class Tag extends React.Component {

View File

@ -1,6 +1,6 @@
import React from "react"; import React from "react";
import SideBar from "../elements/SideBar"; import SideBar from "../elements/SideBar/SideBar";
import Tag from "../elements/Tag"; import Tag from "../elements/Tag/Tag";
import {TagPreview} from "../elements/Preview"; import {TagPreview} from "../elements/Preview";
import NewTagPopup from "../elements/NewTagPopup"; import NewTagPopup from "../elements/NewTagPopup";

View File

@ -1,6 +1,6 @@
import React from "react"; import React from "react";
import SideBar from "../elements/SideBar"; import SideBar from "../elements/SideBar/SideBar";
import Tag from "../elements/Tag"; import Tag from "../elements/Tag/Tag";
import VideoContainer from "../elements/VideoContainer"; import VideoContainer from "../elements/VideoContainer";
import "../css/HomePage.css" import "../css/HomePage.css"

View File

@ -1,9 +1,9 @@
import React from "react"; import React from "react";
import "../css/Player.css" import "../css/Player.css"
import {PlyrComponent} from 'plyr-react'; import {PlyrComponent} from 'plyr-react';
import SideBar from "../elements/SideBar"; import SideBar from "../elements/SideBar/SideBar";
import Tag from "../elements/Tag"; import Tag from "../elements/Tag/Tag";
import AddTagPopup from "../elements/AddTagPopup"; import AddTagPopup from "../elements/AddTagPopup/AddTagPopup";
class Player extends React.Component { class Player extends React.Component {

View File

@ -1,8 +1,8 @@
import React from "react"; import React from "react";
import Preview from "../elements/Preview"; import Preview from "../elements/Preview";
import "../css/RandomPage.css" import "../css/RandomPage.css"
import SideBar from "../elements/SideBar"; import SideBar from "../elements/SideBar/SideBar";
import Tag from "../elements/Tag"; import Tag from "../elements/Tag/Tag";
class RandomPage extends React.Component { class RandomPage extends React.Component {
constructor(props, context) { constructor(props, context) {