github.com/rancher/elemental/tests@v0.0.0-20240517125144-ae048c615b3f/cypress/latest/e2e/unit_tests/elemental_operator.spec.ts (about) 1 /* 2 Copyright © 2022 - 2024 SUSE LLC 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 http://www.apache.org/licenses/LICENSE-2.0 8 Unless required by applicable law or agreed to in writing, software 9 distributed under the License is distributed on an "AS IS" BASIS, 10 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 See the License for the specific language governing permissions and 12 limitations under the License. 13 */ 14 15 import '~/support/commands'; 16 import filterTests from '~/support/filterTests.js'; 17 import * as cypressLib from '@rancher-ecp-qa/cypress-library'; 18 import { qase } from 'cypress-qase-reporter/dist/mocha'; 19 import { isCypressTag, isOperatorVersion, isRancherManagerVersion } from '~/support/utils'; 20 import { Elemental } from '~/support/elemental'; 21 import { slowCypressDown } from 'cypress-slow-down' 22 23 // slow down each command by 500ms 24 slowCypressDown(500) 25 26 filterTests(['main', 'upgrade'], () => { 27 Cypress.config(); 28 describe('Install Elemental Operator', () => { 29 const elemental = new Elemental(); 30 const upgrade_from_version = Cypress.env('upgrade_from_version'); 31 32 beforeEach(() => { 33 cy.login(); 34 cy.visit('/'); 35 cypressLib.burgerMenuToggle(); 36 }); 37 // Add dev repo for main test or if the test runs on rancher 2.7 (because operator is not in the 2.7 marketplace) 38 if (!isOperatorVersion('marketplace') && isCypressTag('main') || isRancherManagerVersion('2.7')) { 39 it('Add local chartmuseum repo', () => { 40 cypressLib.addRepository('elemental-operator', Cypress.env('chartmuseum_repo')+':8080', 'helm', 'none'); 41 }); 42 qase(10, 43 it('Install latest dev Elemental operator', () => { 44 elemental.installElementalOperator(upgrade_from_version); 45 }) 46 ); 47 } else if (!isRancherManagerVersion('2.7')) { 48 qase(57, 49 it('Install latest stable Elemental operator', () => { 50 elemental.installElementalOperator(upgrade_from_version); 51 }) 52 ); 53 }; 54 }); 55 });