Skip to content

Commit 3ce2b15

Browse files
test new update
1 parent 2bde63e commit 3ce2b15

File tree

2 files changed

+8
-21
lines changed

2 files changed

+8
-21
lines changed

bi-directional/e2e/checkBiDirectionalApps.cy.ts

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { BaseMethods } from '../../cypress-e2e/common/base';
22
import { baseSelectors } from '../../cypress-e2e/common/selectors';
33
import { Constants } from '../../cypress-e2e/fixtures/constants';
4-
54
const basePage: BaseMethods = new BaseMethods();
65

76
const appsData = [
@@ -32,27 +31,15 @@ appsData.forEach(
3231
describe('Bi Directional', () => {
3332
context(`Check ${property.appName} elements exists on the page`, () => {
3433
before(() => {
35-
basePage.openLocalhost({
36-
number: property.host,
37-
});
34+
cy.visit('http://localhost:' + property.host)
3835
});
36+
3937
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+
}
5643
});
5744
});
5845
});

bi-directional/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"build": "pnpm --filter bi-directional_* run build",
1313
"serve": "pnpm --filter bi-directional_* run serve",
1414
"clean": "pnpm --filter bi-directional_* run reset",
15-
"e2e:ci": "pnpm build && pnpm serve & sleep 5 && wait-on tcp:3001 && wait-on tcp:3002 && npx cypress run --config-file ../cypress-e2e/config/cypress.config.ts --config '{\"supportFile\": \"../cypress-e2e/support/e2e.ts\"}' --spec \"./e2e/*.cy.ts\" --browser=chrome"
15+
"e2e:ci": "npx cypress run --config-file ../cypress-e2e/config/cypress.config.ts --config '{\"supportFile\": \"../cypress-e2e/support/e2e.ts\"}' --spec \"./e2e/*.cy.ts\" --browser=chrome --headed --runner-ui"
1616
},
1717
"devDependencies": {
1818
"concurrently": "8.2.2",

0 commit comments

Comments
 (0)