Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull request voor sommige selenium testen #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}\\start"
}
]
}
79 changes: 68 additions & 11 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,77 @@
import * as React from 'react';
import '../style/App.css';
import { Redirect } from 'react-router';
import Auth from "../services/Auth";
import { withRouter } from 'react-router-dom';
import AppBar from 'material-ui/AppBar';
import Slider from './Slider';
import Drawer from 'material-ui/Drawer';
import SideBar from './Sidebar';
import RaisedButton from 'material-ui/RaisedButton';

// hotfix for navbar
const styles = {
appBar: {
flexWrap: "wrap",
},
floatRight: {
float: "right",
},
};

class App extends React.Component<any, any> {

allowedExtensions = ".n3,.ttl,.rdf";

constructor(props: string) {
super(props);
this.state = {open: false};
this.handleToggle = this.handleToggle.bind(this);
}

handleToggle(): void {
this.setState(prevState => ({
open: !prevState.open
}));
}

render() {
if (! Auth.isLoggedIn()) {
return <Redirect to={"/login"} />;
} else {
return (
<div><h1>Hello World </h1></div>
);
}
return (
<div>
<AppBar
title="UnSHACLed"
style={{flexWrap: "wrap"}}
iconClassNameRight="muidocs-icon-navigation-expand-more"
onLeftIconButtonClick={this.handleToggle}
>
<Drawer
width={220}
docked={false}
open={this.state.open}
onRequestChange={(open) => this.setState({open})}
>
<AppBar onLeftIconButtonClick={this.handleToggle}/>
<SideBar/>
</Drawer>

<div style={styles.floatRight}>
<RaisedButton primary={true} label="import Project" className="importProjectButton"/>
<RaisedButton primary={true} label="save Project" className="saveProjectButton"/>
<RaisedButton primary={true} label="import Graph" className="uploadFileButton"/>
<input type="file" onClick={this.uploadFileButton} id="importGraph" style={{"display" : "none"}} />
accept={this.allowedExtensions} />
<RaisedButton primary={true} label="save Graph"/>
</div>
</AppBar>

<div className="footer">
<Slider/>
</div>
</div>
);
}

uploadFileButton() {
var input = document.getElementById("importGraph");
input.click();
}
}

export default withRouter(App);
export default App;
2 changes: 2 additions & 0 deletions src/components/containerHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class HomeContainer extends React.Component {
style={{color: 'white'}}
>
<Button
id="firstLoginButton"
inverted={true}
color="teal"
size="huge"
Expand All @@ -66,6 +67,7 @@ class HomeContainer extends React.Component {
</Grid.Column>
<Grid.Column style={{maxWidth: 250}}>
<Button
id="firstSignUpButton"
animated="fade"
inverted={true}
size="huge"
Expand Down
4 changes: 4 additions & 0 deletions src/components/navbarHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,23 @@ class Navbar extends React.Component<any, any> {
<Image src={logo} size="mini"/>
</Menu.Item>
<Menu.Item
id="AboutMenuItem"
as={Link}
to="/about"
style={{color: 'white'}}
>
About
</Menu.Item>
<Menu.Item
id="ContactMenuItem"
as={Link}
to="/contact"
style={{color: 'white'}}
>
Contact
</Menu.Item>
<Menu.Item
id="GithubMenuItem"
as="a"
href="https://github.com/dubious-developments/UnSHACLed"
target="_blank"
Expand All @@ -47,6 +50,7 @@ class Navbar extends React.Component<any, any> {
}
/>
<Menu.Item
id="ReleaseNotesMenuItem"
as="a"
href="https://github.com/dubious-developments/UnSHACLed/wiki/Release-notes"
target="_blank"
Expand Down
4 changes: 4 additions & 0 deletions src/form/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class LoginForm extends React.Component<any, any> {

>
<Input
id="userNameInput"
size="large"
required={true}
fluid={true}
Expand All @@ -59,6 +60,7 @@ class LoginForm extends React.Component<any, any> {
inline={true}
>
<Input
id="passWordInput"
size="large"
required={true}
fluid={true}
Expand All @@ -70,6 +72,7 @@ class LoginForm extends React.Component<any, any> {
</Form.Field>

<Button
id="secondLoginButton"
color="teal"
fluid={true}
inverted={true}
Expand All @@ -84,6 +87,7 @@ class LoginForm extends React.Component<any, any> {
>Or
</Divider>
<Button
id="secondSignUpButton"
animated="fade"
fluid={true}
inverted={true}
Expand Down
Empty file added testfiles/test.ttl
Empty file.