Giter VIP home page Giter VIP logo

e2e-testsuite-platform's Introduction

Build Status Scrutinizer Code Quality Latest Stable Version Total Downloads Crowdin License GitHub closed pull requests Slack

Shopware

Modern open source e-Commerce

Tweet

Shopware 6 is an open headless commerce platform powered by Symfony 7 and Vue.js 3 that is used by thousands of shops and supported by a huge, worldwide community of developers, agencies and merchants.

If you like Shopware 6, give us a ⭐️  on Github!

Table of contents

Project overview

To discover the features of Shopware and what sets us apart from other e-commerce systems, take the feature tour on the Shopware home page.

From a developer's perspective, here are some highlights that make Shopware easy and fun to work with:

Platform and Framework

Shopware itself is based mainly on Symfony and VueJS. It is a fully functional e-commerce platform, but it is also an e-commerce framework.

Shopware is:

Installation

Extending Shopware

There are already a lot of extensions available in the Shopware store.

After setting up Shopware locally for development, you can start with our extension guides in the documentation.

The preferred way of extending Shopware is through the App System. If the feature you want to implement needs direct access to the Shopware process and the database, you can also use the plugin system.
You can find an overview and differentiation in the documentation.

Production setup

The easiest way to run a Shopware shop is booking a commercial plan in the Shopware cloud, a fully managed setup, ready to use.

The recommended way for on-premise shops is installing Shopware through the flex template. To unlock the full potential Shopware has to offer, commercial plans are also available for on-premise.
These plans enrich your shop with unique functionality, giving you an additional advantage over your competition.

There is a list of hosting partners, who offer a pre-installed shop, making your start a lot faster.

We also provide a web-based installer, the documentation walks you through the necessary steps.

Code Contribution

If you have decided to contribute code to Shopware and become a member of the Shopware community, we appreciate your hard work and want to handle it with the most possible respect. To ensure the quality of our code and our products we have created a guideline we all should endorse to. It helps you and us to collaborate. Following these guidelines will help us to integrate your changes in our daily workflow.

Read more in our contribution guideline or in our short HowTo contribute code.

Contribution setup

There are multiple ways to get an installation running, the way with the fewest steps involved is using the contribute image from dockware, a community maintained docker setup by the Shopware agency dasistweb. More on this in the documentation.

The Shopware CLA

When submitting your code to Shopware you automatically need to sign our CLA (Contributor License Agreement). This CLA ensures that Shopware will stay an open and living product. In short, you give the explicit right to use your code in Shopware to shopware AG.

Authors & Contributors

Shopware is built with the help of our community.

You can find an overview of everyone who contributed to the platform repository in the official github overview. Additionally there are numerous people contributing to the ecosystem through activities not related to the codebase. Thank you all for being part of this!

License

Shopware 6 is completely free and released under the MIT License.

Bugs & Feedback

No software is perfect, Shopware is no exception. Should you spot a bug, please report it in our issue tracker.

If you want to suggest features or how certain parts of Shopware 6 work, we'd be happy to hear from you.

Reporting security issues

Please have a look at our security policy.

e2e-testsuite-platform's People

Contributors

bschulzebaek avatar burnett01 avatar dependabot[bot] avatar dominik28111 avatar jleifeld avatar keulinho avatar klarstil avatar leichteckig avatar lernhart avatar maltejanz avatar marcelbrode avatar niklaslimberg avatar powli avatar pweyck avatar seggewiss avatar shyim avatar silverduy avatar sydinh avatar taltholtmann avatar trandangtri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

e2e-testsuite-platform's Issues

package-lock.json modified after first installation

Hi friends,

thx a lot for this project and your testing passion. I want to do more things with this repo now and also contribute and push it to YouTube.

After first installation i see package lock is modified. Maybe a good point for a first PR. Should I add it to gitignore file?

See you
Roland

BUG: cy.createGuestOrder(product, UserData) & QUESTION: /checkout/register e2e test

Using cy.createGuestOrder(product, UserData) will give this error in the latest clean build (shopware) version.

sales-channel-api/v1/checkout/guest-order 400 (Bad Request)
VIOLATION::IS_BLANK_ERROR

  • /billingAddress/street
  • /billingAddress/zipcode
  • /billingAddress/city

