Add comprehensive e2e test suites for Tasks 16-25

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.
This commit is contained in:
gnezim
2026-04-05 19:25:03 +03:00
parent 21c6ed4f82
commit 60e2149072
31032 changed files with 5222883 additions and 2 deletions
+13
View File
@@ -0,0 +1,13 @@
Copyright (c) 2015, Ilya Radchenko <knownasilya@gmail.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+71
View File
@@ -0,0 +1,71 @@
# cli-width
Get stdout window width, with four fallbacks, `tty`, `output.columns`, a custom environment variable and then a default.
[![npm version](https://badge.fury.io/js/cli-width.svg)](http://badge.fury.io/js/cli-width)
[![Build Status](https://travis-ci.org/knownasilya/cli-width.svg)](https://travis-ci.org/knownasilya/cli-width)
[![Coverage Status](https://coveralls.io/repos/knownasilya/cli-width/badge.svg?branch=master&service=github)](https://coveralls.io/github/knownasilya/cli-width?branch=master)
Tested against Node v12 to v20.
Includes TypeScript types.
## Usage
```
npm install --save cli-width
```
```js
const cliWidth = require('cli-width');
cliWidth(); // maybe 204 :)
```
You can also set the `CLI_WIDTH` environment variable.
If none of the methods are supported, and the environment variable isn't set,
the default width value is going to be `0`, that can be changed using the configurable `options`.
## API
### cliWidth([options])
`cliWidth` can be configured using an `options` parameter, the possible properties are:
- **defaultWidth**\<number\> Defines a default value to be used if none of the methods are available, defaults to `0`
- **output**\<object\> A stream to be used to read width values from, defaults to `process.stdout`
- **tty**\<object\> TTY module to try to read width from as a fallback, defaults to `require('tty')`
### Examples
Defining both a default width value and a stream output to try to read from:
```js
const cliWidth = require('cli-width');
const ttys = require('ttys');
cliWidth({
defaultWidth: 80,
output: ttys.output,
});
```
Defines a different tty module to read width from:
```js
const cliWidth = require('cli-width');
const ttys = require('ttys');
cliWidth({
tty: ttys,
});
```
## Tests
```bash
npm install
npm test
```
Coverage can be generated with `npm run coverage`.
+13
View File
@@ -0,0 +1,13 @@
// Type definitions for cli-width 4.0
/// <reference types="node" />
import { Stream } from 'stream';
import tty = require('tty');
declare function cliWidth(options?: {
defaultWidth?: number;
output?: Stream;
tty?: typeof tty;
}): number;
export = cliWidth;
+49
View File
@@ -0,0 +1,49 @@
'use strict';
module.exports = cliWidth;
function normalizeOpts(options) {
const defaultOpts = {
defaultWidth: 0,
output: process.stdout,
tty: require('tty'),
};
if (!options) {
return defaultOpts;
}
Object.keys(defaultOpts).forEach(function (key) {
if (!options[key]) {
options[key] = defaultOpts[key];
}
});
return options;
}
function cliWidth(options) {
const opts = normalizeOpts(options);
if (opts.output.getWindowSize) {
return opts.output.getWindowSize()[0] || opts.defaultWidth;
}
if (opts.tty.getWindowSize) {
return opts.tty.getWindowSize()[1] || opts.defaultWidth;
}
if (opts.output.columns) {
return opts.output.columns;
}
if (process.env.CLI_WIDTH) {
const width = parseInt(process.env.CLI_WIDTH, 10);
if (!isNaN(width) && width !== 0) {
return width;
}
}
return opts.defaultWidth;
}
+40
View File
@@ -0,0 +1,40 @@
{
"name": "cli-width",
"version": "4.1.0",
"description": "Get stdout window width, with two fallbacks, tty and then a default.",
"main": "index.js",
"scripts": {
"test": "node test | tspec",
"coverage": "nyc node test | tspec",
"coveralls": "npm run coverage -s && coveralls < coverage/lcov.info",
"release": "standard-version"
},
"repository": {
"type": "git",
"url": "git@github.com:knownasilya/cli-width.git"
},
"author": "Ilya Radchenko <knownasilya@gmail.com>",
"license": "ISC",
"bugs": {
"url": "https://github.com/knownasilya/cli-width/issues"
},
"homepage": "https://github.com/knownasilya/cli-width",
"engines": {
"node": ">= 12"
},
"devDependencies": {
"coveralls": "^3.1.1",
"nyc": "^15.1.0",
"standard-version": "^9.3.2",
"tap-spec": "^5.0.0",
"tape": "^5.5.2"
},
"volta": {
"node": "12.22.11",
"npm": "8.5.5"
},
"files": [
"index.js",
"index.d.ts"
]
}