Merge branch 'master' into csstheming
# Conflicts: # src/elements/PageTitle/PageTitle.module.css # src/elements/Preview/Preview.module.css # src/elements/SideBar/SideBar.module.css # src/index.css # src/pages/Player/Player.js # src/pages/Player/Player.module.css # src/pages/SettingsPage/SettingsPage.module.css
This commit is contained in:
@ -3,14 +3,6 @@ import React from "react";
|
||||
import GeneralSettings from "./GeneralSettings";
|
||||
import GlobalInfos from "../../GlobalInfos";
|
||||
|
||||
function prepareFetchApi(response) {
|
||||
const mockJsonPromise = Promise.resolve(response);
|
||||
const mockFetchPromise = Promise.resolve({
|
||||
json: () => mockJsonPromise,
|
||||
});
|
||||
return (jest.fn().mockImplementation(() => mockFetchPromise));
|
||||
}
|
||||
|
||||
describe('<GeneralSettings/>', function () {
|
||||
it('renders without crashing ', function () {
|
||||
const wrapper = shallow(<GeneralSettings/>);
|
||||
@ -38,7 +30,7 @@ describe('<GeneralSettings/>', function () {
|
||||
it('test savesettings', done => {
|
||||
const wrapper = shallow(<GeneralSettings/>);
|
||||
|
||||
global.fetch = prepareFetchApi({success: true});
|
||||
global.fetch = global.prepareFetchApi({success: true});
|
||||
|
||||
expect(global.fetch).toBeCalledTimes(0);
|
||||
const fakeEvent = {preventDefault: () => console.log('preventDefault')};
|
||||
@ -56,7 +48,7 @@ describe('<GeneralSettings/>', function () {
|
||||
it('test failing savesettings', done => {
|
||||
const wrapper = shallow(<GeneralSettings/>);
|
||||
|
||||
global.fetch = prepareFetchApi({success: false});
|
||||
global.fetch = global.prepareFetchApi({success: false});
|
||||
|
||||
expect(global.fetch).toBeCalledTimes(0);
|
||||
const fakeEvent = {preventDefault: () => console.log('preventDefault')};
|
||||
|
@ -1,13 +1,13 @@
|
||||
.indextextarea {
|
||||
margin-top: 15px;
|
||||
padding: 10px;
|
||||
|
||||
overflow-y: scroll;
|
||||
overflow-x: auto;
|
||||
|
||||
min-height: 100px;
|
||||
max-height: 300px;
|
||||
width: 50%;
|
||||
background-color: #c2c2c2;
|
||||
border-radius: 5px;
|
||||
|
||||
margin-top: 15px;
|
||||
max-height: 300px;
|
||||
|
||||
min-height: 100px;
|
||||
overflow-x: auto;
|
||||
overflow-y: scroll;
|
||||
padding: 10px;
|
||||
width: 50%;
|
||||
}
|
||||
|
@ -2,14 +2,6 @@ import {shallow} from "enzyme";
|
||||
import React from "react";
|
||||
import MovieSettings from "./MovieSettings";
|
||||
|
||||
function prepareFetchApi(response) {
|
||||
const mockJsonPromise = Promise.resolve(response);
|
||||
const mockFetchPromise = Promise.resolve({
|
||||
json: () => mockJsonPromise,
|
||||
});
|
||||
return (jest.fn().mockImplementation(() => mockFetchPromise));
|
||||
}
|
||||
|
||||
describe('<MovieSettings/>', function () {
|
||||
it('renders without crashing ', function () {
|
||||
const wrapper = shallow(<MovieSettings/>);
|
||||
@ -30,7 +22,7 @@ describe('<MovieSettings/>', function () {
|
||||
});
|
||||
|
||||
it('test simulate reindex', function () {
|
||||
global.fetch = prepareFetchApi({});
|
||||
global.fetch = global.prepareFetchApi({});
|
||||
const wrapper = shallow(<MovieSettings/>);
|
||||
|
||||
wrapper.find(".reindexbtn").simulate("click");
|
||||
@ -40,7 +32,7 @@ describe('<MovieSettings/>', function () {
|
||||
});
|
||||
|
||||
it('content available received and in state', done => {
|
||||
global.fetch = prepareFetchApi({
|
||||
global.fetch = global.prepareFetchApi({
|
||||
contentAvailable: true,
|
||||
message: "firstline\nsecondline"
|
||||
});
|
||||
|
@ -1,42 +1,41 @@
|
||||
.SettingsSidebar {
|
||||
padding-top: 20px;
|
||||
border-bottom-right-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
float: left;
|
||||
width: 10%;
|
||||
min-height: calc(100vh - 62px);
|
||||
min-width: 110px;
|
||||
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
padding-top: 20px;
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.SettingsSidebarTitle {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
font-size: larger;
|
||||
font-weight: bold;
|
||||
margin-bottom: 25px;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.SettingsContent {
|
||||
float: left;
|
||||
width: 80%;
|
||||
padding-left: 30px;
|
||||
padding-top: 30px;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.SettingSidebarElement {
|
||||
background-color: #919fd9;
|
||||
border-radius: 7px;
|
||||
font-weight: bold;
|
||||
margin: 10px 5px 5px;
|
||||
padding: 5px;
|
||||
background-color: #919fd9;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.SettingSidebarElement:hover {
|
||||
font-weight: bolder;
|
||||
background-color: #7d8dd4;
|
||||
box-shadow: #7d8dd4 0 0 0 5px;
|
||||
transition: all 300ms;
|
||||
cursor: pointer;
|
||||
font-weight: bolder;
|
||||
transition: all 300ms;
|
||||
}
|
||||
|
@ -2,14 +2,6 @@ import {shallow} from "enzyme";
|
||||
import React from "react";
|
||||
import SettingsPage from "./SettingsPage";
|
||||
|
||||
function prepareFetchApi(response) {
|
||||
const mockJsonPromise = Promise.resolve(response);
|
||||
const mockFetchPromise = Promise.resolve({
|
||||
json: () => mockJsonPromise,
|
||||
});
|
||||
return (jest.fn().mockImplementation(() => mockFetchPromise));
|
||||
}
|
||||
|
||||
describe('<RandomPage/>', function () {
|
||||
it('renders without crashing ', function () {
|
||||
const wrapper = shallow(<SettingsPage/>);
|
||||
|
Reference in New Issue
Block a user