-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(component-testing): Component testing runner splash screen (#15091)
* Fix scrollbars * Fix resizer styles * Make no-spec selected filler for splash screen * Create no specs filler for reporter * Fix keyboard navigation when specs are filtered * Add test for filtered search list keyboard navigation * Remove fs-extra * Remove useless code * Update with related tests to the right values WITHOUT SCROLLBARS
- Loading branch information
1 parent
10fdd7b
commit 1d878d2
Showing
10 changed files
with
183 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
.no-spec { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100%; | ||
flex-direction: column; | ||
color: #555; | ||
font-family: "Muli", "Helvetica Neue", "Arial", sans-serif; | ||
font-size: 13px; | ||
|
||
.no-spec-content-container { | ||
display: flex; | ||
flex-basis: 45%; | ||
flex-direction: column; | ||
align-items: center; | ||
|
||
a { | ||
color: #3386D4; | ||
cursor: pointer; | ||
|
||
&:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
|
||
.no-spec-title { | ||
margin-top: 16px; | ||
margin-bottom: 8px; | ||
} | ||
|
||
.no-spec-custom-children { | ||
margin-top: 32px; | ||
} | ||
} | ||
|
||
.keyboard-helper { | ||
width: 224px; | ||
.keyboard-shortcut { | ||
display: flex; | ||
margin-top: 8px; | ||
height: 23px; | ||
justify-content: space-between; | ||
|
||
.shortcut { | ||
display: flex; | ||
|
||
.key { | ||
display: flex; | ||
font-family: sans-serif; // display keys symbols correctly | ||
justify-content: center; | ||
align-items: center; | ||
border: 1px solid rgba(255, 255, 255, 0.4); | ||
height: 23px; | ||
min-width: 23px; | ||
margin-right: 4px; | ||
padding: 0px 4px; | ||
font-size: 0.8125rem; | ||
border-radius: 4px; | ||
pointer-events: none; | ||
background-color: #ddd; | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import * as React from 'react' | ||
import './NoSpecSelected.scss' | ||
|
||
const KeyboardShortcut: React.FC<{ shortcut: string[], description: string }> = ({ | ||
shortcut, | ||
description, | ||
}) => { | ||
const metaSymbol = window.navigator.platform.includes('Mac') ? '⌘' : 'Ctrl' | ||
|
||
return ( | ||
<li className="keyboard-shortcut"> | ||
<p> {description} </p> | ||
<div className="shortcut"> | ||
{shortcut.map((key) => ( | ||
<div className="key"> {key === 'Meta' ? metaSymbol : key} </div> | ||
))} | ||
</div> | ||
</li> | ||
) | ||
} | ||
|
||
export const KeyboardHelper = () => { | ||
return ( | ||
<ul className="keyboard-helper"> | ||
<KeyboardShortcut shortcut={['/']} description="Search spec" /> | ||
<KeyboardShortcut shortcut={['Meta', 'B']} description="Toggle specs list" /> | ||
</ul> | ||
) | ||
} | ||
|
||
interface NoSpecSelectedProps { | ||
onSelectSpecRequest: () => void; | ||
} | ||
|
||
export const NoSpecSelected: React.FC<NoSpecSelectedProps> = ({ onSelectSpecRequest, children }) => { | ||
return ( | ||
<div className="no-spec"> | ||
<div className="no-spec-content-container"> | ||
<svg width="40" height="50" viewBox="0 0 40 50" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path d="M33.3333 49H6.66659C5.2521 49 3.89554 48.4381 2.89535 47.4379C1.89515 46.4377 1.33325 45.0812 1.33325 43.6667V6.33333C1.33325 4.91885 1.89515 3.56229 2.89535 2.5621C3.89554 1.5619 5.2521 1 6.66659 1H21.5626C22.2698 1.00015 22.9479 1.2812 23.4479 1.78133L37.8853 16.2187C38.3854 16.7186 38.6664 17.3968 38.6666 18.104V43.6667C38.6666 45.0812 38.1047 46.4377 37.1045 47.4379C36.1043 48.4381 34.7477 49 33.3333 49Z" stroke="#B4B5BC" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" /> | ||
</svg> | ||
<h2 className="no-spec-title"> No spec selected. </h2> | ||
<a onClick={onSelectSpecRequest}> Select Spec </a> | ||
|
||
{children && ( | ||
<div className="no-spec-custom-children"> | ||
{children} | ||
</div> | ||
)} | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1d878d2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
linux x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
1d878d2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppVeyor has built the
win32 ia32
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
1d878d2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppVeyor has built the
win32 x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
1d878d2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
darwin x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally: