Skip to content

Commit

Permalink
chore: completed memory testing for alll packages
Browse files Browse the repository at this point in the history
  • Loading branch information
TarunAdobe committed Apr 15, 2024
1 parent 02cf8b6 commit 27d8873
Show file tree
Hide file tree
Showing 19 changed files with 467 additions and 0 deletions.
24 changes: 24 additions & 0 deletions packages/radio/test/radio-memory.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2023 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 { fixture, html } from '@open-wc/testing';
import '@spectrum-web-components/radio/sp-radio.js';
import { Radio } from '@spectrum-web-components/radio';
import { testForMemoryLeaks } from '../../../test/testing-helpers.js';

testForMemoryLeaks(
async () =>
await fixture<Radio>(
html`
<sp-radio></sp-radio>
`
)
);
24 changes: 24 additions & 0 deletions packages/search/test/search-memory.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2023 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 { fixture, html } from '@open-wc/testing';
import '@spectrum-web-components/search/sp-search.js';
import { Search } from '@spectrum-web-components/search';
import { testForMemoryLeaks } from '../../../test/testing-helpers.js';

testForMemoryLeaks(
async () =>
await fixture<Search>(
html`
<sp-search></sp-search>
`
)
);
38 changes: 38 additions & 0 deletions packages/sidenav/test/sidenav-memory.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
Copyright 2023 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 { fixture, html } from '@open-wc/testing';
import '@spectrum-web-components/radio/sp-radio.js';
import '@spectrum-web-components/sidenav/sp-sidenav.js';
import '@spectrum-web-components/sidenav/sp-sidenav-item.js';
import '@spectrum-web-components/sidenav/sp-sidenav-heading.js';
import { SideNav } from '@spectrum-web-components/sidenav';
import { testForMemoryLeaks } from '../../../test/testing-helpers.js';

testForMemoryLeaks(
async () =>
await fixture<SideNav>(
html`
<sp-sidenav>
<sp-sidenav-heading label="CATEGORY 1">
<sp-sidenav-item
value="Section 1"
label="Section 1"
></sp-sidenav-item>
<sp-sidenav-item
value="Section 2"
label="Section 2"
></sp-sidenav-item>
</sp-sidenav-heading>
</sp-sidenav>
`
)
);
24 changes: 24 additions & 0 deletions packages/slider/test/slider-memory.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2023 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 { fixture, html } from '@open-wc/testing';
import '@spectrum-web-components/slider/sp-slider.js';
import { Slider } from '@spectrum-web-components/slider';
import { testForMemoryLeaks } from '../../../test/testing-helpers.js';

testForMemoryLeaks(
async () =>
await fixture<Slider>(
html`
<sp-slider></sp-slider>
`
)
);
24 changes: 24 additions & 0 deletions packages/split-button/test/split-button-memory.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2023 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 { fixture, html } from '@open-wc/testing';
import '@spectrum-web-components/split-button/sp-split-button.js';
import { SplitButton } from '@spectrum-web-components/split-button';
import { testForMemoryLeaks } from '../../../test/testing-helpers.js';

testForMemoryLeaks(
async () =>
await fixture<SplitButton>(
html`
<sp-split-button></sp-split-button>
`
)
);
24 changes: 24 additions & 0 deletions packages/split-view/test/split-view-memory.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2023 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 { fixture, html } from '@open-wc/testing';
import '@spectrum-web-components/split-view/sp-split-view.js';
import { SplitView } from '@spectrum-web-components/split-view';
import { testForMemoryLeaks } from '../../../test/testing-helpers.js';

testForMemoryLeaks(
async () =>
await fixture<SplitView>(
html`
<sp-split-view></sp-split-view>
`
)
);
24 changes: 24 additions & 0 deletions packages/status-light/test/status-light-memory.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2023 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 { fixture, html } from '@open-wc/testing';
import '@spectrum-web-components/status-light/sp-status-light.js';
import { StatusLight } from '@spectrum-web-components/status-light';
import { testForMemoryLeaks } from '../../../test/testing-helpers.js';

