|
|
@@ -12,7 +12,7 @@ const installHelmChart = (path: string) => {
|
|
|
failOnNonZeroExit: false,
|
|
|
},
|
|
|
).then((result) => {
|
|
|
- cy.visit(`/example`);
|
|
|
+ cy.visit(`/dashboards`);
|
|
|
cy.log('Error installing helm chart: ', result.stderr);
|
|
|
cy.log('Successfully installed helm chart: ', result.stdout);
|
|
|
});
|
|
|
@@ -30,70 +30,51 @@ const deleteHelmChart = (path: string) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
-// Adding this to further debug the failing test issues in CI
|
|
|
-describe('My First Test without installing hel chart', () => {
|
|
|
- it('Does not do much! Should pass', () => {
|
|
|
- expect(true).to.equal(true);
|
|
|
- });
|
|
|
- it('Does not do much! Should fail', () => {
|
|
|
- expect(true).to.equal(false);
|
|
|
- });
|
|
|
-});
|
|
|
-
|
|
|
-if (!Cypress.env('OPENSHIFT_CI') || Cypress.env('PLUGIN_TEMPLATE_PULL_SPEC')) {
|
|
|
- describe('Console plugin template test', () => {
|
|
|
- before(() => {
|
|
|
- cy.login();
|
|
|
+describe('Console plugin template test', () => {
|
|
|
+ before(() => {
|
|
|
+ cy.login();
|
|
|
|
|
|
- if (!isLocalDevEnvironment) {
|
|
|
- console.log('this is not a local env, installig helm');
|
|
|
+ if (!isLocalDevEnvironment) {
|
|
|
+ console.log('this is not a local env, installig helm');
|
|
|
|
|
|
- cy.exec('cd ../../console-plugin-template && ./install_helm.sh', {
|
|
|
- failOnNonZeroExit: false,
|
|
|
- }).then((result) => {
|
|
|
- cy.log('Error installing helm binary: ', result.stderr);
|
|
|
- cy.log(
|
|
|
- 'Successfully installed helm binary in "/tmp" directory: ',
|
|
|
- result.stdout,
|
|
|
- );
|
|
|
+ cy.exec('cd ../../console-plugin-template && ./install_helm.sh', {
|
|
|
+ failOnNonZeroExit: false,
|
|
|
+ }).then((result) => {
|
|
|
+ cy.log('Error installing helm binary: ', result.stderr);
|
|
|
+ cy.log(
|
|
|
+ 'Successfully installed helm binary in "/tmp" directory: ',
|
|
|
+ result.stdout,
|
|
|
+ );
|
|
|
|
|
|
- installHelmChart('/tmp/helm');
|
|
|
- });
|
|
|
- } else {
|
|
|
- console.log('this is a local env, not installing helm');
|
|
|
+ installHelmChart('/tmp/helm');
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ console.log('this is a local env, not installing helm');
|
|
|
|
|
|
- installHelmChart('helm');
|
|
|
- }
|
|
|
- });
|
|
|
+ installHelmChart('helm');
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- afterEach(() => {
|
|
|
- checkErrors();
|
|
|
- cy.logout();
|
|
|
- });
|
|
|
+ afterEach(() => {
|
|
|
+ checkErrors();
|
|
|
+ });
|
|
|
|
|
|
- after(() => {
|
|
|
- cy.logout();
|
|
|
- if (!isLocalDevEnvironment) {
|
|
|
- deleteHelmChart('/tmp/helm');
|
|
|
- } else {
|
|
|
- deleteHelmChart('helm');
|
|
|
- }
|
|
|
- });
|
|
|
+ after(() => {
|
|
|
+ if (!isLocalDevEnvironment) {
|
|
|
+ deleteHelmChart('/tmp/helm');
|
|
|
+ } else {
|
|
|
+ deleteHelmChart('helm');
|
|
|
+ }
|
|
|
+ cy.logout();
|
|
|
+ });
|
|
|
|
|
|
- it('Does not do much! Should pass', () => {
|
|
|
- expect(true).to.equal(true);
|
|
|
- });
|
|
|
- it('Verify the example page title', () => {
|
|
|
- cy.get('[data-quickstart-id="qs-nav-home"]').click();
|
|
|
- cy.get('[data-test="nav"]').contains('Plugin Example').click();
|
|
|
- cy.url().should('include', '/example');
|
|
|
- cy.get('[data-test="example-page-title"]').should(
|
|
|
- 'contain',
|
|
|
- 'Hello, Plugin!',
|
|
|
- );
|
|
|
- });
|
|
|
- it('Does not do much! Should fail', () => {
|
|
|
- expect(true).to.equal(false);
|
|
|
- });
|
|
|
+ it('Verify the example page title', () => {
|
|
|
+ cy.get('[data-quickstart-id="qs-nav-home"]').click();
|
|
|
+ cy.get('[data-test="nav"]').contains('Plugin Example').click();
|
|
|
+ cy.url().should('include', '/example');
|
|
|
+ cy.get('[data-test="example-page-title"]').should(
|
|
|
+ 'contain',
|
|
|
+ 'Hello, Plugin!',
|
|
|
+ );
|
|
|
});
|
|
|
-}
|
|
|
+});
|