Skip to content

Commit

Permalink
fix(Added Cypress Market e2e Tests): Using the Cypress API to find bu…
Browse files Browse the repository at this point in the history
…ild request bid button.
  • Loading branch information
thomas-gale committed Mar 28, 2020
1 parent b029b23 commit af94ca6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cypress/integration/basic/window.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,15 @@ context('Window', () => {
cy.visit('http://localhost:3000');
});

it('cy.window() - get the global window object', () => {
// https://on.cypress.io/window
it('get the global window object', () => {
cy.window().should('have.property', 'top');
});

it('cy.document() - get the document object', () => {
// https://on.cypress.io/document
it('get the document object', () => {
cy.document().should('have.property', 'charset').and('eq', 'UTF-8');
});

it('cy.title() - get the title', () => {
// https://on.cypress.io/title
it('get the title', () => {
cy.title().should('include', 'bits-to-atoms');
});
});
18 changes: 18 additions & 0 deletions cypress/integration/market/market.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
context('Market', () => {
beforeEach(() => {
cy.visit('http://localhost:3000');
});

it('get the first build request summary', () => {
cy.wait(100);
cy.contains('Build Request');
});

it('bid on first build request summary', () => {
// Act
cy.wait(100);
cy.contains('Build Request').parent().find('button').click();
cy.wait(100);
});

});

0 comments on commit af94ca6

Please sign in to comment.