Ver código fonte

fix-ci-failing-test

CYRIL AJIEH 3 anos atrás
pai
commit
d937490c47

+ 2 - 2
integration-tests/cypress.config.js

@@ -5,13 +5,13 @@ module.exports = defineConfig({
   viewportHeight: 1080,
   screenshotsFolder: './screenshots',
   videosFolder: './videos',
-  video: false,
+  video: true,
   reporter: '../../node_modules/cypress-multi-reporters',
   reporterOptions: {
     configFile: 'reporter-config.json',
   },
   fixturesFolder: 'fixtures',
-  defaultCommandTimeout: 300000,
+  defaultCommandTimeout: 30000,
   retries: {
     runMode: 1,
     openMode: 0,

+ 10 - 7
integration-tests/tests/example-page.cy.ts

@@ -11,13 +11,16 @@ const installHelmChart = (path: string) => {
     {
       failOnNonZeroExit: false,
     },
-  ).then((result) => {
-    cy.visit(`/dashboards`);
-    cy.log('Error installing helm chart: ', result.stderr);
-    cy.log('Successfully installed helm chart: ', result.stdout);
-  });
+  )
+    .get('[data-test="refresh-web-console"]', { timeout: 300000 })
+    .should('exist')
+    .then((result) => {
+      cy.reload();
+      cy.visit(`/dashboards`);
+      cy.log('Error installing helm chart: ', result.stderr);
+      cy.log('Successfully installed helm chart: ', result.stdout);
+    });
 };
-
 const deleteHelmChart = (path: string) => {
   cy.exec(
     `cd ../../console-plugin-template && ${path} uninstall ${PLUGIN_TEMPLATE_NAME} -n ${PLUGIN_TEMPLATE_NAME} && oc delete namespaces ${PLUGIN_TEMPLATE_NAME}`,
@@ -77,4 +80,4 @@ describe('Console plugin template test', () => {
       'Hello, Plugin!',
     );
   });
-});
+});