Files
teleport/web/packages/shared/components/TextSelectCopy/TextSelectCopyMulti.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

49 lines
1.6 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 * as stories from './TextSelectCopyMulti.story';
test('render multi bash texts', () => {
const { container } = render(<stories.BashMulti />);
expect(container).toMatchSnapshot();
});
test('render multi bash texts with comment', () => {
const { container } = render(<stories.BashMultiWithComment />);
expect(container).toMatchSnapshot();
});
test('render single bash text', () => {
const { container } = render(<stories.BashSingle />);
expect(container).toMatchSnapshot();
});
test('render single bash text with comment', () => {
const { container } = render(<stories.BashSingleWithComment />);
expect(container).toMatchSnapshot();
});
test('render non bash single text', () => {
const { container } = render(<stories.NonBash />);
expect(container).toMatchSnapshot();
});