-
Notifications
You must be signed in to change notification settings - Fork 682
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/fix/quill-global' into beta
# Conflicts: # package.json
- Loading branch information
Showing
32 changed files
with
700 additions
and
545 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,38 @@ | ||
### Cypress helpers | ||
|
||
This module gathers helpers which can be used when you E2E test your AdminBro dashboard with | ||
{@link https://www.cypress.io/} as we do. | ||
|
||
### Usage | ||
|
||
First, you have to import helpers to your cypress project. You can do this in: | ||
|
||
`/support/index.js` or `/support/commands.js` | ||
```javascript | ||
require('admin-bro/cy') | ||
``` | ||
|
||
and now you can use our helpers | ||
|
||
```javascript | ||
/// <reference types="cypress" /> | ||
/// <reference types="admin-bro/cy" /> | ||
|
||
context('resources/Company/actions/new', () => { | ||
before(() => { | ||
cy.abLoginAPI({ password: Cypress.env('ADMIN_PASSWORD'), email: Cypress.env('ADMIN_EMAIL') }) | ||
}) | ||
|
||
beforeEach(() => { | ||
cy.abKeepLoggedIn({ cookie: Cypress.env('COOKIE_NAME') }) | ||
cy.visit('resources/Company/actions/new') | ||
}) | ||
|
||
//... | ||
}) | ||
``` | ||
|
||
### What we have | ||
|
||
Cypress helpers project is currently in the WIP/POC phase, that is why there are not much helpers | ||
here. But you can expect that gradually we will add more. |
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
25 changes: 25 additions & 0 deletions
25
packages/admin-bro-demo/src/admin/components/dashboard.tsx
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,25 @@ | ||
import React, { useState, useEffect } from 'react' | ||
import { ApiClient } from 'admin-bro' | ||
import { Box } from '@admin-bro/design-system' | ||
|
||
const api = new ApiClient() | ||
|
||
const Dashboard = () => { | ||
const [data, setData] = useState({}) | ||
|
||
useEffect(() => { | ||
api.getDashboard().then((response) => { | ||
setData(response.data) | ||
}) | ||
}, []) | ||
|
||
return ( | ||
<Box variant="grey"> | ||
<Box variant="white"> | ||
some dashboard | ||
</Box> | ||
</Box> | ||
) | ||
} | ||
|
||
export default Dashboard |
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
Oops, something went wrong.