mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
Use the 'ascribe-app' class for all apps
Simplifies testing so we can just look for a single class throughout all the apps when ensuring React has loaded our app
This commit is contained in:
parent
01b258334a
commit
40894cfea6
@ -23,7 +23,7 @@ let AscribeApp = React.createClass({
|
|||||||
const { activeRoute, children, currentUser, routes, whitelabel } = this.props;
|
const { activeRoute, children, currentUser, routes, whitelabel } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="ascribe-default-app">
|
<div className="ascribe-app ascribe-default-app">
|
||||||
<Header
|
<Header
|
||||||
currentUser={currentUser}
|
currentUser={currentUser}
|
||||||
routes={routes}
|
routes={routes}
|
||||||
|
@ -56,7 +56,7 @@ let PRApp = React.createClass({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={style}
|
style={style}
|
||||||
className={classNames('ascribe-prize-app', `route--${(path ? path.split('/')[0] : 'landing')}`)}>
|
className={classNames('ascribe-app', 'ascribe-prize-app', `route--${(path ? path.split('/')[0] : 'landing')}`)}>
|
||||||
{header}
|
{header}
|
||||||
<AppRouteWrapper
|
<AppRouteWrapper
|
||||||
currentUser={currentUser}
|
currentUser={currentUser}
|
||||||
|
@ -44,7 +44,7 @@ let PrizeApp = React.createClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classNames('ascribe-prize-app', `route--${(path ? path.split('/')[0] : 'landing')}`)}>
|
<div className={classNames('ascribe-app', 'ascribe-prize-app', `route--${(path ? path.split('/')[0] : 'landing')}`)}>
|
||||||
{header}
|
{header}
|
||||||
<AppRouteWrapper
|
<AppRouteWrapper
|
||||||
currentUser={currentUser}
|
currentUser={currentUser}
|
||||||
|
@ -46,7 +46,7 @@ let WalletApp = React.createClass({
|
|||||||
// In react-router 1.0, Routes have no 'name' property anymore. To keep functionality however,
|
// In react-router 1.0, Routes have no 'name' property anymore. To keep functionality however,
|
||||||
// we split the path by the first occurring slash and take the first splitter.
|
// we split the path by the first occurring slash and take the first splitter.
|
||||||
return (
|
return (
|
||||||
<div className={classNames('ascribe-wallet-app', `route--${(path ? path.split('/')[0] : 'landing')}`)}>
|
<div className={classNames('ascribe-app', 'ascribe-wallet-app', `route--${(path ? path.split('/')[0] : 'landing')}`)}>
|
||||||
{header}
|
{header}
|
||||||
<AppRouteWrapper
|
<AppRouteWrapper
|
||||||
currentUser={currentUser}
|
currentUser={currentUser}
|
||||||
|
@ -15,9 +15,7 @@ gemini.suite('Authenticated', (suite) => {
|
|||||||
.before((actions, find) => {
|
.before((actions, find) => {
|
||||||
// This will be called before every nested suite begins unless that suite
|
// This will be called before every nested suite begins unless that suite
|
||||||
// also defines a `.before()`
|
// also defines a `.before()`
|
||||||
// FIXME: use a more generic class for this, like just '.app',
|
actions.waitForElementToShow('.ascribe-app', TIMEOUTS.NORMAL);
|
||||||
// when we can use this file with the whitelabels
|
|
||||||
actions.waitForElementToShow('.ascribe-default-app', TIMEOUTS.NORMAL);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Suite just to log us in before any other suites run
|
// Suite just to log us in before any other suites run
|
||||||
|
@ -15,8 +15,7 @@ gemini.suite('Basic', (suite) => {
|
|||||||
.before((actions, find) => {
|
.before((actions, find) => {
|
||||||
// This will be called before every nested suite begins unless that suite
|
// This will be called before every nested suite begins unless that suite
|
||||||
// also defines a `.before()`
|
// also defines a `.before()`
|
||||||
// FIXME: use a more generic class for this, like just '.ascribe-app'
|
actions.waitForElementToShow('.ascribe-app', TIMEOUTS.NORMAL);
|
||||||
actions.waitForElementToShow('.ascribe-default-app', TIMEOUTS.NORMAL);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
gemini.suite('Header-desktop', (headerSuite) => {
|
gemini.suite('Header-desktop', (headerSuite) => {
|
||||||
|
@ -19,9 +19,7 @@ gemini.suite('Work detail', (suite) => {
|
|||||||
.before((actions, find) => {
|
.before((actions, find) => {
|
||||||
// This will be called before every nested suite begins unless that suite
|
// This will be called before every nested suite begins unless that suite
|
||||||
// also defines a `.before()`
|
// also defines a `.before()`
|
||||||
// FIXME: use a more generic class for this, like just '.app',
|
actions.waitForElementToShow('.ascribe-app', TIMEOUTS.NORMAL);
|
||||||
// when we can use this file with the whitelabels
|
|
||||||
actions.waitForElementToShow('.ascribe-default-app', TIMEOUTS.NORMAL);
|
|
||||||
|
|
||||||
// Wait for the social media buttons to appear
|
// Wait for the social media buttons to appear
|
||||||
actions.waitForElementToShow('.ascribe-social-button-list .fb-share-button iframe', TIMEOUTS.SUPER_DUPER_EXTRA_LONG);
|
actions.waitForElementToShow('.ascribe-social-button-list .fb-share-button iframe', TIMEOUTS.SUPER_DUPER_EXTRA_LONG);
|
||||||
@ -58,7 +56,7 @@ gemini.suite('Work detail', (suite) => {
|
|||||||
.setUrl('/login')
|
.setUrl('/login')
|
||||||
.ignoreElements('.ascribe-body')
|
.ignoreElements('.ascribe-body')
|
||||||
.before((actions, find) => {
|
.before((actions, find) => {
|
||||||
actions.waitForElementToShow('.ascribe-default-app', TIMEOUTS.NORMAL);
|
actions.waitForElementToShow('.ascribe-app', TIMEOUTS.NORMAL);
|
||||||
})
|
})
|
||||||
.capture('logged in', (actions, find) => {
|
.capture('logged in', (actions, find) => {
|
||||||
actions.sendKeys(find('.ascribe-login-wrapper input[name=email]'), MAIN_USER.email);
|
actions.sendKeys(find('.ascribe-login-wrapper input[name=email]'), MAIN_USER.email);
|
||||||
@ -125,7 +123,7 @@ gemini.suite('Work detail', (suite) => {
|
|||||||
.setUrl('/logout')
|
.setUrl('/logout')
|
||||||
.ignoreElements('.ascribe-body')
|
.ignoreElements('.ascribe-body')
|
||||||
.before((actions, find) => {
|
.before((actions, find) => {
|
||||||
actions.waitForElementToShow('.ascribe-default-app', TIMEOUTS.NORMAL);
|
actions.waitForElementToShow('.ascribe-app', TIMEOUTS.NORMAL);
|
||||||
})
|
})
|
||||||
.capture('logout', (actions, find) => {
|
.capture('logout', (actions, find) => {
|
||||||
actions.waitForElementToShow('.ascribe-login-wrapper', TIMEOUTS.LONG);
|
actions.waitForElementToShow('.ascribe-login-wrapper', TIMEOUTS.LONG);
|
||||||
|
@ -9,11 +9,10 @@ const TIMEOUTS = environment.TIMEOUTS;
|
|||||||
*/
|
*/
|
||||||
gemini.suite('23vivi', (suite) => {
|
gemini.suite('23vivi', (suite) => {
|
||||||
suite
|
suite
|
||||||
//TODO: maybe this should be changed to .ascribe-body once the PR that does this is merged
|
.setCaptureElements('.ascribe-body')
|
||||||
.setCaptureElements('.ascribe-wallet-app')
|
|
||||||
.before((actions, find) => {
|
.before((actions, find) => {
|
||||||
// This will be called before every nested suite begins
|
// This will be called before every nested suite begins
|
||||||
actions.waitForElementToShow('.ascribe-wallet-app', TIMEOUTS.NORMAL);
|
actions.waitForElementToShow('.ascribe-app', TIMEOUTS.NORMAL);
|
||||||
});
|
});
|
||||||
|
|
||||||
gemini.suite('Landing', (landingSuite) => {
|
gemini.suite('Landing', (landingSuite) => {
|
||||||
|
@ -9,11 +9,10 @@ const TIMEOUTS = environment.TIMEOUTS;
|
|||||||
*/
|
*/
|
||||||
gemini.suite('Cyland', (suite) => {
|
gemini.suite('Cyland', (suite) => {
|
||||||
suite
|
suite
|
||||||
//TODO: maybe this should be changed to .ascribe-body once the PR that does this is merged
|
.setCaptureElements('.ascribe-body')
|
||||||
.setCaptureElements('.ascribe-wallet-app')
|
|
||||||
.before((actions, find) => {
|
.before((actions, find) => {
|
||||||
// This will be called before every nested suite begins
|
// This will be called before every nested suite begins
|
||||||
actions.waitForElementToShow('.ascribe-wallet-app', TIMEOUTS.NORMAL);
|
actions.waitForElementToShow('.ascribe-app', TIMEOUTS.NORMAL);
|
||||||
});
|
});
|
||||||
|
|
||||||
gemini.suite('Landing', (landingSuite) => {
|
gemini.suite('Landing', (landingSuite) => {
|
||||||
|
@ -10,11 +10,10 @@ const TIMEOUTS = environment.TIMEOUTS;
|
|||||||
*/
|
*/
|
||||||
gemini.suite('Ikonotv', (suite) => {
|
gemini.suite('Ikonotv', (suite) => {
|
||||||
suite
|
suite
|
||||||
//TODO: maybe this should be changed to .ascribe-body once the PR that does this is merged
|
.setCaptureElements('.ascribe-body')
|
||||||
.setCaptureElements('.ascribe-wallet-app')
|
|
||||||
.before((actions, find) => {
|
.before((actions, find) => {
|
||||||
// This will be called before every nested suite begins
|
// This will be called before every nested suite begins
|
||||||
actions.waitForElementToShow('.ascribe-wallet-app', TIMEOUTS.NORMAL);
|
actions.waitForElementToShow('.ascribe-app', TIMEOUTS.NORMAL);
|
||||||
});
|
});
|
||||||
|
|
||||||
gemini.suite('Landing', (landingSuite) => {
|
gemini.suite('Landing', (landingSuite) => {
|
||||||
@ -40,13 +39,11 @@ gemini.suite('Ikonotv', (suite) => {
|
|||||||
// its logo to appear
|
// its logo to appear
|
||||||
gemini.suite('Ikonotv basic', (suite) => {
|
gemini.suite('Ikonotv basic', (suite) => {
|
||||||
suite
|
suite
|
||||||
.setCaptureElements('.ascribe-wallet-app')
|
.setCaptureElements('.ascribe-app')
|
||||||
.before((actions, find) => {
|
.before((actions, find) => {
|
||||||
// This will be called before every nested suite begins unless that suite
|
// This will be called before every nested suite begins unless that suite
|
||||||
// also defines a `.before()`
|
// also defines a `.before()`
|
||||||
// FIXME: use a more generic class for this, like just '.app',
|
actions.waitForElementToShow('.ascribe-app', TIMEOUTS.NORMAL);
|
||||||
// when we can use this file with the whitelabels
|
|
||||||
actions.waitForElementToShow('.ascribe-wallet-app', TIMEOUTS.NORMAL);
|
|
||||||
|
|
||||||
// Wait for the forms to appear
|
// Wait for the forms to appear
|
||||||
actions.waitForElementToShow('.ascribe-form', TIMEOUTS.NORMAL);
|
actions.waitForElementToShow('.ascribe-form', TIMEOUTS.NORMAL);
|
||||||
|
@ -9,11 +9,10 @@ const TIMEOUTS = environment.TIMEOUTS;
|
|||||||
*/
|
*/
|
||||||
gemini.suite('Lumenus', (suite) => {
|
gemini.suite('Lumenus', (suite) => {
|
||||||
suite
|
suite
|
||||||
//TODO: maybe this should be changed to .ascribe-body once the PR that does this is merged
|
.setCaptureElements('.ascribe-body')
|
||||||
.setCaptureElements('.ascribe-wallet-app')
|
|
||||||
.before((actions, find) => {
|
.before((actions, find) => {
|
||||||
// This will be called before every nested suite begins
|
// This will be called before every nested suite begins
|
||||||
actions.waitForElementToShow('.ascribe-wallet-app', TIMEOUTS.NORMAL);
|
actions.waitForElementToShow('.ascribe-app', TIMEOUTS.NORMAL);
|
||||||
});
|
});
|
||||||
|
|
||||||
gemini.suite('Landing', (landingSuite) => {
|
gemini.suite('Landing', (landingSuite) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user