mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
refactor(e2e): rename modal-layout to modal-layout-root (#5867)
* chore(e2e): register `layout` files in bundle-config * refactor(e2e): rename modal-layout to modal-layout-root Similar to `modal-tab-root`: https://github.com/NativeScript/NativeScript/tree/4.0.0/e2e/modal-navigation/app/modal-tab This avoid the need to explicitly register it to webpack modules. * refactor(e2e): rename mocha describes to contain a dash * refactor: remove bundle-config It is no more as `nativescript-dev-webpack@0.12.0` registers default application modules.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -34,6 +34,7 @@ e2e/**/test-results.xml
|
|||||||
|
|
||||||
# Webpack configuration files
|
# Webpack configuration files
|
||||||
webpack.config.js
|
webpack.config.js
|
||||||
|
tsconfig.esm.json
|
||||||
|
|
||||||
# Generated files
|
# Generated files
|
||||||
*.map
|
*.map
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import "./bundle-config";
|
|
||||||
import * as application from "tns-core-modules/application";
|
import * as application from "tns-core-modules/application";
|
||||||
|
|
||||||
application.run({ moduleName: "app-root" });
|
application.run({ moduleName: "app-root" });
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
if ((<any>global).TNS_WEBPACK) {
|
|
||||||
// Register tns-core-modules UI framework modules
|
|
||||||
require("bundle-entry-points");
|
|
||||||
|
|
||||||
// Register application modules
|
|
||||||
// This will register each `root`, `page`, `fragment` postfixed xml, css, js, ts, scss file in the app/ folder
|
|
||||||
const context = (<any>require).context("~/", true, /(root|page|fragment)\.(xml|css|js|ts|scss|less|sass)$/);
|
|
||||||
global.registerWebpackModules(context);
|
|
||||||
}
|
|
@ -42,7 +42,7 @@ export function onModalPage(args: EventData) {
|
|||||||
|
|
||||||
export function onModalLayout(args: EventData) {
|
export function onModalLayout(args: EventData) {
|
||||||
const view = args.object as View;
|
const view = args.object as View;
|
||||||
view.showModal("modal-layout/modal-layout",
|
view.showModal("modal-layout/modal-layout-root",
|
||||||
"context",
|
"context",
|
||||||
() => console.log("home-page modal layout closed"),
|
() => console.log("home-page modal layout closed"),
|
||||||
false);
|
false);
|
||||||
|
@ -9,7 +9,7 @@ import {
|
|||||||
testNestedModalPageBackground
|
testNestedModalPageBackground
|
||||||
} from "./shared.e2e-spec"
|
} from "./shared.e2e-spec"
|
||||||
|
|
||||||
describe("modal frame:", () => {
|
describe("modal-frame:", () => {
|
||||||
|
|
||||||
let driver: AppiumDriver;
|
let driver: AppiumDriver;
|
||||||
let screen: Screen;
|
let screen: Screen;
|
||||||
|
@ -9,7 +9,7 @@ import {
|
|||||||
testNestedModalPageBackground
|
testNestedModalPageBackground
|
||||||
} from "./shared.e2e-spec"
|
} from "./shared.e2e-spec"
|
||||||
|
|
||||||
describe("modal layout:", () => {
|
describe("modal-layout:", () => {
|
||||||
|
|
||||||
let driver: AppiumDriver;
|
let driver: AppiumDriver;
|
||||||
let screen: Screen;
|
let screen: Screen;
|
||||||
|
@ -8,7 +8,7 @@ import {
|
|||||||
testNestedModalPageBackground
|
testNestedModalPageBackground
|
||||||
} from "./shared.e2e-spec"
|
} from "./shared.e2e-spec"
|
||||||
|
|
||||||
describe("modal page:", () => {
|
describe("modal-page:", () => {
|
||||||
|
|
||||||
let driver: AppiumDriver;
|
let driver: AppiumDriver;
|
||||||
let screen: Screen;
|
let screen: Screen;
|
||||||
|
@ -11,7 +11,7 @@ import {
|
|||||||
testSecondItemBackground
|
testSecondItemBackground
|
||||||
} from "./shared.e2e-spec"
|
} from "./shared.e2e-spec"
|
||||||
|
|
||||||
describe("modal tab:", () => {
|
describe("modal-tab:", () => {
|
||||||
|
|
||||||
let driver: AppiumDriver;
|
let driver: AppiumDriver;
|
||||||
let screen: Screen;
|
let screen: Screen;
|
||||||
|
Reference in New Issue
Block a user