Skip to content

Commit

Permalink
test: Resolving test timeout errors (temporary or not?)
Browse files Browse the repository at this point in the history
  • Loading branch information
vulcangz committed Feb 23, 2021
1 parent 998242c commit 5b1a190
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions cypress/integration/Map.js → cypress/integration/Map.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@ context('Actions', () => {
beforeEach(() => {
cy.visit('http://localhost:5000');
});

// Timeout solution
// @see https://github.com/cypress-io/cypress/issues/2549#issuecomment-663514072
afterEach(function () {
const testFailed = this.currentTest.err;
if (testFailed) {
cy.window().should("exist")
}
})

// @todo Timeout error to be resolved
it('Should render example1 map with center marker', () => {
cy.findByText('this is a map base demo').should('exist')
cy.findByText('this is a map base demo').should('exist')
});

it('Example1 map contains label "中国国家博物馆"', () => {
Expand All @@ -24,4 +34,4 @@ context('Actions', () => {
it('Example2 map should contain copyright control content', () => {
cy.findByText('寄诸佛子,共结来缘。').should('exist');
});
});
});

0 comments on commit 5b1a190

Please sign in to comment.