- Notifications
You must be signed in to change notification settings - Fork928
feat: Redesign workspaces page#1450
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
1a667d9
dc47ae0
c34ad45
104b1d9
52a4e76
83397e0
d19c124
db820ce
851111b
190b7d1
cbc1015
169d733
53781e9
f606a51
09ce0ec
71bf439
82641ab
82cdace
6044d91
bd50c9f
191c9d7
fccacfe
f87c8e7
a058b8c
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
import CssBaseline from "@material-ui/core/CssBaseline" | ||
import ThemeProvider from "@material-ui/styles/ThemeProvider" | ||
Contributor
| ||
import { createMemoryHistory } from "history" | ||
import { addDecorator } from "node_modules/@storybook/react" | ||
import { unstable_HistoryRouter as HistoryRouter } from "react-router-dom" | ||
import { dark } from "../src/theme" | ||
import "../src/theme/globalFonts" | ||
addDecorator((story) => ( | ||
<ThemeProvider theme={dark}> | ||
<CssBaseline /> | ||
{story()} | ||
</ThemeProvider> | ||
)) | ||
const history = createMemoryHistory() | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { Page } from "@playwright/test" | ||
import { BasePom } from "./BasePom" | ||
export classWorkspacesPage extends BasePom { | ||
constructor(baseURL: string | undefined, page: Page) { | ||
super(baseURL, "/workspaces", page) | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export * from "./SignInPage" | ||
export * from "./WorkspacesPage" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { test } from "@playwright/test" | ||
import { email, password } from "../constants" | ||
import { SignInPage,WorkspacesPage } from "../pom" | ||
import { waitForClientSideNavigation } from "./../util" | ||
test("Login takes user to /workspaces", async ({ baseURL, page }) => { | ||
await page.goto(baseURL + "/", { waitUntil: "networkidle" }) | ||
// Log-in with the default credentials we set up in the development server | ||
const signInPage = new SignInPage(baseURL, page) | ||
await signInPage.submitBuiltInAuthentication(email, password) | ||
constworkspacesPage = newWorkspacesPage(baseURL, page) | ||
await waitForClientSideNavigation(page, { to:workspacesPage.url }) | ||
await page.waitForSelector("text=Workspaces") | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -115,6 +115,11 @@ export const getWorkspace = async (workspaceId: string): Promise<TypesGen.Worksp | ||
return response.data | ||
} | ||
export const getWorkspaces = async (userID = "me"): Promise<TypesGen.Workspace[]> => { | ||
kylecarbs marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
const response = await axios.get<TypesGen.Workspace[]>(`/api/v2/users/${userID}/workspaces`) | ||
return response.data | ||
} | ||
export const getWorkspaceByOwnerAndName = async ( | ||
organizationID: string, | ||
username = "me", | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -5,7 +5,7 @@ import { BrowserRouter as Router } from "react-router-dom" | ||
import { SWRConfig } from "swr" | ||
import { AppRouter } from "./AppRouter" | ||
import { GlobalSnackbar } from "./components/GlobalSnackbar/GlobalSnackbar" | ||
import {dark } from "./theme" | ||
import "./theme/globalFonts" | ||
import { XServiceProvider } from "./xServices/StateContext" | ||
@@ -31,7 +31,7 @@ export const App: React.FC = () => { | ||
}} | ||
> | ||
<XServiceProvider> | ||
<ThemeProvider theme={dark}> | ||
kylecarbs marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
<CssBaseline /> | ||
<AppRouter /> | ||
<GlobalSnackbar /> | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -8,14 +8,11 @@ const useStyles = makeStyles(() => ({ | ||
maxWidth, | ||
padding: `0 ${sidePadding}`, | ||
flex: 1, | ||
width: "100%", | ||
}, | ||
})) | ||
export const Margins: React.FC = ({ children }) => { | ||
const styles = useStyles() | ||
return <div className={styles.margins}>{children}</div> | ||
kylecarbs marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
} |
Uh oh!
There was an error while loading.Please reload this page.