-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solution #306
base: main
Are you sure you want to change the base?
Solution #306
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,29 @@ | ||
import HomeAndCataloguePageObject | ||
from '../support/pages/homeCatalogue.pageObject'; | ||
|
||
const homePage = new HomeAndCataloguePageObject(); | ||
/// <reference types='cypress' /> | ||
|
||
describe('', () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
before(() => { | ||
|
||
homePage.visit(); | ||
}); | ||
|
||
it('', () => { | ||
|
||
it('should allow a user to add a product to the car', () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
homePage.clickOnLinkOther('Laptops'); | ||
cy.get('.hrefch').contains('a', 'Sony vaio i7').click(); | ||
cy.get('.col-sm-12 > .btn').click(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After clicking 'Add to cart', you should assert the message in the alert to ensure it matches the expected result as per the task requirements. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There should be an assertion here to verify that an alert is shown after clicking the button to add a product to the cart. This is crucial to ensure that the action was successful. |
||
cy.url().should('include', '#'); | ||
cy.get('#cartur').click(); | ||
cy.url().should('include', 'cart.html'); | ||
cy.get('[data-target="#orderModal"').click(); | ||
cy.get('#name').type('Roma'); | ||
cy.get('#country').type('Uk'); | ||
cy.get('#city').type('Lviv'); | ||
cy.get('#card').type('12345678'); | ||
cy.get('#month').type('September'); | ||
cy.get('#year').type('2024'); | ||
cy.get('[onclick="purchaseOrder()"]').click(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There should be an assertion to verify that the entered data is shown on the modal after clicking 'Purchase'. This is required to ensure the test case meets the task requirements. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding assertions to verify that the entered data is correctly shown on the modal after clicking 'Purchase'. This will ensure that the data is being handled correctly. |
||
homePage.clickOnButton('OK'); | ||
}); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
describe
block is missing a description. It's important to provide a meaningful description to understand what this test suite is about.