* test: update test for network parameters table (#300) * fix: lint
This commit is contained in:
parent
aa28f2cac1
commit
aec94f0354
@ -9,15 +9,3 @@ Feature: Network parameters Page
|
||||
Given I am on mobile and open the toggle menu
|
||||
When I navigate to network parameters page
|
||||
Then network parameters page is correctly displayed
|
||||
|
||||
Scenario: Navigate to network parameters page and check each value is non-empty
|
||||
Given I am on the homepage
|
||||
When I navigate to network parameters page
|
||||
Then network parameters page is correctly displayed
|
||||
And each value is non-empty
|
||||
|
||||
Scenario: Navigate to network parameters page and check each value using mobile
|
||||
Given I am on mobile and open the toggle menu
|
||||
When I navigate to network parameters page
|
||||
Then network parameters page is correctly displayed
|
||||
And each value is non-empty
|
||||
|
@ -3,20 +3,37 @@ import BasePage from './base-page';
|
||||
export default class NetworkParametersPage extends BasePage {
|
||||
networkParametersHeader = 'network-param-header';
|
||||
parameters = 'parameters';
|
||||
jsonParamNameClassName = '.hljs-attr';
|
||||
jsonParamValueStringClassName = '.hljs-string';
|
||||
jsonParamValueNumberClassName = '.hljs-number';
|
||||
parameterKeyValueRow = 'key-value-table-row';
|
||||
|
||||
verifyNetworkParametersDisplayed() {
|
||||
cy.getByTestId(this.networkParametersHeader).should(
|
||||
'have.text',
|
||||
'Network Parameters'
|
||||
);
|
||||
cy.getByTestId(this.parameters).should('not.be.empty');
|
||||
}
|
||||
|
||||
eachValueIsNonEmpty() {
|
||||
cy.getByTestId(this.parameters).then(($parameters) => {
|
||||
$parameters.each((_index, element) => {
|
||||
cy.wrap(element).should('not.be.empty');
|
||||
cy.get(this.jsonParamNameClassName)
|
||||
.should('have.length.at.least', 21)
|
||||
.each(($paramName) => {
|
||||
cy.wrap($paramName).should('not.be.empty');
|
||||
});
|
||||
cy.get(this.jsonParamValueStringClassName)
|
||||
.should('have.length.at.least', 7)
|
||||
.each(($paramValue) => {
|
||||
cy.wrap($paramValue).should('not.be.empty');
|
||||
});
|
||||
|
||||
cy.get(this.jsonParamValueNumberClassName)
|
||||
.should('have.length.at.least', 9)
|
||||
.each(($paramValue) => {
|
||||
cy.wrap($paramValue).should('not.be.empty');
|
||||
});
|
||||
|
||||
cy.getByTestId(this.parameterKeyValueRow).each(($row) => {
|
||||
cy.wrap($row).find('dt').should('not.be.empty');
|
||||
cy.wrap($row).find('dd').should('not.be.empty');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,3 @@ When('I navigate to network parameters page', () => {
|
||||
Then('network parameters page is correctly displayed', () => {
|
||||
networkPage.verifyNetworkParametersDisplayed();
|
||||
});
|
||||
|
||||
Then('each value is non-empty', () => {
|
||||
networkPage.eachValueIsNonEmpty();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user