-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/sidebar-header-size
- Loading branch information
Showing
110 changed files
with
12,370 additions
and
14,026 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rocket.chat/fuselage": minor | ||
--- | ||
|
||
feat(fuselage): `Contextualbar` components size improvements |
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,5 @@ | ||
--- | ||
"@rocket.chat/fuselage": patch | ||
--- | ||
|
||
fix(fuselage): decrease `InputBox` small inline paddings |
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 |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
!/.yarn/sdks | ||
!/.yarn/versions | ||
/.pnp.* | ||
/lerna-debug.log | ||
/static | ||
node_modules/ | ||
storybook-static/ | ||
|
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 |
---|---|---|
|
@@ -18,7 +18,6 @@ | |
"javascriptreact", | ||
"typescript", | ||
"typescriptreact", | ||
"markdown", | ||
"mdx", | ||
"pegjs" | ||
], | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,15 +1,9 @@ | ||
defaultSemverRangePrefix: ~ | ||
compressionLevel: mixed | ||
|
||
defaultSemverRangePrefix: "~" | ||
|
||
enableGlobalCache: false | ||
|
||
nodeLinker: node-modules | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs | ||
spec: "@yarnpkg/plugin-workspace-tools" | ||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs | ||
spec: "@yarnpkg/plugin-interactive-tools" | ||
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs | ||
spec: "@yarnpkg/plugin-version" | ||
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs | ||
spec: "@yarnpkg/plugin-typescript" | ||
|
||
yarnPath: .yarn/releases/yarn-3.5.0.cjs | ||
yarnPath: .yarn/releases/yarn-4.2.2.cjs |
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 was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,12 +1,65 @@ | ||
import { composeStories } from '@storybook/testing-react'; | ||
import { render } from '@testing-library/react'; | ||
import { render, getByRole, screen } from '@testing-library/react'; | ||
import userEvent from '@testing-library/user-event'; | ||
|
||
import * as stories from './stories'; | ||
import * as stories from './ToastBar.stories'; | ||
import ToastBarProvider from './ToastBarProvider'; | ||
|
||
const { ToastBarWithData } = composeStories(stories); | ||
const { Default, TopEnd } = composeStories(stories, { | ||
decorators: [ | ||
(Story) => ( | ||
<ToastBarProvider> | ||
<Story /> | ||
</ToastBarProvider> | ||
), | ||
], | ||
}); | ||
|
||
const topEndStyle = { | ||
top: '0', | ||
right: '0', | ||
}; | ||
|
||
const topStartStyle = { | ||
top: '0', | ||
left: '0', | ||
}; | ||
|
||
describe('[fuselage-toastbar rendering]', () => { | ||
test('should display ToastBar on the top right of the screen by default', async () => { | ||
render(<TopEnd />); | ||
const toast = screen.queryByRole('alert'); | ||
const toastContainer = toast?.parentElement?.parentElement?.parentElement; | ||
|
||
expect(toastContainer).toHaveStyle(topEndStyle); | ||
}); | ||
|
||
test('should display ToastBar on the top right of the screen', async () => { | ||
document.body.setAttribute('dir', 'ltr'); | ||
render(<TopEnd />); | ||
const toast = screen.queryByRole('alert'); | ||
const toastContainer = toast?.parentElement?.parentElement?.parentElement; | ||
|
||
expect(toastContainer).toHaveStyle(topEndStyle); | ||
}); | ||
|
||
test('should display ToastBar on the top left of the screen', async () => { | ||
document.body.setAttribute('dir', 'rtl'); | ||
render(<TopEnd />); | ||
const toast = screen.queryByRole('alert'); | ||
const toastContainer = toast?.parentElement?.parentElement?.parentElement; | ||
|
||
expect(toastContainer).toHaveStyle(topStartStyle); | ||
}); | ||
}); | ||
|
||
describe('[fuselage-toastbar interacting]', () => { | ||
test('should dispatch the ToastBar on click', async () => { | ||
const { container } = render(<Default />); | ||
const button = getByRole(container, 'button'); | ||
|
||
describe('[ToastBarWithData Component]', () => { | ||
it('renders without crashing', () => { | ||
render(<ToastBarWithData />); | ||
userEvent.click(button); | ||
const toasts = screen.queryAllByRole('alert'); | ||
toasts.forEach((toast) => expect(toast).toBeInTheDocument()); | ||
}); | ||
}); |
Oops, something went wrong.