To fix this problem I hard coded this file:
custom/plugins/x/src/Resources/app/storefront/test/e2e/node_modules/@shopware-ag/e2e-testsuite-platform/cypress/support/service/saleschannel/fixture/order.fixture.js

 customerRawData = this.mergeFixtureWithData(customerRawData, {
                    salutationId: salutation.id,
                    billingAddress: {
                        salutationId: salutation.id,
                        countryId: country.id
                    }
                });

Into

 customerRawData = this.mergeFixtureWithData(customerRawData, {
                    salutationId: salutation.id,
                    billingAddress: {
                        salutationId: salutation.id,
                        countryId: country.id,
                        street: 'streetname',
                        zipcode: '1151',
                        city: 'test'
                    }
                });

Then I get the correct data.

But I don't understand how to do e2e test this page /checkout/register
1.)
I thought these were the right steps.

  • cy.getRandomProductInformationForCheckout()
  • cy.createCustomerFixture()
  • cy.createGuestOrder(product.id, customer) (This was a test)
  • cy.visit('/checkout/register');

But when I do this, I cart is still empty without products.

2.)
Or do I need to use some posts (this give the same empty cart problem)

cy.storefrontApiRequest('POST', 'checkout/cart').then((result) => {

3.)
Or do I use cypress old school by navigate to the random product url, and search for the "add to cart" button, and than go to the checkout/register page

The full test code at the moment.
It would be cool if someone can give a working example.

I'm using 3 fixtures

  • fixtures/customer.json
  • customer-address.json
  • storefront-custumer.json
describe(`Test custom cart`, () => {
    beforeEach(() => {
        cy.getRandomProductInformationForCheckout().then((product) => {

            /* randomProductInformation
            gross: undefined
            id: "e81792a4772d4058bd0d546cdc7f3b3e"
            listingPrice: undefined
            name: "Synergistic Silk Balkan Beef"
            net: undefined
            url: "/detail/e81792a4772d4058bd0d546cdc7f3b3e"
             */

            // This is a empty cart.
            // cy.storefrontApiRequest('POST', 'checkout/cart').then((result) => {
            //     cy.storefrontApiRequest('POST', 'checkout/cart/product/' + product.id, {}, {
            //         type: 'product',
            //         referencedId: product.id,
            //         stackable: true
            //     }).then((result) => {
            //
            //         /* result
            //         affiliateCode: null
            //         campaignCode: null
            //         customerComment: null
            //         deliveries: [{…}]
            //         errors: []
            //         extensions: []
            //         lineItems: [{…}]
            //         modified: false
            //         name: "8a243080f92e4c719546314b577cf82b"
            //         price: {netPrice: 571.43, totalPrice: 680, calculatedTaxes: Array(1), taxRules: Array(1), positionPrice: 680, …}
            //         token: "UukzY0WR2wiBRQR8pWakoCvILrrfci2i"
            //         transactions: [{…}]
            //          */
            //         cy.visit('/checkout/register');
            //     })
            // })

            // this is a empty cart
            cy.createCustomerFixture().then((customer) => {

                /* customer
                attributes: {groupId: "cfbd5018d38d41d8adca10d94fc8bdd6", defaultPaymentMethodId: "ad2b1901d4794969b31cb9b4f887f931", salesChannelId: "9ee6c53d577b456c9aaaea01f9227fbc", languageId: "2fbb5fe2e29a4d70aa5854ce7ce3e20b", lastPaymentMethodId: null, …}
                id: "c4b9353fca2e43819d7b16b9c7c8baa6"
                links: {self: "http://shopware-address-lookup.nl.shopware/api/v1/customer/c4b9353fca2e43819d7b16b9c7c8baa6"}
                meta: null
                relationships: {group: {…}, defaultPaymentMethod: {…}, salesChannel: {…}, language: {…}, lastPaymentMethod: {…}, …}
                type: "customer"
                 */

                return customer
            }).then((customer) => {
             //   console.log(randomProductInformation, customer)

                cy.createGuestOrder(product.id, customer).then( (guestOrder) => {

                    // console.log(guestOrder)
                    /* guestOrder
                    data: {orderNumber: "10066", currencyId: "b7d2554b0ce847cd82f3ac9bd1c0dfca", currencyFactor: 1, salesChannelId: "9ee6c53d577b456c9aaaea01f9227fbc", billingAddressId: "6e0ca916373d42c3a0e6efcd9efd6c57", …}
                    sw-context-token: "FZf3EIG1BJf7cHUEUwgxzjN00dF9CcER"
                     */

                    cy.visit('/checkout/register');
                });
            })

        })
    });


    it('Check things', () => {
        console.log('oke')
    });
});

SearchAdminViaAPI always returns empty array in gitlab CI

trying to retrieve the ID of a customer entity from Shopware using the function. It works fine when I run cypress locally, but in CI it always returns an empty object. The baseUrl is the same both locally and on CI. What could the issue be?

uuid version and support index.js require seems not working

After a fresh installation of the test suite, I kept getting the error that the uuid/v4 module cannot be found. After installing uuid 3.3.2 it worked then. Either the version of uuid must be set to 3.3.x or the require in the cypress/support/index.js has to be modified from

const uuid = require('uuid/v4');

To

const { v4: uuidv4 } = require('uuid');

Storefront: The provided CSRF token is not valid

I am trying to login the user within the storefront to buy a product.
But I am getting always The provided CSRF token is not valid from Shopware.

Login Test
it('Login', () => {
        cy.get('.login-collapse-toggle').click()
        cy.get('#loginMail')
            .type('[email protected]')
            .should('have.value', '[email protected]')
        cy.get('#loginPassword')
            .type('shopware')
        cy.get('.login-form').submit() 
      })
Register Test
    it('Register test customer', () => {

        cy.get('#personalSalutation').select('Mr.')

        cy.get('#personalFirstName')
            .type('Max')
            .should('have.value', 'Max')

        cy.get('#personalLastName')
            .type('Mustermann')
            .should('have.value', 'Mustermann')

        cy.get('#personalGuest').check({force: true})

        cy.get('#personalMail')
            .type('[email protected]')
            .should('have.value', '[email protected]')

        cy.get('#billingAddressAddressStreet')
            .type('Musterstrasse 1')
            .should('have.value', 'Musterstrasse 1')

        cy.get('#billingAddressAddressZipcode')
            .type('12345')
            .should('have.value', '12345')

        cy.get('#billingAddressAddressCity')
            .type('Musterhausen')
            .should('have.value', 'Musterhausen')

        cy.get('#billingAddressAddressCountry').select('Germany')

        cy.get('#billingAddressAddressCountryState').select('Berlin')

        cy.get('.register-form').submit() 
    })

How can i send a form within the storefront without having the CSRF issue?
I also tried to register a user - But still the same problem with the CSRF token.

Environment variable for API versioning in Shopware

In #18 the need for an environment variable for Shopware's API versions came up, see quote:

Personally I'm not a big fan of changing the API version this many times. We can't ensure the project which uses this package supports the hardcoded API version. As a proposal to solve the problem we should come up with an environment / config variable which contains the API version the test platform should use.

This way the project which uses this package can define the version they would like to use instead of constantly bumping up the API version in the URLs itself.

See:

* https://docs.cypress.io/guides/guides/environment-variables.html#Setting

Shopware version and Testsuite version compatibility

Hi! Which https://www.npmjs.com/package/@shopware-ag/e2e-testsuite-platform should I use with Shopware 6.3.1.1? When I use 3.0.7 then I bacome an error:

TypeError
Cannot read properties of undefined (reading 'id')

Because this error occurred during a before each hook we are skipping the remaining tests in the current suite: PluginCypressTests: Test ba...
node_modules/@shopware-ag/e2e-testsuite-platform/cypress/support/service/administration/fixture/product.fixture.js:23:1
  21 |             .then(([manufacturer, tax]) => {
  22 |                 return Object.assign({}, {
> 23 |                     taxId: tax.id,
     | ^
  24 |                     manufacturerId: manufacturer.id
  25 |                 }, userData);
  26 |             }).then((finalProductData) => {

Please add delete method

Hi,

could you please add "delete" method to:
e2e-testsuite-platform/cypress/support/service/administration/fixture.service.js

Thanks a lot :)

Axios update

The test-suit currently uses a vulnerable version of axios. See here:

GHSA-cph5-m8f7-6c5x

npm audit-log:

axios  <=0.21.1
Severity: high
Incorrect Comparison in axios - https://github.com/advisories/GHSA-cph5-m8f7-6c5x
No fix available
node_modules/axios
  @shopware-ag/e2e-testsuite-platform  *
  Depends on vulnerable versions of axios
  node_modules/@shopware-ag/e2e-testsuite-platform

Not too critical since it's only a testing framework, but a dependency update would still be nice.

Related: #191

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.