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
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/compass-e2e-tests/helpers/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ export const ImportSkipAnalyze = '[data-testid="skip-csv-analyze-button"]';
export const ImportAnalyzeError =
'[data-testid="import-modal"] [data-testid="analyze-error"]';
export const ImportConfirm =
'[data-testid="import-modal"] [data-testid="import-button"]';
'[data-testid="import-modal"] [data-testid="import-button"][aria-disabled="false"]';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Realising this was probably the reason behind so many flakes..

export const ImportToast = '[data-testid="toast-import-toast"]';
export const ImportToastErrorDetailsBtn =
'[data-testid="toast-import-toast"] [data-testid="import-error-details-button"]';
Expand Down
25 changes: 19 additions & 6 deletions packages/compass-e2e-tests/tests/collection-import.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1320,8 +1320,14 @@ describe('Collection import', function () {

describe('aborting an import', function () {
it('aborts an in progress CSV import', async function () {
// 16116 documents.
const csvPath = path.resolve(__dirname, '..', 'fixtures', 'listings.csv');
// 279712 documents, so this should take a while to import, giving us lots
// of time to disconnect in time.
const csvPath = path.resolve(
__dirname,
'..',
'fixtures',
'listings-large.csv'
);

await browser.navigateToCollectionTab(
DEFAULT_CONNECTION_NAME_1,
Expand Down Expand Up @@ -1389,12 +1395,13 @@ describe('Collection import', function () {
});

it('aborts an in progress JSON import', async function () {
// 16116 documents.
// 279712 documents, so this should take a while to import, giving us lots
// of time to disconnect in time.
const jsonPath = path.resolve(
__dirname,
'..',
'fixtures',
'listings.json'
'listings-large.json'
);

await browser.navigateToCollectionTab(
Expand Down Expand Up @@ -1459,8 +1466,14 @@ describe('Collection import', function () {
});

it('aborts when disconnected', async function () {
// 16116 documents.
const csvPath = path.resolve(__dirname, '..', 'fixtures', 'listings.csv');
// 279712 documents, so this should take a while to import, giving us lots
// of time to disconnect in time.
const csvPath = path.resolve(
__dirname,
'..',
'fixtures',
'listings-large.csv'
);

await browser.navigateToCollectionTab(
DEFAULT_CONNECTION_NAME_1,
Expand Down
Loading