mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
chore: wait for post to finish instead of waiting a fixed time (#5851)
This will hopefully make the test faster and more stable
This commit is contained in:
parent
3779a6f0fb
commit
42bc522582
@ -101,6 +101,10 @@ describe('imports', () => {
|
|||||||
|
|
||||||
cy.get("[data-testid='VALIDATE_BUTTON']").should('be.disabled');
|
cy.get("[data-testid='VALIDATE_BUTTON']").should('be.disabled');
|
||||||
|
|
||||||
|
cy.intercept('POST', '/api/admin/features-batch/import').as(
|
||||||
|
'featureImported',
|
||||||
|
);
|
||||||
|
|
||||||
// cypress can only work with input@file that is visible
|
// cypress can only work with input@file that is visible
|
||||||
cy.get('input[type=file]')
|
cy.get('input[type=file]')
|
||||||
.invoke('attr', 'style', 'display: block')
|
.invoke('attr', 'style', 'display: block')
|
||||||
@ -111,9 +115,9 @@ describe('imports', () => {
|
|||||||
});
|
});
|
||||||
cy.get("[data-testid='VALIDATE_BUTTON']").click();
|
cy.get("[data-testid='VALIDATE_BUTTON']").click();
|
||||||
cy.get("[data-testid='IMPORT_CONFIGURATION_BUTTON']").click();
|
cy.get("[data-testid='IMPORT_CONFIGURATION_BUTTON']").click();
|
||||||
// cy.contains('Import completed');
|
|
||||||
|
|
||||||
cy.wait(1500);
|
cy.wait('@featureImported');
|
||||||
|
cy.contains('Import completed');
|
||||||
|
|
||||||
cy.request({
|
cy.request({
|
||||||
url: `/api/admin/projects/default/features/${randomFeatureName}`,
|
url: `/api/admin/projects/default/features/${randomFeatureName}`,
|
||||||
|
Loading…
Reference in New Issue
Block a user