Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
outlinefalse
stylenone
typelist
printablefalse

Precondition

  • You need to have login and correct struncture of the .spec.js file in your test (API or FE) - see this page: NEW-Login

How to open LPG

...

From LPG main page

  1. write “cypress“ into label

  2. find data-row-key and on this row find label “cypress“

  3. click on label “cypress“

Code Block
languagejs
  it('LPG', () => {
    cy.visit('/#/pb/lpgs');
    cy.url().should('contain', '/#/pb/lpgs'); //assert
    cy.waitForSpinner();

    //Open LPG with label "cypress"
    const LPGlabel = 'cypress';

    cy.contains('.ucTableHeaderColumnContextMenu', 'Label')
      .find('[data-test="quickFilter-input"]')//click on the quick filter
      .type(LPGlabel + '{enter}', { force: true }); //variable
      cy.waitForSpinner();
      cy.get('[data-row-key="16.PG"]')//find row key for our LPG
      .contains(LPGlabel)//find string on this row key
      .click({ force: true });//click
  cy.waitForSpinner();
  cy.contains('[data-test=ucBreadcrumbs]', LPGlabel);//assert for breadcrumbs
  });

Open LPG via URL

  1. put URL of the LPG

  2. Check that URL is successfully loaded and breadcrumbs contains name of the LPG

...

Code Block
languagejs
  it('LPG', () => {
    const LPGlabel = 'cypress';
    
    cy.visit('/#/pb/lpgs/16/detail');
    cy.url().should('contain', '/#/pb/lpgs/16/detail'); //assert
    cy.waitForSpinner();
  cy.contains('[data-test=ucBreadcrumbs]', LPGlabel);//assert for breadcrumbs
  });

...