Test/783 cypress tags (#1428)

* test: add tags for slow tests

* chore: remove old flows

* test: added smoke tags to view tests

* test: add tags for trading tests

* test: tags for explorer tests added

* chore: add tags to remaining tests and tidy files

* chore: pass env in test command

* chore: fix build errors

* chore: re-add teardown for manual flow

* chore: ability to only run smoke tests in manual flow

* chore: fix manual input flow
This commit is contained in:
Joe Tsang
2022-09-22 18:40:11 +01:00
committed by GitHub
parent c3cdcede9f
commit ac16ca9ee5
65 changed files with 3481 additions and 3943 deletions
+8 -1
View File
@@ -4,12 +4,16 @@ module.exports = defineConfig({
projectId: 'et4snf',
e2e: {
setupNodeEvents(on, config) {
require('cypress-grep/src/plugin')(config);
return config;
},
baseUrl: 'http://localhost:3000',
fileServerFolder: '.',
fixturesFolder: false,
specPattern: '**/*.cy.{js,jsx,ts,tsx}',
modifyObstructiveCode: false,
supportFile: './src/support/index.ts',
supportFile: './src/support/index.js',
video: false,
videoUploadOnPasses: false,
videosFolder: '../../dist/cypress/apps/explorer-e2e/videos',
@@ -24,5 +28,8 @@ module.exports = defineConfig({
ethUrl: 'https://ropsten.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8',
commitHash: 'dev',
tsConfig: 'tsconfig.json',
grepTags: '@regression @smoke @slow',
grepFilterSpecs: true,
grepOmitFiltered: true,
},
});
@@ -1,6 +1,6 @@
import '../support/common.functions';
context('Asset page', function () {
context('Asset page', { tags: '@regression' }, function () {
describe('Verify elements on page', function () {
const assetsNavigation = 'a[href="/assets"]';
const assetHeader = '[data-testid="asset-header"]';
@@ -1,6 +1,6 @@
import '../support/common.functions';
context('Blocks page', function () {
context('Blocks page', { tags: '@regression' }, function () {
before('visit token home page', function () {
cy.visit('/');
});
+1 -1
View File
@@ -3,7 +3,7 @@ context('Home Page', function () {
cy.visit('/');
});
describe('Stats page', function () {
describe('Stats page', { tags: '@smoke' }, function () {
const statsValue = '[data-testid="stats-value"]';
it('Should show connected environment', function () {
@@ -1,7 +1,7 @@
import '../support/common.functions';
//Tests set to skip until market bug for capsule checkpoint is fixed
context.skip('Market page', function () {
context.skip('Market page', { tags: '@regression' }, function () {
describe('Verify elements on page', function () {
const marketHeaders = '[data-testid="markets-header"]';
const marketNavigation = 'a[href="/markets"]';
@@ -1,6 +1,6 @@
import '../support/common.functions';
context('Network parameters page', function () {
context('Network parameters page', { tags: '@smoke' }, function () {
before('visit token home page', function () {
cy.visit('/');
});
@@ -3,7 +3,7 @@ const nodeErrorMsg = 'node-error-message';
const nodeId = 'node-url-0';
const customNodeBtn = 'custom-node';
context.skip('Node switcher', function () {
context.skip('Node switcher', { tags: '@regression' }, function () {
beforeEach('visit home page', function () {
cy.intercept('GET', 'https://static.vega.xyz/assets/capsule-network.json', {
hosts: ['http://localhost:3028/query'],
@@ -4,7 +4,7 @@ context.skip('Transactions page', function () {
cy.visit('/');
});
describe('Verify elements on page', function () {
describe('Verify elements on page', { tags: '@regression' }, function () {
const transactionNavigation = 'a[href="/txs"]';
const transactionRow = 'transaction-row';
const txHash = 'hash';
@@ -1,6 +1,6 @@
import '../support/common.functions';
context('Validator page', function () {
context('Validator page', { tags: '@smoke' }, function () {
describe('Verify elements on page', function () {
const validatorNavigation = 'a[href="/validators"]';
-2
View File
@@ -1,2 +0,0 @@
// type definitions for Cypress object "cy"
/// <reference types="cypress" />
@@ -14,3 +14,5 @@
// ***********************************************************
import '@vegaprotocol/cypress';
import registerCypressGrep from 'cypress-grep';
registerCypressGrep();
+1 -1
View File
@@ -4,7 +4,7 @@
"jsx": "react-jsx",
"sourceMap": false,
"outDir": "../../dist/out-tsc",
"types": ["cypress", "node"],
"types": ["cypress", "node", "cypress-grep"],
"allowJs": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,