Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@ const Container = styled.div`
font-size: 0.875rem;
line-height: 1.6;

color: rgba(255, 255, 255, 0.8);

background-color: rgba(0, 0, 0, 0.5);

color: ${props =>
props.theme.light ? 'rgba(0, 0, 0, 0.8)' : 'rgba(255, 255, 255, 0.8)'};
background-color: ${props => props.theme['sideBar.background']};
white-space: pre-wrap;

border-bottom: 1px solid rgba(0, 0, 0, 0.5);

&:last-child {
border-bottom: none;
}
Expand All @@ -34,24 +31,20 @@ function escapeHtml(unsafe) {
.replace(/'/g, ''');
}

const white = 'rgba(255, 255, 255, 0.8)';

const formatDiffMessage = (error: TestError, path: string) => {
let finalMessage: string = '';
if (error.matcherResult) {
finalMessage = `<span style="color:rgba(255, 255, 255, 0.5);">${escapeHtml(
error.message
)
finalMessage = `<span>${escapeHtml(error.message)
.replace(/(expected)/m, `<span style="color:${theme.green()}">$1</span>`)
.replace(/(received)/m, `<span style="color:${theme.red()}">$1</span>`)
.replace(/(Difference:)/m, `<span style="color:${white}">$1</span>`)
.replace(/(Difference:)/m, `<span>$1</span>`)
.replace(
/(Expected.*\n)(.*)/m,
`<span style="color:${white}">$1</span><span style="color:${theme.green()}">$2</span>`
`<span>$1</span><span style="color:${theme.green()}">$2</span>`
)
.replace(
/(Received.*\n)(.*)/m,
`<span style="color:${white}">$1</span><span style="color:${theme.red()}">$2</span>`
`<span>$1</span><span style="color:${theme.red()}">$2</span>`
)
.replace(/^(-.*)/gm, `<span style="color:${theme.red()}">$1</span>`)
.replace(
Expand Down Expand Up @@ -94,11 +87,7 @@ const formatDiffMessage = (error: TestError, path: string) => {
}

finalMessage +=
`<div ${
code.highlight
? `style="font-weight:900;color:rgba(255, 255, 255, 0.5)"`
: ``
}>` +
`<div ${code.highlight ? `style="font-weight:900;"` : ``}>` +
(code.highlight
? `<span style="color:${theme.red()};">></span> `
: '') +
Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,39 @@
import styled from 'styled-components';

export const Block = styled.div<{ last: boolean }>`
transition: 0.3s ease color;
display: flex;
padding: 0.5rem 0.4rem;
padding-left: 0.5rem;
position: relative;
margin-right: ${props => (props.last ? 0 : 12)}px;
color: rgba(255, 255, 255, 0.5);
color: ${props =>
props.theme.light ? 'rgba(0, 0, 0, 0.5)' : 'rgba(255, 255, 255, 0.5)'};

white-space: nowrap;

&::after {
content: '';
position: absolute;
margin: auto;
top: 5px;
top: 13px;
right: -10px;
width: 24px;
height: 24px;
width: 8px;
height: 8px;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
-ms-transform: rotate(45deg);
border-right: 1px solid rgba(0, 0, 0, ${props => (props.last ? 0.3 : 0.4)});
border-top: 1px solid rgba(0, 0, 0, ${props => (props.last ? 0.3 : 0.4)});
background-color: #181b1d;
border-right: 1px solid ${props =>
props.theme.light ? `rgba(0, 0, 0, ${(props.last ? 0.3 : 0.4)})` : `rgba(255, 255, 255, ${(props.last ? 0.3 : 0.4)})`};
border-top: 1px solid ${props =>
props.theme.light ? `rgba(0, 0, 0, ${(props.last ? 0.3 : 0.4)})` : `rgba(255, 255, 255, ${(props.last ? 0.3 : 0.4)})`};
background-color: rgba(0, 0, 0, 0.01);
z-index: 1;
}
`;

export const TestName = styled.div`
transition: 0.3s ease background-color;
padding: 0.4rem;
padding-left: 20px;
background-color: ${props => props.theme.background2};
color: rgba(255, 255, 255, 0.8);
color: ${props =>
props.theme.light ? 'rgba(0, 0, 0, 0.8)' : 'rgba(255, 255, 255, 0.8)'};
flex: auto;
white-space: nowrap;
`;
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
import styled from 'styled-components';
import Color from 'color'

export const BlockHeader = styled.div`
display: flex;
align-items: center;
width: 100%;
box-sizing: border-box;
padding: 0 0.5rem;
padding-right: 2px;
background-color: #191c1d;
padding: 0rem 1rem;

overflow: hidden;
background-color: ${props => Color(props.theme['sideBar.background'])
.darken(props.theme.light ? 0.1 : 0.3)
.rgbString()};
`;


export const Container = styled.div`
margin-bottom: 1rem;
margin-bottom: 0.75rem;
overflow: hidden;

border-radius: 2px;
Expand All @@ -22,19 +26,22 @@ export const Actions = styled.div`
display: flex;
align-items: center;
padding: 7px;
background-color: ${props => props.theme.background2};
padding-right: 0;

font-size: 0.875rem;
color: rgba(255, 255, 255, 0.5);
color: ${props =>
props.theme.light ? 'rgba(0, 0, 0, 0.5)' : 'rgba(255, 255, 255, 0.5)'};


svg {
transition: 0.3s ease color;
transition: 0.3s ease opacity;
margin-right: 1rem;
font-size: 1.125rem;
cursor: pointer;

color: ${props => props.theme['button.hoverBackground']};
opacity: 0.8;
&:hover {
color: white;
opacity: 1;
}
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export const Action = styled.div`
opacity: 0.7;
cursor: pointer;

svg {
color: ${props => props.theme['button.hoverBackground']};
}

&:hover {
opacity: 1;
}
Expand All @@ -28,14 +32,15 @@ export const Action = styled.div`
`;

export const ErrorNotice = styled.div`
color: rgba(255, 255, 255, 0.5);
opacity: 0.5;
color:${props => props.theme['sideBar.foreground']};
font-weight: 500;
`;

export const TestName = styled.span`
font-weight: 400;
font-size: 1rem;
color: white;
color:${props => props.theme['sideBar.foreground']};
margin: 0;
margin-top: 0;
margin-bottom: 0;
Expand All @@ -44,5 +49,6 @@ export const TestName = styled.span`
export const Blocks = styled.span`
font-size: 1rem;
font-weight: 300;
color: rgba(255, 255, 255, 0.7);
opacity: 0.7;
color:${props => props.theme['sideBar.foreground']}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,27 @@ export const Actions = styled.div`
opacity: 0;
font-size: 1.125rem;

color: white;
color: ${props =>
props.theme.light ? 'rgb(0, 0, 0)' : 'rgb(255, 255, 255)'};

svg {
margin-left: 0.5rem;
transition: 0.3s ease color;

color: rgba(255, 255, 255, 0.6);
transition: 0.3s ease opacity;
opacity: 0.6;
color: ${props => props.theme['button.hoverBackground']};

&:hover {
color: rgba(255, 255, 255, 1);
opacity: 1;
}
}
`;

export const TestName = styled.div`
transition: 0.3s ease background-color;
padding: 0.25rem;
padding-left: 20px;
background-color: ${props => props.theme.background2};
color: rgba(255, 255, 255, 0.8);
background-color: ${props => props.theme['sideBar.background']};
color: ${props =>
props.theme.light ? 'rgba(0, 0, 0, 0.8)' : 'rgba(255, 255, 255, 0.8)'};
flex: auto;
white-space: nowrap;
`;
Expand All @@ -36,43 +37,37 @@ export const Test = styled.div<{ status: Status }>`
padding-left: 1rem;
cursor: pointer;

background-color: #181b1d;

${props =>
props.status === 'idle' &&
css`
color: rgba(255, 255, 255, 0.4);
color: ${props =>
props.theme.light ? 'rgba(0, 0, 0, 0.4)' : 'rgba(255, 255, 255, 0.4)'};
`};
`;

export const Block = styled.div<{ last: boolean }>`
transition: 0.3s ease color;
display: flex;
padding: 0.25rem 0.4rem;
padding-left: 0.5rem;
position: relative;
margin-right: ${props => (props.last ? 0 : 12)}px;
color: rgba(255, 255, 255, 0.5);
color: ${props =>
props.theme.light ? 'rgba(0, 0, 0, 0.5)' : 'rgba(255, 255, 255, 0.5)'};

white-space: nowrap;

&::after {
content: '';
position: absolute;
margin: auto;
top: 3px;
top: 8px;
right: -10px;
width: 17px;
height: 17px;
width: 10px;
height: 10px;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
-ms-transform: rotate(45deg);
border-right: 2px solid rgba(0, 0, 0, 0.2);
border-top: 2px solid rgba(0, 0, 0, 0.2);
background-color: #181b1d;
z-index: 1;
border-right: 1px solid ${props =>
props.theme.light ? `rgba(0, 0, 0, ${(props.last ? 0.3 : 0.4)})` : `rgba(255, 255, 255, ${(props.last ? 0.3 : 0.4)})`};
border-top: 1px solid ${props =>
props.theme.light ? `rgba(0, 0, 0, ${(props.last ? 0.3 : 0.4)})` : `rgba(255, 255, 255, ${(props.last ? 0.3 : 0.4)})`};
}
`;

Expand All @@ -86,18 +81,21 @@ export const FileData = styled.div`
`;

export const Path = styled.span`
color: rgba(255, 255, 255, 0.6);
color: ${props =>
props.theme.light ? 'rgba(0, 0, 0, 0.6)' : 'rgba(255, 255, 255, 0.6)'};
`;

export const FileName = styled.span`
color: rgba(255, 255, 255, 0.8);
color: ${props =>
props.theme.light ? 'rgba(0, 0, 0, 0.8)' : 'rgba(255, 255, 255, 0.8)'};

flex: 1;
`;

export const Tests = styled.div`
font-weight: 400;
color: rgba(255, 255, 255, 0.7);
color: ${props =>
props.theme.light ? 'rgba(0, 0, 0, 0.7)' : 'rgba(255, 255, 255, 0.7)'};
overflow-x: auto;

&::-webkit-scrollbar {
Expand All @@ -113,7 +111,10 @@ export const Container = styled.div<{ selected: boolean }>`
border-left: 2px solid transparent;

&:hover {
background-color: rgba(0, 0, 0, 0.2);
background-color: ${props =>
!props.theme.light ? 'rgba(0, 0, 0, 0.2)' : 'rgba(255, 255, 255, 0.2)'};
color: ${props =>
props.theme.light ? 'rgba(0, 0, 0, 1)' : 'rgba(255, 255, 255, 1)'};
border-left-color: ${props => props.theme.secondary.clearer(0.5)};

${Actions} {
Expand All @@ -122,11 +123,11 @@ export const Container = styled.div<{ selected: boolean }>`

${Test} {
${TestName} {
background-color: rgba(0, 0, 0, 0.05);
}

${Block} {
color: rgba(255, 255, 255, 0.8);
color: ${props =>
props.theme.light ? 'rgba(0, 0, 0, 1)' : 'rgba(255, 255, 255, 1)'};
}
}
}
Expand All @@ -135,21 +136,33 @@ export const Container = styled.div<{ selected: boolean }>`
props.selected &&
css`
border-left-color: ${props.theme.secondary};
background-color: rgba(0, 0, 0, 0.3);
background-color: ${props =>
!props.theme.light ? 'rgba(0, 0, 0, 0.2)' : 'rgba(255, 255, 255, 0.2)'};
color: ${props =>
props.theme.light ? 'rgba(0, 0, 0, 1)' : 'rgba(255, 255, 255, 1)'};

${Test} {
${TestName} {
background-color: rgba(0, 0, 0, 0.05);
background-color: ${props =>
!props.theme.light
? 'rgba(0, 0, 0, 0.2)'
: 'rgba(255, 255, 255, 0.2)'};
color: ${props =>
props.theme.light ? 'rgba(0, 0, 0, 1)' : 'rgba(255, 255, 255, 1)'};
}

${Block} {
color: rgba(255, 255, 255, 0.8);
background-color: ${props =>
!props.theme.light
? 'rgba(0, 0, 0, 0.2)'
: 'rgba(255, 255, 255, 0.2)'};
color: ${props =>
props.theme.light ? 'rgba(0, 0, 0, 1)' : 'rgba(255, 255, 255, 1)'};
}
}

&:hover {
border-left-color: ${props.theme.secondary};
background-color: rgba(0, 0, 0, 0.3);
}
`};
`;
Loading