testForMemoryLeaks(
async () =>
await fixture<StatusLight>(
html`
<sp-status-light></sp-status-light>
`
)
);
24 changes: 24 additions & 0 deletions packages/swatch/test/swatch-memory.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2023 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 { fixture, html } from '@open-wc/testing';
import '@spectrum-web-components/swatch/sp-swatch.js';
import { Swatch } from '../src/Swatch.js';
import { testForMemoryLeaks } from '../../../test/testing-helpers.js';

testForMemoryLeaks(
async () =>
await fixture<Swatch>(
html`
<sp-swatch></sp-swatch>
`
)
);
24 changes: 24 additions & 0 deletions packages/switch/test/switch-memory.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2023 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 { fixture, html } from '@open-wc/testing';
import '@spectrum-web-components/switch/sp-switch.js';
import { Switch } from '@spectrum-web-components/switch';
import { testForMemoryLeaks } from '../../../test/testing-helpers.js';

testForMemoryLeaks(
async () =>
await fixture<Switch>(
html`
<sp-switch></sp-switch>
`
)
);
18 changes: 18 additions & 0 deletions packages/table/test/table-memory.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
Copyright 2023 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 { fixture } from '@open-wc/testing';
import '@spectrum-web-components/table/sp-table.js';
import type { Table } from '@spectrum-web-components/table';
import { elements } from '../stories/table-elements.stories.js';
import { testForMemoryLeaks } from '../../../test/testing-helpers.js';

testForMemoryLeaks(async () => await fixture<Table>(elements()));
29 changes: 29 additions & 0 deletions packages/tabs/test/tabs-memory.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
Copyright 2023 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 { fixture, html } from '@open-wc/testing';
import '@spectrum-web-components/tabs/sp-tabs.js';
import '@spectrum-web-components/tabs/sp-tab.js';
import { Tabs } from '@spectrum-web-components/tabs';
import { testForMemoryLeaks } from '../../../test/testing-helpers.js';

testForMemoryLeaks(
async () =>
await fixture<Tabs>(
html`
<sp-tabs selected="first">
<sp-tab label="Tab 1" value="first"></sp-tab>
<sp-tab label="Tab 2" value="second"></sp-tab>
<sp-tab label="Tab 3" value="third"></sp-tab>
</sp-tabs>
`
)
);
29 changes: 29 additions & 0 deletions packages/tags/test/tags-memory.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
Copyright 2023 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 { fixture, html } from '@open-wc/testing';
import '@spectrum-web-components/tags/sp-tag.js';
import '@spectrum-web-components/tags/sp-tags.js';
import { Tags } from '@spectrum-web-components/tags';
import { testForMemoryLeaks } from '../../../test/testing-helpers.js';

testForMemoryLeaks(
async () =>
await fixture<Tags>(
html`
<sp-tags>
<sp-tag>Tag 1</sp-tag>
<sp-tag invalid>Tag 2</sp-tag>
<sp-tag disabled>Tag 3</sp-tag>
</sp-tags>
`
)
);
24 changes: 24 additions & 0 deletions packages/textfield/test/textfield-memory.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2023 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 { fixture, html } from '@open-wc/testing';
import '@spectrum-web-components/textfield/sp-textfield.js';
import { Textfield } from '@spectrum-web-components/textfield';
import { testForMemoryLeaks } from '../../../test/testing-helpers.js';

testForMemoryLeaks(
async () =>
await fixture<Textfield>(
html`
<sp-textfield></sp-textfield>
`
)
);
24 changes: 24 additions & 0 deletions packages/thumbnail/test/thumbnail-memory.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2023 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 { fixture, html } from '@open-wc/testing';
import '@spectrum-web-components/thumbnail/sp-thumbnail.js';
import { Thumbnail } from '..';
import { testForMemoryLeaks } from '../../../test/testing-helpers.js';

testForMemoryLeaks(
async () =>
await fixture<Thumbnail>(
html`
<sp-thumbnail></sp-thumbnail>
`
)
);
24 changes: 24 additions & 0 deletions packages/toast/test/toast-memory.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2023 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 { fixture, html } from '@open-wc/testing';
import '@spectrum-web-components/toast/sp-toast.js';
import { Toast } from '@spectrum-web-components/toast';
import { testForMemoryLeaks } from '../../../test/testing-helpers.js';

testForMemoryLeaks(
async () =>
await fixture<Toast>(
html`
<sp-toast></sp-toast>
`
)
);

0 comments on commit 27d8873

Please sign in to comment.