-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* configuration of cypress component tests * sample component test Co-authored-by: Sanghavi <avanti.sanghavi@aspentech.com>
- Loading branch information
Showing
29 changed files
with
17,904 additions
and
7,686 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { defineConfig } from "cypress"; | ||
import getCompareSnapshotsPlugin from "cypress-image-diff-js/dist/plugin"; | ||
|
||
export default defineConfig({ | ||
component: { | ||
devServer: { | ||
framework: "create-react-app", | ||
bundler: "webpack", | ||
}, | ||
video:false, | ||
setupNodeEvents(on, config) { | ||
getCompareSnapshotsPlugin(on, config), | ||
on('before:browser:launch', (browser = {}, launchOptions) => { | ||
if (browser.family === 'chromium' && browser.name !== 'electron') { | ||
launchOptions.args.push('--start-fullscreen') | ||
|
||
return launchOptions | ||
} | ||
if (browser.name === 'electron') { | ||
launchOptions.preferences.fullscreen = true | ||
|
||
return launchOptions | ||
} | ||
}) | ||
} | ||
}, | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/// <reference types="cypress" /> | ||
import * as React from "react"; | ||
import { mount, unmount } from "@cypress/react"; | ||
import { composeStories } from "@storybook/testing-react"; | ||
import { render } from "@testing-library/react"; | ||
|
||
import * as stories from "../../src/lib/components/DeckGLMap/storybook/DeckGLMap.stories"; | ||
|
||
const { Default } = composeStories(stories); | ||
|
||
render(<Default />).unmount(); | ||
|
||
describe("Map Story Tests", () => { | ||
it("activate hooks",() => { | ||
Cypress.on('fail', (error, runnable) => { | ||
if (error.message.includes('not to exist in the DOM, but it was continuously found')) { | ||
return false | ||
} | ||
}) | ||
mount(<Default />) | ||
cy.get("svg[role='progressbar']") | ||
cy.get("svg[role='progressbar']", {timeout: 30000}).should("not.exist") | ||
}) | ||
it("should diplay default story",() => { | ||
mount(<Default />); | ||
cy.get("svg[role='progressbar']") | ||
cy.get("svg[role='progressbar']", {timeout: 30000}).should("not.exist") | ||
cy.wait(1000) | ||
cy.compareSnapshot('default-map-story') | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/// <reference types="cypress" /> | ||
import * as React from "react"; | ||
import { mount } from "@cypress/react"; | ||
import { composeStories } from "@storybook/testing-react"; | ||
//import { render } from "@testing-library/react"; | ||
|
||
import * as stories from "../../src/lib/components/DeckGLMap/layers/wells/wellsLayer.stories"; | ||
|
||
const { VolveWells, DashedWells, CustomColoredWells, CustomWidthWells } = | ||
composeStories(stories); | ||
|
||
//render().unmount(); | ||
|
||
xdescribe("Wells", () => { | ||
it("should display volve wells story", () => { | ||
mount(<VolveWells />); | ||
cy.wait(5000); | ||
}); | ||
it("should display dashed wells", () => { | ||
mount(<DashedWells />); | ||
cy.wait(5000); | ||
}); | ||
it("should display custom color wells", () => { | ||
mount(<CustomColoredWells />); | ||
cy.wait(5000); | ||
}); | ||
it("should display custom color wells", () => { | ||
mount(<CustomWidthWells />); | ||
cy.wait(5000); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
125 changes: 0 additions & 125 deletions
125
react/cypress/integration/deckgl_map/layer_selection.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.