test(cypress): clean up nx todos (#4273)

This commit is contained in:
Joe Tsang 2023-07-07 09:23:27 +01:00 committed by GitHub
parent e89b818e4c
commit 4581e117c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 1 additions and 248 deletions

View File

@ -27,11 +27,6 @@ context('Home Page', function () {
16: 'Chain ID', 16: 'Chain ID',
}; };
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get('[data-testid="stats-title"]') cy.get('[data-testid="stats-title"]')
.each(($list, index) => { .each(($list, index) => {
cy.wrap($list).should('contain.text', statTitles[index]); cy.wrap($list).should('contain.text', statTitles[index]);

View File

@ -34,11 +34,6 @@ context('Network parameters page', { tags: '@smoke' }, function () {
const parameterName = network_parameter[0]; const parameterName = network_parameter[0];
const parameterValue = network_parameter[1]; const parameterValue = network_parameter[1];
if (this.networkParameterFormat.json.includes(parameterName)) { if (this.networkParameterFormat.json.includes(parameterName)) {
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get(tableRows) cy.get(tableRows)
.contains(parameterName) .contains(parameterName)
.should('be.visible') .should('be.visible')
@ -70,11 +65,6 @@ context('Network parameters page', { tags: '@smoke' }, function () {
if (this.networkParameterFormat.percentage.includes(parameterName)) { if (this.networkParameterFormat.percentage.includes(parameterName)) {
const formattedPercentageParameter = const formattedPercentageParameter =
(parseFloat(parameterValue) * 100).toFixed(0) + '%'; (parseFloat(parameterValue) * 100).toFixed(0) + '%';
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get(tableRows) cy.get(tableRows)
.contains(parameterName) .contains(parameterName)
.should('be.visible') .should('be.visible')
@ -158,11 +148,6 @@ context('Network parameters page', { tags: '@smoke' }, function () {
cy.convert_number_to_max_four_decimal(parameterValue) cy.convert_number_to_max_four_decimal(parameterValue)
.add_commas_to_number_if_large_enough() .add_commas_to_number_if_large_enough()
.then((parameterValueFormatted) => { .then((parameterValueFormatted) => {
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get(tableRows) cy.get(tableRows)
.contains(parameterName) .contains(parameterName)
.should('be.visible') .should('be.visible')
@ -194,11 +179,6 @@ context('Network parameters page', { tags: '@smoke' }, function () {
cy.convert_number_to_max_eighteen_decimal(parameterValue) cy.convert_number_to_max_eighteen_decimal(parameterValue)
.add_commas_to_number_if_large_enough() .add_commas_to_number_if_large_enough()
.then((parameterValueFormatted) => { .then((parameterValueFormatted) => {
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get(tableRows) cy.get(tableRows)
.contains(parameterName) .contains(parameterName)
.should('be.visible') .should('be.visible')

View File

@ -169,12 +169,6 @@ context.skip('Parties page', { tags: '@regression' }, function () {
const jsonFields = '.hljs'; const jsonFields = '.hljs';
const sideMenuBackground = '.absolute'; const sideMenuBackground = '.absolute';
// Engage dark mode if not allready set
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get(sideMenuBackground) cy.get(sideMenuBackground)
.should('have.css', 'background-color') .should('have.css', 'background-color')
.then((background_color) => { .then((background_color) => {

View File

@ -60,31 +60,16 @@ context.skip('Transactions page', function () {
}); });
cy.get('block').should('not.be.empty'); cy.get('block').should('not.be.empty');
cy.get('encoded-tnx').should('not.be.empty'); cy.get('encoded-tnx').should('not.be.empty');
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get('tx-type') cy.get('tx-type')
.should('not.be.empty') .should('not.be.empty')
.invoke('text') .invoke('text')
.then((txTypeTxt) => { .then((txTypeTxt) => {
if (txTypeTxt == 'Order Submission') { if (txTypeTxt == 'Order Submission') {
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get('.hljs-attr') cy.get('.hljs-attr')
.should('have.length.at.least', 8) .should('have.length.at.least', 8)
.each(($propertyName) => { .each(($propertyName) => {
cy.wrap($propertyName).should('not.be.empty'); cy.wrap($propertyName).should('not.be.empty');
}); });
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get('.hljs-string') cy.get('.hljs-string')
.should('have.length.at.least', 8) .should('have.length.at.least', 8)
.each(($propertyValue) => { .each(($propertyValue) => {

View File

@ -98,11 +98,6 @@ describe(
.and('have.length', 64); .and('have.length', 64);
cy.getByTestId(proposalTermsToggle).click(); cy.getByTestId(proposalTermsToggle).click();
// 3001-VOTE-052 3001-VOTE-010 // 3001-VOTE-052 3001-VOTE-010
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get('code.language-json') cy.get('code.language-json')
.should('exist') .should('exist')
.within(() => { .within(() => {

View File

@ -116,12 +116,6 @@ context(
cy.getByTestId(amountInput).click().type('120'); cy.getByTestId(amountInput).click().type('120');
cy.getByTestId(submitWithdrawalButton).click(); cy.getByTestId(submitWithdrawalButton).click();
}); });
// assert withdrawal request
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId(toast) cy.getByTestId(toast)
.first(txTimeout) .first(txTimeout)
.should('contain.text', 'Funds unlocked') .should('contain.text', 'Funds unlocked')
@ -135,11 +129,6 @@ context(
cy.getByTestId(toastClose).click(); cy.getByTestId(toastClose).click();
}); });
// withdrawal complete // withdrawal complete
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId(toast) cy.getByTestId(toast)
.first(txTimeout) .first(txTimeout)
.should('contain.text', 'The withdrawal has been approved.') .should('contain.text', 'The withdrawal has been approved.')
@ -149,11 +138,6 @@ context(
'Withdraw 120.00 tUSDC' 'Withdraw 120.00 tUSDC'
); );
}); });
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId(toast) cy.getByTestId(toast)
.last(txTimeout) .last(txTimeout)
.should('contain.text', 'Transaction confirmed') .should('contain.text', 'Transaction confirmed')
@ -161,11 +145,6 @@ context(
cy.getByTestId('external-link').should('exist'); cy.getByTestId('external-link').should('exist');
}); });
// withdrawal history for complete withdrawal displayed // withdrawal history for complete withdrawal displayed
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get(tableWithdrawnStatus) cy.get(tableWithdrawnStatus)
.eq(1, txTimeout) .eq(1, txTimeout)
.should('have.text', 'Completed') .should('have.text', 'Completed')
@ -207,11 +186,6 @@ context(
cy.getByTestId(submitWithdrawalButton).click(); cy.getByTestId(submitWithdrawalButton).click();
}); });
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId(toast) cy.getByTestId(toast)
.first(txTimeout) .first(txTimeout)
.should('contain.text', 'Funds unlocked') .should('contain.text', 'Funds unlocked')
@ -223,11 +197,6 @@ context(
); );
cy.getByTestId(toastClose).click(); cy.getByTestId(toastClose).click();
}); });
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get(tableTxHash) cy.get(tableTxHash)
.eq(1) .eq(1)
.should('have.text', 'Complete withdrawal') .should('have.text', 'Complete withdrawal')
@ -243,33 +212,18 @@ context(
}); });
ethereumWalletConnect(); ethereumWalletConnect();
cy.getByTestId(completeWithdrawalButton).first().click(); cy.getByTestId(completeWithdrawalButton).first().click();
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId(toast) cy.getByTestId(toast)
.last(txTimeout) .last(txTimeout)
.should('contain.text', 'Awaiting confirmation') .should('contain.text', 'Awaiting confirmation')
.within(() => { .within(() => {
cy.getByTestId('external-link').should('exist'); cy.getByTestId('external-link').should('exist');
}); });
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId(toast) cy.getByTestId(toast)
.first(txTimeout) .first(txTimeout)
.should('contain.text', 'The withdrawal has been approved.') .should('contain.text', 'The withdrawal has been approved.')
.within(() => { .within(() => {
cy.getByTestId(toastPanel).should('contain.text', '110.00', 'tUSDC'); cy.getByTestId(toastPanel).should('contain.text', '110.00', 'tUSDC');
}); });
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId(toast) cy.getByTestId(toast)
.last(txTimeout) .last(txTimeout)
.should('contain.text', 'Transaction confirmed') .should('contain.text', 'Transaction confirmed')
@ -293,11 +247,6 @@ context(
cy.getByTestId(amountInput).click().type('50'); cy.getByTestId(amountInput).click().type('50');
cy.getByTestId(submitWithdrawalButton).click(); cy.getByTestId(submitWithdrawalButton).click();
}); });
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId(toast) cy.getByTestId(toast)
.first(txTimeout) .first(txTimeout)
.should('contain.text', 'Funds unlocked') .should('contain.text', 'Funds unlocked')

View File

@ -16,11 +16,6 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
}); });
it('should display announcement banner', function () { it('should display announcement banner', function () {
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId('app-announcement') cy.getByTestId('app-announcement')
.should('contain.text', 'TEST ANNOUNCEMENT!') .should('contain.text', 'TEST ANNOUNCEMENT!')
.within(() => { .within(() => {
@ -40,11 +35,6 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
waitForSpinner(); waitForSpinner();
} }
}); });
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId('proposals-list-item') cy.getByTestId('proposals-list-item')
.should('have.length.at.least', 1) .should('have.length.at.least', 1)
.first() .first()
@ -104,11 +94,6 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
}); });
it('should contain link to specific validators', function () { it('should contain link to specific validators', function () {
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId('validators') cy.getByTestId('validators')
.should('have.length', '2') .should('have.length', '2')
.each(($validator) => { .each(($validator) => {
@ -135,11 +120,6 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
}); });
it('should display network data', function () { it('should display network data', function () {
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId('git-network-data') cy.getByTestId('git-network-data')
.should('contain.text', 'Reading network data from') .should('contain.text', 'Reading network data from')
.within(() => { .within(() => {
@ -151,11 +131,6 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
}); });
it('should display eth data', function () { it('should display eth data', function () {
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId('git-eth-data') cy.getByTestId('git-eth-data')
.should('contain.text', 'Reading Ethereum data from') .should('contain.text', 'Reading Ethereum data from')
.within(() => { .within(() => {

View File

@ -142,11 +142,6 @@ context(
mockNetworkUpgradeProposal(); mockNetworkUpgradeProposal();
navigateTo(navigation.proposals); navigateTo(navigation.proposals);
cy.getByTestId('open-proposals').within(() => { cy.getByTestId('open-proposals').within(() => {
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get('li') cy.get('li')
.eq(0) .eq(0)
.should('have.attr', 'data-testid', networkUpgradeProposalListItem) .should('have.attr', 'data-testid', networkUpgradeProposalListItem)
@ -205,11 +200,6 @@ context(
.should('contain.text', '99.98% approval (% validator voting power)') .should('contain.text', '99.98% approval (% validator voting power)')
.and('contain.text', '(67% voting power required)'); .and('contain.text', '(67% voting power required)');
cy.get('h2').should('contain.text', 'Approvers (4/4 validators)'); cy.get('h2').should('contain.text', 'Approvers (4/4 validators)');
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId('validator-name') cy.getByTestId('validator-name')
.should('have.length', 4) .should('have.length', 4)
.each(($validator) => { .each(($validator) => {

View File

@ -42,11 +42,6 @@ context(
// Skipping due to bug #3471 causing flaky failuress // Skipping due to bug #3471 causing flaky failuress
it.skip('should have option to view go to next and previous page', function () { it.skip('should have option to view go to next and previous page', function () {
waitForBeginningOfEpoch(); waitForBeginningOfEpoch();
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId('page-info') cy.getByTestId('page-info')
.should('contain.text', 'Page ') .should('contain.text', 'Page ')
.invoke('text') .invoke('text')

View File

@ -21,11 +21,6 @@ context(
// 1005-VEST-001 // 1005-VEST-001
// 1005-VEST-002 // 1005-VEST-002
it('Able to view tranches', function () { it('Able to view tranches', function () {
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId('tranche-item') cy.getByTestId('tranche-item')
.should('have.length', 2) .should('have.length', 2)
.first() .first()
@ -56,11 +51,6 @@ context(
cy.get('span').eq(1).should('have.text', 0); cy.get('span').eq(1).should('have.text', 0);
}); });
cy.getByTestId('key-value-table').within(() => { cy.getByTestId('key-value-table').within(() => {
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId('link') cy.getByTestId('link')
.should('have.length', 8) .should('have.length', 8)
.each((ethLink) => { .each((ethLink) => {
@ -68,11 +58,6 @@ context(
.should('have.attr', 'href') .should('have.attr', 'href')
.and('contain', 'https://sepolia.etherscan.io/address/'); .and('contain', 'https://sepolia.etherscan.io/address/');
}); });
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId('redeem-link') cy.getByTestId('redeem-link')
.should('have.length', 8) .should('have.length', 8)
.each((redeemLink) => { .each((redeemLink) => {
@ -86,11 +71,6 @@ context(
it('Able to view tranches with less than 10 vega', function () { it('Able to view tranches with less than 10 vega', function () {
navigateTo(navigation.supply); navigateTo(navigation.supply);
cy.getByTestId('show-all-tranches').click(); cy.getByTestId('show-all-tranches').click();
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId('tranche-item') cy.getByTestId('tranche-item')
.should('have.length', 8) .should('have.length', 8)
.first() .first()

View File

@ -74,11 +74,6 @@ context('Validators Page - verify elements on page', function () {
function () { function () {
// 1002-STKE-050 // 1002-STKE-050
it('Should be able to see validator names', function () { it('Should be able to see validator names', function () {
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get('[col-id="validator"] > div > span') cy.get('[col-id="validator"] > div > span')
.should('have.length.at.least', 1) .should('have.length.at.least', 1)
.each(($name) => { .each(($name) => {
@ -87,11 +82,6 @@ context('Validators Page - verify elements on page', function () {
}); });
it('Should be able to see validator stake', function () { it('Should be able to see validator stake', function () {
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId('total-stake') cy.getByTestId('total-stake')
.should('have.length.at.least', 1) .should('have.length.at.least', 1)
.each(($stake) => { .each(($stake) => {
@ -115,11 +105,6 @@ context('Validators Page - verify elements on page', function () {
}); });
it('Should be able to see validator normalised voting power', function () { it('Should be able to see validator normalised voting power', function () {
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId('normalised-voting-power') cy.getByTestId('normalised-voting-power')
.should('have.length.at.least', 1) .should('have.length.at.least', 1)
.each(($vPower) => { .each(($vPower) => {
@ -141,11 +126,6 @@ context('Validators Page - verify elements on page', function () {
// 2002-SINC-018 // 2002-SINC-018
it('Should be able to see validator total penalties', function () { it('Should be able to see validator total penalties', function () {
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId('total-penalty') cy.getByTestId('total-penalty')
.should('have.length.at.least', 1) .should('have.length.at.least', 1)
.each(($penalties) => { .each(($penalties) => {
@ -166,11 +146,6 @@ context('Validators Page - verify elements on page', function () {
}); });
it('Should be able to see validator pending stake', function () { it('Should be able to see validator pending stake', function () {
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId('total-pending-stake') cy.getByTestId('total-pending-stake')
.should('have.length.at.least', 1) .should('have.length.at.least', 1)
.each(($pendingStake) => { .each(($pendingStake) => {

View File

@ -340,7 +340,7 @@ context(
.contains(name) .contains(name)
.parent() .parent()
.siblings() .siblings()
.then((elementAmount) => { .should((elementAmount) => {
const displayedAmount = parseFloat(elementAmount.text()); const displayedAmount = parseFloat(elementAmount.text());
expect(displayedAmount).be.gte(expectedAmount); expect(displayedAmount).be.gte(expectedAmount);
}); });

View File

@ -100,11 +100,6 @@ describe('capsule - without MultiSign', { tags: '@slow' }, () => {
cy.get('.ag-cell-value', txTimeout).should('contain.text', btcSymbol); cy.get('.ag-cell-value', txTimeout).should('contain.text', btcSymbol);
cy.get('[col-id="status"]').should('not.have.text', 'Open', txTimeout); cy.get('[col-id="status"]').should('not.have.text', 'Open', txTimeout);
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get('[col-id="txHash"]') cy.get('[col-id="txHash"]')
.should('have.length.above', 2) .should('have.length.above', 2)
.eq(1) .eq(1)
@ -411,11 +406,6 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
.eq(0, txTimeout) .eq(0, txTimeout)
.should('contain.text', 'Completed'); .should('contain.text', 'Completed');
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get('[col-id="txHash"]', txTimeout) cy.get('[col-id="txHash"]', txTimeout)
.should('have.length.above', 1) .should('have.length.above', 1)
.eq(1) .eq(1)
@ -497,11 +487,6 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
cy.get('.ag-cell-value', txTimeout).should('contain.text', vegaSymbol); cy.get('.ag-cell-value', txTimeout).should('contain.text', vegaSymbol);
cy.get('[col-id="status"]').should('not.have.text', 'Open', txTimeout); cy.get('[col-id="status"]').should('not.have.text', 'Open', txTimeout);
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get('[col-id="txHash"]') cy.get('[col-id="txHash"]')
.should('have.length.above', 2) .should('have.length.above', 2)
.eq(1) .eq(1)

View File

@ -137,11 +137,6 @@ describe('Market trading page', () => {
.realHover(); .realHover();
}); });
}); });
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId(expirtyTooltip) cy.getByTestId(expirtyTooltip)
.eq(0) .eq(0)
.should( .should(
@ -175,11 +170,6 @@ describe('Market trading page', () => {
.realHover(); .realHover();
}); });
}); });
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId(tradingModeTooltip) cy.getByTestId(tradingModeTooltip)
.should( .should(
'contain.text', 'contain.text',
@ -206,11 +196,6 @@ describe('Market trading page', () => {
cy.getByTestId(itemValue).realHover(); cy.getByTestId(itemValue).realHover();
}); });
}); });
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId(liquiditySuppliedTooltip) cy.getByTestId(liquiditySuppliedTooltip)
.should('contain.text', 'Supplied stake') .should('contain.text', 'Supplied stake')
.and('contain.text', 'Target stake') .and('contain.text', 'Target stake')

View File

@ -119,11 +119,6 @@ describe('orders list', { tags: '@smoke', testIsolation: true }, () => {
cy.contains('Reset').click(); cy.contains('Reset').click();
cy.getByTestId('All').click(); cy.getByTestId('All').click();
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.getByTestId('tab-orders') cy.getByTestId('tab-orders')
.get(`.ag-center-cols-container [col-id='${orderSymbol}']`) .get(`.ag-center-cols-container [col-id='${orderSymbol}']`)
.should('have.length.at.least', expectedOrderList.length) .should('have.length.at.least', expectedOrderList.length)
@ -447,11 +442,6 @@ describe('amend and cancel order', { tags: '@smoke' }, () => {
peggedOrder: null, peggedOrder: null,
liquidityProvisionId: null, liquidityProvisionId: null,
}); });
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get(`[row-id=${orderId}]`) cy.get(`[row-id=${orderId}]`)
.find('[data-testid="edit"]') .find('[data-testid="edit"]')
.should('have.text', 'Edit') .should('have.text', 'Edit')
@ -481,11 +471,6 @@ describe('amend and cancel order', { tags: '@smoke' }, () => {
peggedOrder: null, peggedOrder: null,
liquidityProvisionId: null, liquidityProvisionId: null,
}); });
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get(`[row-id=${orderId}]`) cy.get(`[row-id=${orderId}]`)
.find(`[data-testid="cancel"]`) .find(`[data-testid="cancel"]`)
.should('have.text', 'Cancel') .should('have.text', 'Cancel')
@ -508,11 +493,6 @@ describe('amend and cancel order', { tags: '@smoke' }, () => {
peggedOrder: null, peggedOrder: null,
liquidityProvisionId: null, liquidityProvisionId: null,
}); });
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get(`[data-testid="cancelAll"]`) cy.get(`[data-testid="cancelAll"]`)
.should('have.text', 'Cancel all') .should('have.text', 'Cancel all')
.then(($btn) => { .then(($btn) => {
@ -529,11 +509,6 @@ describe('amend and cancel order', { tags: '@smoke' }, () => {
peggedOrder: null, peggedOrder: null,
liquidityProvisionId: null, liquidityProvisionId: null,
}); });
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get(`[row-id=${orderId}]`) cy.get(`[row-id=${orderId}]`)
.find('[data-testid="edit"]') .find('[data-testid="edit"]')
.should('have.text', 'Edit') .should('have.text', 'Edit')

View File

@ -47,11 +47,6 @@ describe('Portfolio page', { tags: '@smoke' }, () => {
cy.get( cy.get(
'[role="columnheader"][col-id="fromAccountType"] .ag-header-cell-menu-button' '[role="columnheader"][col-id="fromAccountType"] .ag-header-cell-menu-button'
).click(); ).click();
/**
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
* You should use .then() to chain commands instead.
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
**/
cy.get('fieldset.ag-simple-filter-body-wrapper') cy.get('fieldset.ag-simple-filter-body-wrapper')
.should('be.visible') .should('be.visible')
.within((fields) => { .within((fields) => {