Skip to content

Commit c6afdd4

Browse files
committed
remove create capped options
1 parent 7b53ebb commit c6afdd4

File tree

15 files changed

+8
-451
lines changed

15 files changed

+8
-451
lines changed

packages/compass-e2e-tests/helpers/commands/add-collection.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ import type { CompassBrowser } from '../compass-browser';
22
import * as Selectors from '../selectors';
33

44
export type AddCollectionOptions = {
5-
capped?: {
6-
size: number;
7-
};
85
customCollation?: {
96
locale: string;
107
strength: number;
@@ -51,15 +48,6 @@ export async function addCollection(
5148
);
5249
}
5350

54-
if (collectionOptions && collectionOptions.capped) {
55-
await browser.clickVisible(Selectors.CreateCollectionCappedCheckboxLabel);
56-
57-
await browser.setValueVisible(
58-
Selectors.CreateCollectionCappedSizeInput,
59-
collectionOptions.capped.size.toString()
60-
);
61-
}
62-
6351
if (collectionOptions && collectionOptions.customCollation) {
6452
await browser.clickVisible(
6553
Selectors.CreateCollectionCustomCollationCheckboxLabel

packages/compass-e2e-tests/helpers/selectors.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,6 @@ export const CreateCollectionCreateButton =
458458
'[data-testid="create-collection-modal"] [data-testid="submit-button"]';
459459
export const CreateCollectionCancelButton =
460460
'[data-testid="create-collection-modal"] [data-testid="cancel-button"]';
461-
export const CreateCollectionCappedCheckboxLabel =
462-
'[data-testid="capped-collection-fields"] [data-testid="capped-collection-fields-label"]';
463-
export const CreateCollectionCappedSizeInput =
464-
'[data-testid="capped-collection-fields"] [data-testid="capped-size"]';
465461
export const CreateCollectionCollectionOptionsAccordion =
466462
'[data-testid="create-collection-modal"] [data-testid="additional-collection-preferences"]';
467463
export const CreateCollectionCustomCollationCheckboxLabel =

packages/compass-e2e-tests/tests/database-collections-tab.test.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -174,39 +174,6 @@ describe('Database collections tab', function () {
174174
await browser.waitUntilActiveDatabaseTab(DEFAULT_CONNECTION_NAME_1, 'test');
175175
});
176176

177-
it('can create a capped collection', async function () {
178-
const collectionName = 'my-capped-collection';
179-
180-
// open the create collection modal from the button at the top
181-
await browser.clickVisible(Selectors.DatabaseCreateCollectionButton);
182-
183-
await browser.addCollection(
184-
collectionName,
185-
{
186-
capped: {
187-
size: 1000,
188-
},
189-
},
190-
'add-collection-modal-capped.png'
191-
);
192-
193-
await browser.navigateToDatabaseCollectionsTab(
194-
DEFAULT_CONNECTION_NAME_1,
195-
'test'
196-
);
197-
198-
const selector = Selectors.collectionCard('test', collectionName);
199-
await browser.scrollToVirtualItem(
200-
Selectors.CollectionsGrid,
201-
selector,
202-
'grid'
203-
);
204-
const collectionCard = browser.$(selector);
205-
await collectionCard.waitForDisplayed();
206-
207-
// TODO: how do we make sure this is really a capped collection?
208-
});
209-
210177
it('can create a collection with custom collation', async function () {
211178
const collectionName = 'my-custom-collation-collection';
212179

packages/compass-telemetry/src/telemetry-events.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2253,11 +2253,6 @@ type SwitchViewTypeEvent = ConnectionScopedEvent<{
22532253
type CollectionCreatedEvent = ConnectionScopedEvent<{
22542254
name: 'Collection Created';
22552255
payload: {
2256-
/**
2257-
* Indicates whether the collection is capped.
2258-
*/
2259-
is_capped: boolean;
2260-
22612256
/**
22622257
* Indicates whether the collection has a custom collation.
22632258
*/
@@ -2293,11 +2288,6 @@ type CollectionCreatedEvent = ConnectionScopedEvent<{
22932288
type DatabaseCreatedEvent = ConnectionScopedEvent<{
22942289
name: 'Database Created';
22952290
payload: {
2296-
/**
2297-
* Indicates whether the first collection in the database is capped.
2298-
*/
2299-
is_capped: boolean;
2300-
23012291
/**
23022292
* Indicates whether the first collection in the database has a custom collation.
23032293
*/

packages/databases-collections/src/components/collection-fields/capped-collection-fields.jsx

Lines changed: 0 additions & 56 deletions
This file was deleted.

packages/databases-collections/src/components/collection-fields/capped-collection-fields.spec.jsx

Lines changed: 0 additions & 142 deletions
This file was deleted.

packages/databases-collections/src/components/collection-fields/clustered-collection-fields.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const EXPIRE_AFTER_SECONDS_DESCRIPTION =
1515
'The _id field must be a date or an array that contains date values.';
1616

1717
function ClusteredCollectionFields({
18-
isCapped,
1918
isTimeSeries,
2019
isClustered,
2120
clusteredIndex,
@@ -34,7 +33,7 @@ function ClusteredCollectionFields({
3433
return (
3534
<CollapsibleFieldSet
3635
toggled={isClustered}
37-
disabled={isTimeSeries || isCapped}
36+
disabled={isTimeSeries}
3837
onToggle={(checked) => onChangeIsClustered(checked)}
3938
label="Clustered Collection"
4039
data-testid="clustered-collection-fields"
@@ -72,7 +71,6 @@ function ClusteredCollectionFields({
7271
}
7372

7473
ClusteredCollectionFields.propTypes = {
75-
isCapped: PropTypes.bool.isRequired,
7674
isTimeSeries: PropTypes.bool.isRequired,
7775
isClustered: PropTypes.bool.isRequired,
7876
clusteredIndex: PropTypes.object.isRequired,

packages/databases-collections/src/components/collection-fields/clustered-collection-fields.spec.jsx

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ describe('ClusteredCollectionFields [Component]', function () {
1414
component = mount(
1515
<ClusteredCollectionFields
1616
isTimeSeries={false}
17-
isCapped={false}
1817
isClustered
1918
clusteredIndex={{}}
2019
onChangeIsClustered={() => {}}
@@ -40,7 +39,6 @@ describe('ClusteredCollectionFields [Component]', function () {
4039
component = mount(
4140
<ClusteredCollectionFields
4241
isTimeSeries={false}
43-
isCapped={false}
4442
isClustered={false}
4543
clusteredIndex={{}}
4644
onChangeIsClustered={() => {}}
@@ -72,7 +70,6 @@ describe('ClusteredCollectionFields [Component]', function () {
7270
component = mount(
7371
<ClusteredCollectionFields
7472
isTimeSeries={false}
75-
isCapped={false}
7673
isClustered={false}
7774
clusteredIndex={{}}
7875
onChangeIsClustered={onChangeSpy}
@@ -97,30 +94,4 @@ describe('ClusteredCollectionFields [Component]', function () {
9794
expect(onChangeSpy.firstCall.args[0]).to.deep.equal(true);
9895
});
9996
});
100-
101-
describe('when the isCapped prop is true', function () {
102-
let component;
103-
104-
beforeEach(function () {
105-
component = mount(
106-
<ClusteredCollectionFields
107-
isTimeSeries={false}
108-
isCapped
109-
isClustered={false}
110-
clusteredIndex={{}}
111-
onChangeIsClustered={() => {}}
112-
onChangeField={() => {}}
113-
expireAfterSeconds=""
114-
/>
115-
);
116-
});
117-
118-
afterEach(function () {
119-
component = null;
120-
});
121-
122-
it('has the clustered checkbox disabled', function () {
123-
expect(component.find('Checkbox').props().disabled).to.equal(true);
124-
});
125-
});
12697
});

0 commit comments

Comments
 (0)