change(ui): added additional stability test, run tests in all browsers, added snapshots
6
.github/workflows/ui-tests.js.yml
vendored
|
|
@ -66,8 +66,12 @@ jobs:
|
|||
run: yarn start &> server.log &
|
||||
- name: Wait for frontend
|
||||
run: npx wait-on http://0.0.0.0:3333
|
||||
- name: Run visual tests
|
||||
- name: \[Chrome\] Run visual tests
|
||||
run: yarn cy:test
|
||||
- name: \[Firefox\] Run visual tests
|
||||
run: yarn cy:test-firefox
|
||||
- name: \[Edge\] Run visual tests
|
||||
run: yarn cy:test-edge
|
||||
- name: Upload Debug
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ import { defineConfig } from "cypress";
|
|||
import {addMatchImageSnapshotPlugin} from 'cypress-image-snapshot/plugin';
|
||||
export default defineConfig({
|
||||
e2e: {
|
||||
viewportHeight: 900,
|
||||
viewportWidth: 1400,
|
||||
baseUrl: 'http://0.0.0.0:3333/',
|
||||
setupNodeEvents(on, config) {
|
||||
// implement node event listeners here
|
||||
|
|
|
|||
34
frontend/cypress/e2e/generalStability.cy.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
describe('Testing general stability', {
|
||||
viewportHeight: 900,
|
||||
viewportWidth: 1400,
|
||||
}, () => {
|
||||
it('Checking if app will crash', () => {
|
||||
cy.intercept('/api/account').as('getAccount')
|
||||
|
||||
cy.visit('/')
|
||||
cy.get(':nth-child(1) > .relative > .p-2').type(Cypress.env('account').replaceAll("\"", ''))
|
||||
cy.get(':nth-child(2) > .relative > .p-2').type(Cypress.env('password').replaceAll("\"", ''))
|
||||
cy.get('.justify-center > .h-10').click()
|
||||
cy.wait('@getAccount')
|
||||
|
||||
cy.get('#search').should('be.visible')
|
||||
|
||||
|
||||
cy.get('[href="/2/dashboard"] > span').click()
|
||||
|
||||
cy.get(':nth-child(1) > .relative > :nth-child(1) > #menu-manage-alerts > .w-full').should('be.visible')
|
||||
|
||||
|
||||
cy.visit('/client/account')
|
||||
|
||||
cy.get(':nth-child(2) > .profileSettings-module__left--D4pCi > .profileSettings-module__info--DhVpL').should('be.visible')
|
||||
|
||||
cy.get(':nth-child(3) > .relative > :nth-child(1) > .sideMenuItem-module__menuItem--UzuXv > .w-full > .sideMenuItem-module__iconLabel--Cl_48 > .sideMenuItem-module__title--IFkbw').click()
|
||||
cy.get(':nth-child(4) > .relative > :nth-child(1) > .sideMenuItem-module__menuItem--UzuXv > .w-full > .sideMenuItem-module__iconLabel--Cl_48 > .sideMenuItem-module__title--IFkbw').click()
|
||||
cy.get(':nth-child(5) > .relative > :nth-child(1) > .sideMenuItem-module__menuItem--UzuXv > .w-full > .sideMenuItem-module__iconLabel--Cl_48 > .sideMenuItem-module__title--IFkbw').click()
|
||||
|
||||
cy.get('.webhooks-module__tabHeader--I0FXb').should('be.visible')
|
||||
|
||||
// if test has not failed, we assume that app is not crashed (so far)
|
||||
})
|
||||
})
|
||||
|
|
@ -13,7 +13,7 @@ describe('Replayer visual match test', {
|
|||
})
|
||||
cy.get(':nth-child(1) > .relative > .p-2').type(Cypress.env('account').replaceAll("\"", ''))
|
||||
cy.get(':nth-child(2) > .relative > .p-2').type(Cypress.env('password').replaceAll("\"", ''))
|
||||
cy.get('.h-10').click()
|
||||
cy.get('.justify-center > .h-10').click()
|
||||
cy.wait('@getAccount')
|
||||
cy.visit('3/session/7585361734083637?jumpto=5000&freeze=true')
|
||||
cy.wait(3000)
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 520 KiB After Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 400 KiB After Width: | Height: | Size: 192 KiB |
|
Before Width: | Height: | Size: 531 KiB After Width: | Height: | Size: 280 KiB |
|
Before Width: | Height: | Size: 439 KiB After Width: | Height: | Size: 192 KiB |
|
After Width: | Height: | Size: 207 KiB |
|
After Width: | Height: | Size: 170 KiB |
|
After Width: | Height: | Size: 222 KiB |
BIN
frontend/cypress/snapshots/replayer.cy.ts/User-Events.snap.png
Normal file
|
After Width: | Height: | Size: 184 KiB |
|
|
@ -18,7 +18,9 @@
|
|||
"build-storybook": "build-storybook",
|
||||
"test": "jest",
|
||||
"cy:open": "cypress open",
|
||||
"cy:test": "cypress run --browser chrome"
|
||||
"cy:test": "cypress run --browser chrome",
|
||||
"cy:test-firefox": "cypress run --browser firefox",
|
||||
"cy:test-edge": "cypress run --browser edge"
|
||||
},
|
||||
"dependencies": {
|
||||
"@floating-ui/react-dom-interactions": "^0.10.3",
|
||||
|
|
|
|||