|
1 | 1 | import { BaseMethods } from '../../cypress-e2e/common/base';
|
2 | 2 | import { baseSelectors } from '../../cypress-e2e/common/selectors';
|
3 | 3 | import { Constants } from '../../cypress-e2e/fixtures/constants';
|
4 |
| - |
5 | 4 | const basePage: BaseMethods = new BaseMethods();
|
6 | 5 |
|
7 | 6 | const appsData = [
|
@@ -32,27 +31,15 @@ appsData.forEach(
|
32 | 31 | describe('Bi Directional', () => {
|
33 | 32 | context(`Check ${property.appName} elements exists on the page`, () => {
|
34 | 33 | before(() => {
|
35 |
| - basePage.openLocalhost({ |
36 |
| - number: property.host, |
37 |
| - }); |
| 34 | + cy.visit('http://localhost:' + property.host) |
38 | 35 | });
|
| 36 | + |
39 | 37 | it(`Check App1 and App2 elements`, () => {
|
40 |
| - basePage.checkElementWithTextPresence({ |
41 |
| - selector: baseSelectors.tags.headers.h1, |
42 |
| - text: String(property.appName), |
43 |
| - }); |
44 |
| - basePage.checkElementWithTextPresence({ |
45 |
| - selector: baseSelectors.tags.headers.h2, |
46 |
| - text: String(property.appSubheader), |
47 |
| - }); |
48 |
| - basePage.clickElementWithText({ |
49 |
| - selector: baseSelectors.tags.coreElements.button, |
50 |
| - text: String(property.app1Button), |
51 |
| - }); |
52 |
| - basePage.clickElementWithText({ |
53 |
| - selector: baseSelectors.tags.coreElements.button, |
54 |
| - text: String(property.app2Button), |
55 |
| - }); |
| 38 | + if(property.host === 3001) { |
| 39 | + cy.contains('App 2 Button').should('exist'); |
| 40 | + } else { |
| 41 | + cy.contains('App 1 Button').should('exist'); |
| 42 | + } |
56 | 43 | });
|
57 | 44 | });
|
58 | 45 | });
|
|
0 commit comments