Merge pull request 'Fix tests andd add catalog view test' (!96) from wbuezas/hedera-web-mindshore:tests-changes into beta
gitea/hedera-web/pipeline/head This commit looks good
Details
gitea/hedera-web/pipeline/head This commit looks good
Details
Reviewed-on: #96 Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
This commit is contained in:
commit
9b26f2dc7f
|
@ -28,6 +28,7 @@ const { t } = useI18n();
|
||||||
height="190px"
|
height="190px"
|
||||||
rounded="bottom"
|
rounded="bottom"
|
||||||
zoom-size="1600x900"
|
zoom-size="1600x900"
|
||||||
|
data-testid="catalogCardImage"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
class="column"
|
class="column"
|
||||||
|
@ -117,6 +118,7 @@ const { t } = useI18n();
|
||||||
rounded-borders="full"
|
rounded-borders="full"
|
||||||
class="q-mr-md"
|
class="q-mr-md"
|
||||||
zoom-size="1600x900"
|
zoom-size="1600x900"
|
||||||
|
data-testid="catalogCardImage"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
|
|
|
@ -192,6 +192,7 @@
|
||||||
:item="_item"
|
:item="_item"
|
||||||
:view-mode="viewMode"
|
:view-mode="viewMode"
|
||||||
@click="showItem(_item)"
|
@click="showItem(_item)"
|
||||||
|
data-testid="catalogCardElement"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<QDialog v-model="showItemDialog" @hide="resetAmounts()">
|
<QDialog v-model="showItemDialog" @hide="resetAmounts()">
|
||||||
|
|
|
@ -42,4 +42,14 @@ describe('CatalogView', () => {
|
||||||
cy.dataCy('catalogGoToBasketButton').click();
|
cy.dataCy('catalogGoToBasketButton').click();
|
||||||
cy.url().should('contain', '/#/ecomerce/basket');
|
cy.url().should('contain', '/#/ecomerce/basket');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('Open item details and image exists', () => {
|
||||||
|
// cy.resetDB();
|
||||||
|
cy.login('developer');
|
||||||
|
cy.createOrderReceiveFlow();
|
||||||
|
cy.addItemToBasketFlow();
|
||||||
|
cy.dataCy('catalogCardElement').first().click();
|
||||||
|
cy.wait(200);
|
||||||
|
cy.dataCy('catalogCardImage').find('img').should('exist');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const checkoutNextStep = () => {
|
const checkoutNextStep = () => {
|
||||||
cy.dataCy('checkoutStepperRightButton').should('be.visible').click();
|
cy.dataCy('checkoutStepperRightButton').last().should('be.visible').click();
|
||||||
};
|
};
|
||||||
|
|
||||||
Cypress.Commands.add('createOrderReceive', () => {
|
Cypress.Commands.add('createOrderReceive', () => {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -36,6 +36,7 @@ requireCommands.keys().forEach(requireCommands);
|
||||||
// Common commands
|
// Common commands
|
||||||
Cypress.Commands.add('selectOption', (selector, option) => {
|
Cypress.Commands.add('selectOption', (selector, option) => {
|
||||||
cy.waitForElement(selector);
|
cy.waitForElement(selector);
|
||||||
|
cy.wait(400);
|
||||||
cy.get(selector).click();
|
cy.get(selector).click();
|
||||||
cy.get('.q-menu .q-item').contains(option).click();
|
cy.get('.q-menu .q-item').contains(option).click();
|
||||||
});
|
});
|
||||||
|
@ -80,7 +81,7 @@ Cypress.Commands.add('setSessionStorage', (key, value) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('resetDB', () => {
|
Cypress.Commands.add('resetDB', () => {
|
||||||
cy.exec('npm run resetDatabase');
|
cy.exec('pnpm run db');
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('setConfirmDialog', () => {
|
Cypress.Commands.add('setConfirmDialog', () => {
|
||||||
|
|
Loading…
Reference in New Issue