import React from "react"; import { renderWithTheme } from "../../testHelpers"; import ButtonMenu from "../../components/ButtonMenu/ButtonMenu"; import ButtonMenuItem from "../../components/ButtonMenu/ButtonMenuItem"; const handleClick = jest.fn(); it("renders correctly", () => { const { asFragment } = renderWithTheme( Item 1 Item 2 ); expect(asFragment()).toMatchInlineSnapshot(` .c0 { background-color: #EFF4F5; border-radius: 16px; display: -webkit-inline-box; display: -webkit-inline-flex; display: -ms-inline-flexbox; display: inline-flex; } .c0 > button + button, .c0 > a + a { margin-left: 2px; } .c1 { -webkit-align-items: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; border: 0; border-radius: 16px; box-shadow: 0px -1px 0px 0px rgba(14,14,44,0.4) inset; cursor: pointer; display: -webkit-inline-box; display: -webkit-inline-flex; display: -ms-inline-flexbox; display: inline-flex; font-family: inherit; font-size: 16px; font-weight: 600; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; -webkit-letter-spacing: 0.03em; -moz-letter-spacing: 0.03em; -ms-letter-spacing: 0.03em; letter-spacing: 0.03em; line-height: 1; opacity: 1; outline: 0; -webkit-transition: background-color 0.2s,opacity 0.2s; transition: background-color 0.2s,opacity 0.2s; height: 48px; padding: 0 24px; background-color: #1FC7D4; color: white; } .c1:hover:not(:disabled):not(.pancake-button--disabled):not(.pancake-button--disabled):not(:active) { opacity: 0.65; } .c1:active:not(:disabled):not(.pancake-button--disabled):not(.pancake-button--disabled) { opacity: 0.85; } .c1:disabled, .c1.pancake-button--disabled { background-color: #E9EAEB; border-color: #E9EAEB; box-shadow: none; color: #BDC2C4; cursor: not-allowed; } .c2 { -webkit-align-items: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; border: 0; border-radius: 16px; box-shadow: 0px -1px 0px 0px rgba(14,14,44,0.4) inset; cursor: pointer; display: -webkit-inline-box; display: -webkit-inline-flex; display: -ms-inline-flexbox; display: inline-flex; font-family: inherit; font-size: 16px; font-weight: 600; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; -webkit-letter-spacing: 0.03em; -moz-letter-spacing: 0.03em; -ms-letter-spacing: 0.03em; letter-spacing: 0.03em; line-height: 1; opacity: 1; outline: 0; -webkit-transition: background-color 0.2s,opacity 0.2s; transition: background-color 0.2s,opacity 0.2s; height: 48px; padding: 0 24px; background-color: #EFF4F5; box-shadow: none; color: #1FC7D4; } .c2:hover:not(:disabled):not(.pancake-button--disabled):not(.pancake-button--disabled):not(:active) { opacity: 0.65; } .c2:active:not(:disabled):not(.pancake-button--disabled):not(.pancake-button--disabled) { opacity: 0.85; } .c2:disabled, .c2.pancake-button--disabled { background-color: #E9EAEB; border-color: #E9EAEB; box-shadow: none; color: #BDC2C4; cursor: not-allowed; } .c3 { background-color: transparent; color: #8f80ba; } .c3:hover:not(:disabled):not(:active) { background-color: transparent; }
`); });