8000 FAT-17442 Support the test cases in daily/weekly runs by sviatlana-stsiapanava · Pull Request #4490 · folio-org/stripes-testing · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

FAT-17442 Support the test cases in daily/weekly runs #4490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 15, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('bulk-edit', () => {
after('delete test data', () => {
cy.getAdminToken();
InventoryInstances.deleteInstanceAndHoldingRecordAndAllItemsViaApi(item.itemBarcode);
Users.deleteViaApi(user1.userId);
Users.deleteViaApi(user2.userId);
FileManager.deleteFile(`cypress/fixtures/${itemBarcodesFileName}`);
});

Expand All @@ -73,7 +73,7 @@ describe('bulk-edit', () => {
path: TopMenu.bulkEditPath,
waiter: BulkEditSearchPane.waitLoading,
});
Users.deleteViaApi(user2.userId);
Users.deleteViaApi(user1.userId);
BulkEditSearchPane.checkItemsRadio();
BulkEditSearchPane.selectRecordIdentifier(ITEM_IDENTIFIERS.ITEM_BARCODES);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,23 @@ const errorMessage =
const getCalloutContent = (fileName) => {
return `${fileName} is formatted incorrectly. Please correct the formatting and upload the file again.`;
};
const checkResponse = (alias, fileName) => {
cy.wait(alias).then((interception) => {
expect(interception.response.body.linkToTriggeringCsvFile).to.include(fileName);
expect(interception.response.body.errorMessage).to.eq(errorMessage);
});
const checkResponse = (alias, fileName, maxRetries = 20) => {
let retries = 0;
const waitForFailedStatus = () => {
cy.wait(alias).then((interception) => {
if (interception.response.body.status === 'FAILED') {
retries++;
if (retries > maxRetries) {
throw new Error('Exceeded maximum retry attempts waiting for status to equal FAILED');
}
expect(interception.response.body.linkToTriggeringCsvFile).to.include(fileName);
expect(interception.response.body.errorMessage).to.eq(errorMessage);
} else {
waitForFailedStatus();
}
});
};
waitForFailedStatus();
};

describe('bulk-edit', () => {
Expand Down
Loading
0