Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions packages/@react-spectrum/actiongroup/test/ActionGroup.ssr.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import {testSSR} from '@react-spectrum/test-utils';

describe('ActionGroup SSR', function () {
it('should render without errors', async function () {
await testSSR(__filename, `
import {ActionGroup, Item} from '../';
import {Provider} from '@react-spectrum/provider';
import {theme} from '@react-spectrum/theme-default';

<Provider theme={theme}>
<ActionGroup>
<Item key="one">One</Item>
</ActionGroup>
</Provider>
`);
});
});
25 changes: 25 additions & 0 deletions packages/@react-spectrum/breadcrumbs/test/Breadcrumbs.ssr.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import {testSSR} from '@react-spectrum/test-utils';

describe('Breadcrumbs SSR', function () {
it('should render without errors', async function () {
await testSSR(__filename, `
import {Breadcrumbs, Item} from '../';

<Breadcrumbs>
<Item key="one">One</Item>
</Breadcrumbs>
`);
});
});
30 changes: 30 additions & 0 deletions packages/@react-spectrum/buttongroup/test/ButtonGroup.ssr.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import {testSSR} from '@react-spectrum/test-utils';

describe('ButtonGroup SSR', function () {
it('should render without errors', async function () {
await testSSR(__filename, `
import {ButtonGroup} from '../';
import {Button} from '@react-spectrum/button';
import {Provider} from '@react-spectrum/provider';
import {theme} from '@react-spectrum/theme-default';

<Provider theme={theme}>
<ButtonGroup>
<Button variant="primary">Test</Button>
</ButtonGroup>
</Provider>
`);
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import {testSSR} from '@react-spectrum/test-utils';

describe('IllustratedMessage SSR', function () {

it('should render without errors', async function () {
await testSSR(__filename, `
import {Heading} from '@react-spectrum/text';
import {IllustratedMessage} from '../';

<IllustratedMessage>
<Heading>Message</Heading>
</IllustratedMessage>
`);
});
});
22 changes: 22 additions & 0 deletions packages/@react-spectrum/layout/test/Flex.ssr.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import {testSSR} from '@react-spectrum/test-utils';

describe('Flex SSR', function () {
it('should render without errors', async function () {
await testSSR(__filename, `
import {Flex} from '../';
<Flex />
`);
});
});
22 changes: 22 additions & 0 deletions packages/@react-spectrum/layout/test/Grid.ssr.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import {testSSR} from '@react-spectrum/test-utils';

describe('Grid SSR', function () {
it('should render without errors', async function () {
await testSSR(__filename, `
import {Grid} from '../';
<Grid />
`);
});
});
22 changes: 22 additions & 0 deletions packages/@react-spectrum/link/test/Link.ssr.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import {testSSR} from '@react-spectrum/test-utils';

describe('Link SSR', function () {
it('should render without errors', async function () {
await testSSR(__filename, `
import {Link} from '../';
<Link>the link</Link>
`);
});
});
26 changes: 26 additions & 0 deletions packages/@react-spectrum/listbox/test/ListBox.ssr.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import {testSSR} from '@react-spectrum/test-utils';

describe('ListBox SSR', function () {
it('should render without errors', async function () {
await testSSR(__filename, `
import {ListBox, Item} from '../';
<ListBox>
<Item>Left</Item>
<Item>Middle</Item>
<Item>Right</Item>
</ListBox>
`);
});
});
26 changes: 26 additions & 0 deletions packages/@react-spectrum/menu/test/Menu.ssr.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import {testSSR} from '@react-spectrum/test-utils';

describe('Menu SSR', function () {
it('should render without errors', async function () {
await testSSR(__filename, `
import {Menu, Item} from '../';
<Menu>
<Item>Left</Item>
<Item>Middle</Item>
<Item>Right</Item>
</Menu>
`);
});
});
30 changes: 30 additions & 0 deletions packages/@react-spectrum/menu/test/MenuTrigger.ssr.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import {testSSR} from '@react-spectrum/test-utils';

describe('MenuTrigger SSR', function () {
it('should render without errors', async function () {
await testSSR(__filename, `
import {MenuTrigger, Menu, Item} from '../';
import {ActionButton} from '@react-spectrum/button';
<MenuTrigger>
<ActionButton>Edit</ActionButton>
<Menu>
<Item>One</Item>
<Item>Two</Item>
<Item>Three</Item>
</Menu>
</MenuTrigger>
`);
});
});
22 changes: 22 additions & 0 deletions packages/@react-spectrum/meter/test/Meter.ssr.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import {testSSR} from '@react-spectrum/test-utils';

describe('Meter SSR', function () {
it('should render without errors', async function () {
await testSSR(__filename, `
import {Meter} from '../';
<Meter label="Storage space" variant="positive" />
`);
});
});
22 changes: 22 additions & 0 deletions packages/@react-spectrum/numberfield/test/NumberField.ssr.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import {testSSR} from '@react-spectrum/test-utils';

describe('NumberField SSR', function () {
it('should render without errors', async function () {
await testSSR(__filename, `
import {NumberField} from '../';
<NumberField aria-label="number" />
`);
});
});
26 changes: 26 additions & 0 deletions packages/@react-spectrum/picker/test/Picker.ssr.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import {testSSR} from '@react-spectrum/test-utils';

describe('Picker SSR', function () {
it('should render without errors', async function () {
await testSSR(__filename, `
import {Picker, Item} from '../';
<Picker>
<Item>One</Item>
<Item>Two</Item>
<Item>Three</Item>
</Picker>
`);
});
});
22 changes: 22 additions & 0 deletions packages/@react-spectrum/progress/test/ProgressBar.ssr.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import {testSSR} from '@react-spectrum/test-utils';

describe('ProgressBar SSR', function () {
it('should render without errors', async function () {
await testSSR(__filename, `
import {ProgressBar} from '../';
<ProgressBar aria-label="progress" />
`);
});
});
22 changes: 22 additions & 0 deletions packages/@react-spectrum/progress/test/ProgressCircle.ssr.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import {testSSR} from '@react-spectrum/test-utils';

describe('ProgressCircle SSR', function () {
it('should render without errors', async function () {
await testSSR(__filename, `
import {ProgressCircle} from '../';
<ProgressCircle aria-label="progress" />
`);
});
});
Loading