Skip to content

Commit

Permalink
Change were we add the waits to only impact our Azure Image tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Nov 20, 2024
1 parent b1c427a commit a56a852
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,15 @@ describe( 'Image processing Tests', () => {
cy.disableFeatureForRoles( 'feature_descriptive_text_generator', [
'administrator',
] );
cy.wait( 500 );
cy.disableFeatureForRoles( 'feature_image_tags_generator', [
'administrator',
] );
cy.wait( 500 );
cy.disableFeatureForRoles( 'feature_image_cropping', [
'administrator',
] );
cy.wait( 500 );
cy.disableFeatureForRoles( 'feature_image_to_text_generator', [
'administrator',
] );
Expand All @@ -223,12 +226,15 @@ describe( 'Image processing Tests', () => {
cy.enableFeatureForRoles( 'feature_descriptive_text_generator', [
'administrator',
] );
cy.wait( 500 );
cy.enableFeatureForRoles( 'feature_image_tags_generator', [
'administrator',
] );
cy.wait( 500 );
cy.enableFeatureForRoles( 'feature_image_cropping', [
'administrator',
] );
cy.wait( 500 );
cy.enableFeatureForRoles( 'feature_image_to_text_generator', [
'administrator',
] );
Expand All @@ -248,12 +254,15 @@ describe( 'Image processing Tests', () => {
cy.disableFeatureForRoles( 'feature_descriptive_text_generator', [
'administrator',
] );
cy.wait( 500 );
cy.disableFeatureForRoles( 'feature_image_tags_generator', [
'administrator',
] );
cy.wait( 500 );
cy.disableFeatureForRoles( 'feature_image_cropping', [
'administrator',
] );
cy.wait( 500 );
cy.disableFeatureForRoles( 'feature_image_to_text_generator', [
'administrator',
] );
Expand All @@ -265,8 +274,11 @@ describe( 'Image processing Tests', () => {
cy.enableFeatureForUsers( 'feature_descriptive_text_generator', [
'admin',
] );
cy.wait( 500 );
cy.enableFeatureForUsers( 'feature_image_tags_generator', [ 'admin' ] );
cy.wait( 500 );
cy.enableFeatureForUsers( 'feature_image_cropping', [ 'admin' ] );
cy.wait( 500 );
cy.enableFeatureForUsers( 'feature_image_to_text_generator', [
'admin',
] );
Expand Down
4 changes: 1 addition & 3 deletions tests/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ Cypress.Commands.add( 'enableFeatureForRoles', ( feature, roles ) => {
} );
cy.wait( 100 );
cy.saveFeatureSettings();
cy.wait( 1000 );
} );

/**
Expand Down Expand Up @@ -189,9 +188,8 @@ Cypress.Commands.add( 'disableFeatureForRoles', ( feature, roles ) => {
// Disable access for all users.
cy.disableFeatureForUsers();

cy.wait( 100 );
cy.saveFeatureSettings();

cy.wait( 1000 );
} );

/**
Expand Down

0 comments on commit a56a852

Please sign in to comment.