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
5 changes: 4 additions & 1 deletion packages/collection-model/lib/collection-properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const PROPERTIES_FLE2 = 'fle2';
const PROPERTIES_VIEW = 'view';
const PROPERTIES_READ_ONLY = 'read-only';

/**
* @param {import('../').CollectionProps} coll
*/
function getProperties(coll) {
const properties = [];

Expand All @@ -29,7 +32,7 @@ function getProperties(coll) {
});
}

if (coll.capped) {
if (coll.is_capped) {
properties.push({
id: PROPERTIES_CAPPED,
});
Expand Down
2 changes: 1 addition & 1 deletion packages/collection-model/lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ const CollectionModel = AmpersandModel.extend(debounceActions(['fetch']), {
},
},
properties: {
deps: ['collation', 'type', 'capped', 'clustered', 'readonly', 'fle2'],
deps: ['collation', 'type', 'is_capped', 'clustered', 'readonly', 'fle2'],
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drive-by: capped badge is not currently shown on a collection card

fn() {
return getProperties(this);
},
Expand Down
12 changes: 0 additions & 12 deletions packages/compass-e2e-tests/helpers/commands/add-collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import type { CompassBrowser } from '../compass-browser';
import * as Selectors from '../selectors';

export type AddCollectionOptions = {
capped?: {
size: number;
};
customCollation?: {
locale: string;
strength: number;
Expand Down Expand Up @@ -51,15 +48,6 @@ export async function addCollection(
);
}

if (collectionOptions && collectionOptions.capped) {
await browser.clickVisible(Selectors.CreateCollectionCappedCheckboxLabel);

await browser.setValueVisible(
Selectors.CreateCollectionCappedSizeInput,
collectionOptions.capped.size.toString()
);
}

if (collectionOptions && collectionOptions.customCollation) {
await browser.clickVisible(
Selectors.CreateCollectionCustomCollationCheckboxLabel
Expand Down
4 changes: 0 additions & 4 deletions packages/compass-e2e-tests/helpers/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,6 @@ export const CreateCollectionCreateButton =
'[data-testid="create-collection-modal"] [data-testid="submit-button"]';
export const CreateCollectionCancelButton =
'[data-testid="create-collection-modal"] [data-testid="cancel-button"]';
export const CreateCollectionCappedCheckboxLabel =
'[data-testid="capped-collection-fields"] [data-testid="capped-collection-fields-label"]';
export const CreateCollectionCappedSizeInput =
'[data-testid="capped-collection-fields"] [data-testid="capped-size"]';
export const CreateCollectionCollectionOptionsAccordion =
'[data-testid="create-collection-modal"] [data-testid="additional-collection-preferences"]';
export const CreateCollectionCustomCollationCheckboxLabel =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,39 +174,6 @@ describe('Database collections tab', function () {
await browser.waitUntilActiveDatabaseTab(DEFAULT_CONNECTION_NAME_1, 'test');
});

it('can create a capped collection', async function () {
const collectionName = 'my-capped-collection';

// open the create collection modal from the button at the top
await browser.clickVisible(Selectors.DatabaseCreateCollectionButton);

await browser.addCollection(
collectionName,
{
capped: {
size: 1000,
},
},
'add-collection-modal-capped.png'
);

await browser.navigateToDatabaseCollectionsTab(
DEFAULT_CONNECTION_NAME_1,
'test'
);

const selector = Selectors.collectionCard('test', collectionName);
await browser.scrollToVirtualItem(
Selectors.CollectionsGrid,
selector,
'grid'
);
const collectionCard = browser.$(selector);
await collectionCard.waitForDisplayed();

// TODO: how do we make sure this is really a capped collection?
});

it('can create a collection with custom collation', async function () {
const collectionName = 'my-custom-collation-collection';

Expand Down
10 changes: 0 additions & 10 deletions packages/compass-telemetry/src/telemetry-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2253,11 +2253,6 @@ type SwitchViewTypeEvent = ConnectionScopedEvent<{
type CollectionCreatedEvent = ConnectionScopedEvent<{
name: 'Collection Created';
payload: {
/**
* Indicates whether the collection is capped.
*/
is_capped: boolean;

/**
* Indicates whether the collection has a custom collation.
*/
Expand Down Expand Up @@ -2293,11 +2288,6 @@ type CollectionCreatedEvent = ConnectionScopedEvent<{
type DatabaseCreatedEvent = ConnectionScopedEvent<{
name: 'Database Created';
payload: {
/**
* Indicates whether the first collection in the database is capped.
*/
is_capped: boolean;

/**
* Indicates whether the first collection in the database has a custom collation.
*/
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const EXPIRE_AFTER_SECONDS_DESCRIPTION =
'The _id field must be a date or an array that contains date values.';

function ClusteredCollectionFields({
isCapped,
isTimeSeries,
isClustered,
clusteredIndex,
Expand All @@ -34,7 +33,7 @@ function ClusteredCollectionFields({
return (
<CollapsibleFieldSet
toggled={isClustered}
disabled={isTimeSeries || isCapped}
disabled={isTimeSeries}
onToggle={(checked) => onChangeIsClustered(checked)}
label="Clustered Collection"
data-testid="clustered-collection-fields"
Expand Down Expand Up @@ -72,7 +71,6 @@ function ClusteredCollectionFields({
}

ClusteredCollectionFields.propTypes = {
isCapped: PropTypes.bool.isRequired,
isTimeSeries: PropTypes.bool.isRequired,
isClustered: PropTypes.bool.isRequired,
clusteredIndex: PropTypes.object.isRequired,
Expand Down
Loading
Loading