Skip to content

Commit

Permalink
Add some wait commands to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Dec 10, 2024
1 parent abe2d7f commit 01fb315
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 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
1 change: 1 addition & 0 deletions tests/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ Cypress.Commands.add( 'disableFeatureForRoles', ( feature, roles ) => {
// Disable access for all users.
cy.disableFeatureForUsers();

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

Expand Down

0 comments on commit 01fb315

Please sign in to comment.