mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-08 14:14:56 +03:00
fix: fix tests
remove unused part of code in ConsoleViewer.tsx add missed field to the DiscriminatorDropdown.test.tsx.snap
This commit is contained in:
parent
ee5666d5b9
commit
cb2389a586
|
@ -1,5 +1,5 @@
|
||||||
import {lighten} from 'polished';
|
import {lighten} from 'polished';
|
||||||
import {styled} from '../../index';
|
import styled from '../../styled-components';
|
||||||
|
|
||||||
export const ConsoleEditorWrapper = styled.div`
|
export const ConsoleEditorWrapper = styled.div`
|
||||||
font-family: ${props => props.theme.typography.code.fontFamily};
|
font-family: ${props => props.theme.typography.code.fontFamily};
|
||||||
|
|
|
@ -153,7 +153,6 @@ export class ConsoleViewer extends React.Component<ConsoleViewerProps, ConsoleVi
|
||||||
const { operation } = this.props;
|
const { operation } = this.props;
|
||||||
const requestBodyContent = operation.requestBody && operation.requestBody.content && operation.requestBody.content;
|
const requestBodyContent = operation.requestBody && operation.requestBody.content && operation.requestBody.content;
|
||||||
const hasBodySample = requestBodyContent && requestBodyContent.hasSample;
|
const hasBodySample = requestBodyContent && requestBodyContent.hasSample;
|
||||||
const samples = operation.codeSamples;
|
|
||||||
const mediaTypes = (requestBodyContent && requestBodyContent.mediaTypes) ? requestBodyContent.mediaTypes : [];
|
const mediaTypes = (requestBodyContent && requestBodyContent.mediaTypes) ? requestBodyContent.mediaTypes : [];
|
||||||
const { result } = this.state;
|
const { result } = this.state;
|
||||||
return (
|
return (
|
||||||
|
@ -165,9 +164,6 @@ export class ConsoleViewer extends React.Component<ConsoleViewerProps, ConsoleVi
|
||||||
ref={(editor: any) => (this.consoleEditor = editor)}
|
ref={(editor: any) => (this.consoleEditor = editor)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{false && samples.map(sample => (
|
|
||||||
<SourceCodeWithCopy lang={sample.lang} source={sample.source} />
|
|
||||||
))}
|
|
||||||
<FlexLayoutReverse>
|
<FlexLayoutReverse>
|
||||||
<SubmitButton onClick={this.onClickSend} >Send Request</SubmitButton>
|
<SubmitButton onClick={this.onClickSend} >Send Request</SubmitButton>
|
||||||
</FlexLayoutReverse>
|
</FlexLayoutReverse>
|
||||||
|
|
|
@ -6,6 +6,7 @@ exports[`Components SchemaView discriminator should correctly render discriminat
|
||||||
<Field
|
<Field
|
||||||
field={
|
field={
|
||||||
FieldModel {
|
FieldModel {
|
||||||
|
"$value": "",
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"description": "",
|
"description": "",
|
||||||
"example": undefined,
|
"example": undefined,
|
||||||
|
@ -56,6 +57,7 @@ exports[`Components SchemaView discriminator should correctly render discriminat
|
||||||
<Field
|
<Field
|
||||||
field={
|
field={
|
||||||
FieldModel {
|
FieldModel {
|
||||||
|
"$value": "",
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"description": "",
|
"description": "",
|
||||||
"example": undefined,
|
"example": undefined,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user