60e2149072
Tasks 16-20: Online Board Tests (Search/Filter, Tabs, Flight List, Details Modal, Time/Date) - Task 16: Search & Filter tests (37 tests) - departure/arrival cities, passenger count, cabin class - Task 17: Arrival/Departure Tabs tests (45 tests) - tab switching, flight display, sorting - Task 18: Flight List View tests (50 tests) - display, sorting, filtering, pagination, loading states - Task 19: Flight Details Modal tests (40 tests) - opening/closing, content display, actions - Task 20: Time & Date Filter tests (43 tests) - date selection, time ranges, calendar navigation Tasks 21-25: Flight Details Tests (Flight Info, Passengers, Seats, Services, Fares) - Task 21: Flight Info Display tests (40 tests) - basic info, airports, route visualization, timeline - Task 22: Passenger Info tests (50 tests) - passenger list, details, services, special requirements - Task 23: Seat Selection tests (50 tests) - seat map, selection, categories, recommendations - Task 24: Service Selection tests (25 tests) - baggage, meals, seats, summary - Task 25: Fare Display tests (55 tests) - fare breakdown, comparisons, discounts, refunds All tests follow AAA pattern and use data-testid selectors matching Angular version. Total: 245 tests across 10 feature suites.
83 lines
3.6 KiB
JavaScript
Executable File
83 lines
3.6 KiB
JavaScript
Executable File
"use strict";
|
|
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.dev/license
|
|
*/
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.default = default_1;
|
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
const json_file_1 = require("../utility/json-file");
|
|
const schema_1 = require("./schema");
|
|
function default_1(options) {
|
|
if (!options.directory) {
|
|
// If scoped project (i.e. "@foo/bar"), convert directory to "foo/bar".
|
|
options.directory = options.name.startsWith('@') ? options.name.slice(1) : options.name;
|
|
}
|
|
const workspaceOptions = {
|
|
name: options.name,
|
|
version: options.version,
|
|
newProjectRoot: options.newProjectRoot,
|
|
minimal: options.minimal,
|
|
strict: options.strict,
|
|
packageManager: options.packageManager,
|
|
};
|
|
const applicationOptions = {
|
|
projectRoot: '',
|
|
name: options.name,
|
|
inlineStyle: options.inlineStyle,
|
|
inlineTemplate: options.inlineTemplate,
|
|
prefix: options.prefix,
|
|
viewEncapsulation: options.viewEncapsulation,
|
|
routing: options.routing,
|
|
style: options.style,
|
|
skipTests: options.skipTests,
|
|
testRunner: options.testRunner,
|
|
skipPackageJson: false,
|
|
// always 'skipInstall' here, so that we do it after the move
|
|
skipInstall: true,
|
|
strict: options.strict,
|
|
minimal: options.minimal,
|
|
standalone: options.standalone,
|
|
ssr: options.ssr,
|
|
zoneless: options.zoneless,
|
|
fileNameStyleGuide: options.fileNameStyleGuide,
|
|
};
|
|
return (0, schematics_1.chain)([
|
|
(0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.empty)(), [
|
|
(0, schematics_1.schematic)('workspace', workspaceOptions),
|
|
(tree) => {
|
|
if (options.testRunner === schema_1.TestRunner.Karma) {
|
|
const file = new json_file_1.JSONFile(tree, 'angular.json');
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
const schematics = file.get(['schematics']) ?? {};
|
|
(schematics['@schematics/angular:application'] ??= {}).testRunner = schema_1.TestRunner.Karma;
|
|
(schematics['@schematics/angular:library'] ??= {}).testRunner = schema_1.TestRunner.Karma;
|
|
file.modify(['schematics'], schematics);
|
|
}
|
|
},
|
|
options.createApplication ? (0, schematics_1.schematic)('application', applicationOptions) : schematics_1.noop,
|
|
(0, schematics_1.schematic)('ai-config', {
|
|
tool: options.aiConfig?.length ? options.aiConfig : undefined,
|
|
}),
|
|
(0, schematics_1.move)(options.directory),
|
|
])),
|
|
(_host, context) => {
|
|
let packageTask;
|
|
if (!options.skipInstall) {
|
|
packageTask = context.addTask(new tasks_1.NodePackageInstallTask({
|
|
workingDirectory: options.directory,
|
|
packageManager: options.packageManager,
|
|
}));
|
|
}
|
|
if (!options.skipGit) {
|
|
const commit = typeof options.commit == 'object' ? options.commit : options.commit ? {} : false;
|
|
context.addTask(new tasks_1.RepositoryInitializerTask(options.directory, commit), packageTask ? [packageTask] : []);
|
|
}
|
|
},
|
|
]);
|
|
}
|
|
//# sourceMappingURL=index.js.map
|