chore: add regression tagged tests to PR runs (#2242)
* chore: fix trading-portfolio test * chore: fix wallet connect * chore: fix failing deal ticket validation test * chore: add regression tagged tests to be run during pr checks * chore: skip parties tests in explorer-e2e Co-authored-by: maciek <maciek@vegaprotocol.io>
This commit is contained in:
parent
96e082cb5d
commit
c60e5841f7
2
.github/workflows/capsule-cypress.yml
vendored
2
.github/workflows/capsule-cypress.yml
vendored
@ -67,4 +67,4 @@ jobs:
|
||||
project: ${{ needs.pr.outputs.projects }}
|
||||
vega-version: ${{needs.pr.outputs.vega-version}}
|
||||
gobin: ${{needs.pr.outputs.gobin}}
|
||||
tags: "--env.grepTags='@smoke'"
|
||||
tags: "--env.grepTags='[@smoke, @regression]'"
|
||||
|
@ -14,7 +14,9 @@ let assetData = {
|
||||
|
||||
const assetsInTest = Object.keys(assetData);
|
||||
|
||||
context('Parties page', { tags: '@regression' }, function () {
|
||||
// skipped due to existing issue
|
||||
// https://github.com/vegaprotocol/frontend-monorepo/issues/2243
|
||||
context.skip('Parties page', { tags: '@regression' }, function () {
|
||||
before('send-faucet assets to connected vega wallet', function () {
|
||||
assetsInTest.forEach((asset) => {
|
||||
cy.vega_wallet_receive_fauceted_asset(
|
||||
|
@ -718,7 +718,7 @@ describe('account validation', { tags: '@regression' }, () => {
|
||||
);
|
||||
cy.getByTestId('dealticket-warning-margin').should(
|
||||
'contain.text',
|
||||
'10,000 tBTC currently required, 1,000 tBTC available'
|
||||
'10,000.00 tBTC currently required, 1,000.00 tBTC available'
|
||||
);
|
||||
cy.getByTestId('deal-ticket-deposit-dialog-button').click();
|
||||
cy.getByTestId('dialog-content')
|
||||
|
@ -4,7 +4,7 @@ import { connectVegaWallet } from '../support/vega-wallet';
|
||||
import { generateAssets } from '../support/mocks/generate-assets';
|
||||
import { generateMarkets } from '../support/mocks/generate-markets';
|
||||
|
||||
describe('Portfolio page', { tags: '@regression' }, () => {
|
||||
describe('Portfolio page', { tags: '@smoke' }, () => {
|
||||
beforeEach(() => {
|
||||
cy.mockGQL((req) => {
|
||||
aliasQuery(req, 'LedgerEntries', generateLedgerEntries());
|
||||
@ -17,7 +17,7 @@ describe('Portfolio page', { tags: '@regression' }, () => {
|
||||
it('List should be properly rendered', () => {
|
||||
cy.visit('/#/portfolio');
|
||||
connectVegaWallet();
|
||||
cy.get('[data-testid="Ledger entries"]').click();
|
||||
cy.getByTestId('"Ledger entries"').click();
|
||||
const headers = [
|
||||
'Sender',
|
||||
'Receiver',
|
||||
@ -26,7 +26,7 @@ describe('Portfolio page', { tags: '@regression' }, () => {
|
||||
'Asset',
|
||||
'Vega Time',
|
||||
];
|
||||
cy.get('.ag-header-row.ag-header-row-column').within(($headers) => {
|
||||
cy.getByTestId('tab-ledger-entries').within(($headers) => {
|
||||
cy.wrap($headers)
|
||||
.get('.ag-header-cell-text')
|
||||
.each(($header, i) => {
|
||||
|
@ -5,6 +5,7 @@ import { useMarketPositions } from './use-market-positions';
|
||||
import type { EstimateOrderQuery } from './__generated__/EstimateOrder';
|
||||
import { useEstimateOrderQuery } from './__generated__/EstimateOrder';
|
||||
import type { MarketDealTicket } from '@vegaprotocol/market-list';
|
||||
import { getDerivedPrice } from '../utils/get-price';
|
||||
|
||||
export interface Props {
|
||||
order: OrderSubmissionBody['orderSubmission'];
|
||||
@ -36,18 +37,19 @@ export const useOrderMargin = ({
|
||||
derivedPrice,
|
||||
}: Props): OrderMargin | null => {
|
||||
const marketPositions = useMarketPositions({ marketId: market.id, partyId });
|
||||
const priceForEstimate = derivedPrice || getDerivedPrice(order, market);
|
||||
|
||||
const { data } = useEstimateOrderQuery({
|
||||
variables: {
|
||||
marketId: market.id,
|
||||
partyId,
|
||||
price: derivedPrice,
|
||||
price: priceForEstimate,
|
||||
size: removeDecimal(order.size, market.positionDecimalPlaces),
|
||||
side: order.side,
|
||||
timeInForce: order.timeInForce,
|
||||
type: order.type,
|
||||
},
|
||||
skip: !partyId || !market.id || !order.size || !derivedPrice,
|
||||
skip: !partyId || !market.id || !order.size || !priceForEstimate,
|
||||
});
|
||||
|
||||
if (data?.estimateOrder.marginLevels.initialLevel) {
|
||||
|
Loading…
Reference in New Issue
Block a user