Skip to content

Commit d0d7ea8

Browse files
authored
fix(e2e): use a larger test fixture for the abort import test COMPASS-9858 (#7352)
* use a larger test fixture for the abort import tests * make sure the button is enabled
1 parent 266375e commit d0d7ea8

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed
25 MB
Binary file not shown.
32.5 MB
Binary file not shown.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ export const ImportSkipAnalyze = '[data-testid="skip-csv-analyze-button"]';
659659
export const ImportAnalyzeError =
660660
'[data-testid="import-modal"] [data-testid="analyze-error"]';
661661
export const ImportConfirm =
662-
'[data-testid="import-modal"] [data-testid="import-button"]';
662+
'[data-testid="import-modal"] [data-testid="import-button"][aria-disabled="false"]';
663663
export const ImportToast = '[data-testid="toast-import-toast"]';
664664
export const ImportToastErrorDetailsBtn =
665665
'[data-testid="toast-import-toast"] [data-testid="import-error-details-button"]';

packages/compass-e2e-tests/tests/collection-import.test.ts

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,8 +1320,14 @@ describe('Collection import', function () {
13201320

13211321
describe('aborting an import', function () {
13221322
it('aborts an in progress CSV import', async function () {
1323-
// 16116 documents.
1324-
const csvPath = path.resolve(__dirname, '..', 'fixtures', 'listings.csv');
1323+
// 279712 documents, so this should take a while to import, giving us lots
1324+
// of time to disconnect in time.
1325+
const csvPath = path.resolve(
1326+
__dirname,
1327+
'..',
1328+
'fixtures',
1329+
'listings-large.csv'
1330+
);
13251331

13261332
await browser.navigateToCollectionTab(
13271333
DEFAULT_CONNECTION_NAME_1,
@@ -1389,12 +1395,13 @@ describe('Collection import', function () {
13891395
});
13901396

13911397
it('aborts an in progress JSON import', async function () {
1392-
// 16116 documents.
1398+
// 279712 documents, so this should take a while to import, giving us lots
1399+
// of time to disconnect in time.
13931400
const jsonPath = path.resolve(
13941401
__dirname,
13951402
'..',
13961403
'fixtures',
1397-
'listings.json'
1404+
'listings-large.json'
13981405
);
13991406

14001407
await browser.navigateToCollectionTab(
@@ -1459,8 +1466,14 @@ describe('Collection import', function () {
14591466
});
14601467

14611468
it('aborts when disconnected', async function () {
1462-
// 16116 documents.
1463-
const csvPath = path.resolve(__dirname, '..', 'fixtures', 'listings.csv');
1469+
// 279712 documents, so this should take a while to import, giving us lots
1470+
// of time to disconnect in time.
1471+
const csvPath = path.resolve(
1472+
__dirname,
1473+
'..',
1474+
'fixtures',
1475+
'listings-large.csv'
1476+
);
14641477

14651478
await browser.navigateToCollectionTab(
14661479
DEFAULT_CONNECTION_NAME_1,

0 commit comments

Comments
 (0)