Skip to content

Commit 9e279bc

Browse files
committed
update test after incomplete sharding status
1 parent 3ada5f4 commit 9e279bc

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,6 +1415,7 @@ export const GlobalWrites = {
14151415

14161416
CancelShardingButton: '[data-testid="cancel-sharding-btn"]',
14171417
UnmanageNamespaceButton: '[data-testid="unmanage-collection-button"]',
1418+
ManageNamespaceButton: '[data-testid="manage-collection-button"]',
14181419

14191420
SampleFindingDocuments: '[data-testid="sample-finding-documents"]',
14201421
SampleInsertingDocuments: '[data-testid="sample-inserting-documents"]',

packages/compass-e2e-tests/tests/atlas-cloud/global-writes.test.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ type GeoShardingFormData = {
1818
keyType?: 'UNIQUE' | 'HASHED';
1919
};
2020

21-
type GeoShardingStatus = 'UNSHARDED' | 'SHARDING' | 'SHARD_KEY_CORRECT';
21+
type GeoShardingStatus =
22+
| 'UNSHARDED'
23+
| 'SHARDING'
24+
| 'SHARD_KEY_CORRECT'
25+
| 'INCOMPLETE_SHARDING_SETUP';
2226

2327
const WEBDRIVER_TIMEOUT = 1000 * 60 * 10;
2428
const MOCHA_TIMEOUT = WEBDRIVER_TIMEOUT * 1.2;
@@ -127,7 +131,15 @@ describe('Global writes', function () {
127131
await browser.clickVisible(Selectors.GlobalWrites.UnmanageNamespaceButton);
128132

129133
// It transitions to the unmanaging state
130-
await waitForGlobalWritesStatus(browser, 'UNSHARDED');
134+
await waitForGlobalWritesStatus(browser, 'INCOMPLETE_SHARDING_SETUP');
135+
136+
// This time there should be a button to manage the namespace again, but not the form
137+
await browser
138+
.$(Selectors.GlobalWrites.ManageNamespaceButton)
139+
.waitForDisplayed();
140+
await browser
141+
.$(Selectors.GlobalWrites.ShardKeyFormSecondKeyInputCombobox)
142+
.waitForDisplayed({ reverse: true });
131143
});
132144

133145
it('should be able to shard an unsharded namespace and cancel the operation', async function () {

0 commit comments

Comments
 (0)