Files
teleport/web/packages/shared/components/TextSelectCopy/TextSelectCopy.story.test.tsx
T
Grzegorz ZdunekandRafał Cieślak 402472698a Allow copying proxy link in app gateways (#38254)
* Move `TextSelectCopy` to design package

* Show only URL to app instead of curl example

* Move `TextSelectCopy` to `shared`

* Show loading spinner when `changePortAttempt` is processing

* Make the button revert to "Copy" after clicking

* Move Online DocumentGatewayApp story to be the first one

This way the happy path opens first when you open the relevant story section.

* Adjust the story to showcase the spinner

---------

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
2024-02-16 13:50:20 +00:00

34 lines
1.1 KiB
TypeScript

/**
* Teleport
* Copyright (C) 2023 Gravitational, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { render } from 'design/utils/testing';
import { BashCommand, NonBash } from './TextSelectCopy.story';
test('bash set to false does not render $ sign', () => {
const { container } = render(<NonBash />);
expect(container).toMatchSnapshot();
});
test('default, renders $ sign', () => {
const { container } = render(<BashCommand />);
expect(container).toMatchSnapshot();
});