• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dataunitylab / relational-playground / #109

10 Sep 2025 06:35PM UTC coverage: 78.51% (+0.1%) from 78.407%
#109

push

michaelmior
Fix SqlEditor test for React context refactoring

Signed-off-by: Michael Mior <mmior@mail.rit.edu>

526 of 743 branches covered (70.79%)

Branch coverage included in aggregate %.

1034 of 1244 relevant lines covered (83.12%)

14373.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

64.71
/src/Home.js
1
// @flow
2
import * as React from 'react';
3
import {lazy, useEffect, Suspense} from 'react';
4
import CurrentRelExpr from './CurrentRelExpr';
5
import DataContainer from './DataContainer';
6
import EditorContainer from './EditorContainer';
7
import SourceMultiTable from './SourceMultiTable';
8
import SplitPane from 'react-split-pane';
9
import {BrowserView, MobileOnlyView} from 'react-device-detect';
10
import ReactGA from 'react-ga';
11
import {ReactGAProvider} from './contexts/ReactGAContext';
12

13
import './Home.css';
14

15
import type {StatelessFunctionalComponent} from 'react';
16

17
const Tutorial = lazy(() => import('./Tutorial'));
1✔
18

19
type Props = {};
20

21
/** Container for all components on the main page */
22
const Home: StatelessFunctionalComponent<Props> = (props) => {
1✔
23
  useEffect(() => {
1✔
24
    // If GA is no longer used, remove preconnect from index.html
25
    switch (process.env.NODE_ENV) {
1!
26
      case 'production':
27
        ReactGA.initialize('UA-143847373-2');
×
28
        break;
×
29
      case 'development':
30
        ReactGA.initialize('UA-143847373-1');
×
31
        break;
×
32
      default:
33
        ReactGA.initialize('UA-143847373-1', {testMode: true});
1✔
34
        break;
1✔
35
    }
36
    ReactGA.pageview('/');
1✔
37
  }, []);
38

39
  let editorContainer = (
40
    <div style={{padding: '0em 1em 1em 1em'}}>
1✔
41
      <h2>Relational Playground</h2>
42
      <div>
43
        {/* SQL query input */}
44
        <EditorContainer />
45
        <CurrentRelExpr />
46
      </div>
47
    </div>
48
  );
49

50
  let dataContainer = (
51
    <div className="bottomLeftContainer">
1✔
52
      <DataContainer />
53
      <div className="footer">
54
        <Suspense fallback={<React.Fragment />}>
55
          <Tutorial />
56
        </Suspense>
57
        <p className="email">
58
          For questions, please email{' '}
59
          <a href="mailto:mmior@mail.rit.edu">mmior@mail.rit.edu</a>
60
        </p>
61
      </div>
62
    </div>
63
  );
64

65
  return (
1✔
66
    <ReactGAProvider reactGA={ReactGA}>
67
      <div>
68
        <BrowserView>
69
          <SplitPane split="vertical" primary="second" minSize={'30%'}>
70
            <div>
71
              <SplitPane split="horizontal" primary="second" minSize={'55%'}>
72
                {editorContainer}
73
                {dataContainer}
74
              </SplitPane>
75
            </div>
76
            {/* Input dataset preview */}
77
            <div style={{margin: '2em'}}>
78
              <SourceMultiTable />
79
            </div>
80
          </SplitPane>
81
        </BrowserView>
82

83
        <MobileOnlyView>
84
          <div style={{padding: '0em 1em 1em 1em'}}>
85
            {editorContainer}
86
            <SourceMultiTable />
87
          </div>
88
          {dataContainer}
89
        </MobileOnlyView>
90
      </div>
91
    </ReactGAProvider>
92
  );
93
};
94

95
export default Home;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc