Skip to content

Commit 1fc9821

Browse files
Zdravko BranzovZdravko Branzov
Zdravko Branzov
authored and
Zdravko Branzov
committed
chore: add new test for #1771
1 parent 0332b8a commit 1fc9821

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ ng-sample/app/**/*.js
3030
# Webpack configuration files
3131
webpack.config.js
3232
tsconfig.esm.json
33+
tsconfig.tns.json
3334

3435
# IDEs and editors
3536
/.idea

Diff for: e2e/modal-navigation-ng/app/navigation/basic.navigation.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import { ModalViewComponent } from "~/modal-shared/modal-view.component";
1616
<Button text="Show Modal Without Frame" (tap)="onModalNoFrame()" textAlignment="left"></Button>
1717
<Button text="Show Modal Page With Frame" (tap)="onModalFrame()" textAlignment="left"></Button>
1818
<Button text="Show Shared Modal" (tap)="onRootModalTap()" textAlignment="left"></Button>
19+
<Button #popoverButtonComp text="Show shared 'popover' modal" (tap)="onPopoverModal()" textAlignment="left"></Button>
1920
<Button text="Show Dialog" (tap)="onShowDialog()" textAlignment="left"></Button>
20-
<Button #popoverButtonComp text="Show 'popover' modal" (tap)="onPopoverModal()" textAlignment="left"></Button>
2121
</StackLayout>`
2222
})
2323

Diff for: e2e/modal-navigation-ng/e2e/modal.shared.e2e-spec.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe("modal-shared:", () => {
1515
});
1616

1717
roots.forEach(root => {
18-
describe("Shared modal from second and back", () => {
18+
describe("Shared modal from home component and back", () => {
1919

2020
before(async () => {
2121
await screen[root]();
@@ -46,6 +46,11 @@ describe("modal-shared:", () => {
4646
await screen.closeModal();
4747
});
4848

49+
it("should open/close shared modal with presentation style from home component", async () => {
50+
await screen.loadSharedModalWithPresentationStyle(true);
51+
await screen.closeModal();
52+
});
53+
4954
it("should find home component again", async () => {
5055
await screen.loadedHome();
5156
});

Diff for: e2e/modal-navigation-ng/e2e/screens/screen.ts

+14
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ export class Screen {
165165
await btnTap.click();
166166
}
167167

168+
private showSharedModalPresentationStyle = async () => {
169+
const btnTap = await this._driver.waitForElement("Show shared 'popover' modal");
170+
await btnTap.click();
171+
}
172+
168173
loadedModalPage = async () => {
169174
const btnShowNestedModalPage = await this._driver.findElementByAutomationText(showNestedModalPage);
170175
assert.isTrue(await btnShowNestedModalPage.isDisplayed(), `${showNestedModalPage} is not displayed`);
@@ -309,4 +314,13 @@ export class Screen {
309314
const lbl = await this._driver.waitForElement(sharedModalView, 5000);
310315
assert.isTrue(await lbl.isDisplayed());
311316
}
317+
318+
loadSharedModalWithPresentationStyle = async (loadShowModalPageWithFrame: boolean) => {
319+
if (loadShowModalPageWithFrame) {
320+
await this.showSharedModalPresentationStyle();
321+
}
322+
323+
const lbl = await this._driver.waitForElement(sharedModalView, 5000);
324+
assert.isTrue(await lbl.isDisplayed());
325+
}
312326
}

0 commit comments

Comments
 (0)