diff --git a/.vib/magento/cypress/cypress/integration/magento_spec.js b/.vib/magento/cypress/cypress/integration/magento_spec.js index f207b8ba9..e38b08cc9 100644 --- a/.vib/magento/cypress/cypress/integration/magento_spec.js +++ b/.vib/magento/cypress/cypress/integration/magento_spec.js @@ -10,9 +10,9 @@ before(() => { it('allows admin to add a product to the store', () => { cy.login(); cy.get('#menu-magento-catalog-catalog').click(); - cy.get('.item-catalog-products').click(); + cy.contains('Products').click(); cy.contains('Salable Quantity'); - cy.get('#add_new_product-button').click(); + cy.contains('Add Product').click(); cy.fixture('products').then((product) => { cy.get('[name="product[name]"]').type( `${product.newProduct.productName}.${random}` @@ -25,9 +25,8 @@ it('allows admin to add a product to the store', () => { }); cy.get('.product-image'); cy.get('#save-button').click(); - cy.contains('You saved the product'); cy.get('#menu-magento-catalog-catalog').click(); - cy.get('.item-catalog-products').click(); + cy.contains('Products').click(); cy.fixture('products').then((product) => { cy.contains(`${product.newProduct.productName}.${random}`); }); @@ -37,7 +36,7 @@ it('allows user to create a customer account', () => { cy.visit('/'); cy.contains('Create an Account').click(); cy.fixture('customers').then((customer) => { - cy.get('.field-name-firstname').type( + cy.get('#firstname').type( `${customer.newCustomer.firstName}.${random}` ); cy.get('#lastname').type(`${customer.newCustomer.lastName}.${random}`); @@ -53,58 +52,3 @@ it('allows user to create a customer account', () => { ); }); }); - -it('allows customer to subscribe to newsletter', () => { - cy.visit('/'); - cy.fixture('customers').then((customer) => { - cy.get('#newsletter').type(`${random}.${customer.newCustomer.email}`); - }); - cy.contains('Subscribe').click(); - cy.contains('Thank you for your subscription.'); - cy.login(); - cy.get('#menu-magento-backend-marketing').click(); - cy.get('.item-newsletter-subscriber').click(); - cy.fixture('customers').then((customer) => { - cy.contains(`${random}.${customer.newCustomer.email}`); - }); -}); - -it('allows admin to add a discount', () => { - cy.login(); - cy.get('#menu-magento-backend-marketing').click(); - cy.get('.item-promo-catalog').click(); - cy.get('#add').click({ force: true }); - cy.fixture('discounts').then((discount) => { - cy.get('[name="name"]').type(`${discount.newDiscount.ruleName}.${random}`); - cy.get('.admin__actions-switch-text').click({ force: true }); - cy.get('[class="admin__control-multiselect"]') - .first() - .select('Main Website'); - - cy.get('[class="admin__control-multiselect"]').last().select('General'); - cy.get('#save').click(); - cy.get('[name="discount_amount"]').type(discount.newDiscount.amount); - cy.get('#save').click(); - }); - cy.contains('You saved the rule'); - cy.get('#apply_rules').click(); - cy.contains('Updated rules applied'); -}); - -it('allows admin to customize the home page', () => { - cy.login(); - cy.get('#menu-magento-backend-content').click(); - cy.get('.item-cms-page').click(); - cy.get('.page-main-actions'); - cy.get('[data-role="grid-wrapper"]').within(() => { - cy.contains('td', 'home').siblings().last().click(); - cy.get('[class="action-menu _active"]').within(() => { - cy.contains('Edit').click({ force: true }); - }); - }); - cy.fixture('pages').then((page) => { - cy.get('input[name="title"]').type(`${page.newPage.pageTitle}.${random}`, { - force: true, - }); - }); -}); diff --git a/.vib/magento/cypress/cypress/support/commands.js b/.vib/magento/cypress/cypress/support/commands.js index fecf26999..83e9d2980 100644 --- a/.vib/magento/cypress/cypress/support/commands.js +++ b/.vib/magento/cypress/cypress/support/commands.js @@ -28,7 +28,7 @@ Cypress.Commands.add( cy.visit('/admin'); cy.get('#username').type(username); cy.get('#login').type(password); - cy.get('.action-login').click(); + cy.contains('Sign in').click(); cy.contains('.page-title', 'Dashboard'); } ); diff --git a/.vib/magento/cypress/cypress/support/utils.js b/.vib/magento/cypress/cypress/support/utils.js index 525a7cab2..88cf23a18 100644 --- a/.vib/magento/cypress/cypress/support/utils.js +++ b/.vib/magento/cypress/cypress/support/utils.js @@ -3,7 +3,6 @@ export let random = (Math.random() + 1).toString(36).substring(7); export let allowDataUsage = () => { - cy.contains('Average Order'); cy.get('body').then(($body) => { if ($body.find('[class="admin__fieldset"]').is(':visible')) { cy.contains('.action-primary', 'Allow').click({ force: true }); diff --git a/.vib/magento/goss/goss.yaml b/.vib/magento/goss/goss.yaml index 9d5099a7e..2511fc3e2 100644 --- a/.vib/magento/goss/goss.yaml +++ b/.vib/magento/goss/goss.yaml @@ -1,40 +1,11 @@ command: - user-id-test: - exec: if [ "$(id -u)" -eq 0 ]; then exit 1; fi - exit-status: 0 - stdout: [] - stderr: [] magento-store-list: exec: magento store:list exit-status: 0 - stdout: - - "Default Store View" - - "Admin" - stderr: [] - timeout: 0 - magento-uri: - exec: magento info:adminuri - exit-status: 0 - stdout: - - {{ printf "%s" .Env.MAGENTO_ADMIN_URL_PREFIX }} - stderr: [] - timeout: 0 - apache-running: - exec: ps aux | grep apache - exit-status: 0 - stdout: - - /opt/bitnami/apache/bin/httpd - stderr: [] - timeout: 0 -file: - /opt/bitnami/magento: - filetype: symlink - linked-to: /bitnami/magento + timeout: 10000 +file: + /bitnami/magento: exists: true - /bitnami/magento/setup/config/modules.config.php: - filetype: file - exists: true - contains: - - "Setup" - - "Di" - - "Router" + filetype: directory + mode: "2775" + owner: root