Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 0 additions & 64 deletions src/.eslintrc.js

This file was deleted.

148 changes: 0 additions & 148 deletions src/angular.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/e2e/components/current-stats.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class CurrentStatsComponent {
async isCurrentPO2Warning(): Promise<boolean> {
return this.host
.locator('.current-stats div.dive-stat', { has: this.host.page().getByText(/\s*PO2:/) })
.locator('mat-icon')
.locator('.material-icons')
.getByText('warning')
.isVisible();
}
Expand Down
18 changes: 9 additions & 9 deletions src/e2e/pages/change-depth.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,53 @@ import { CurrentStatsComponent } from 'e2e/components/current-stats.component';
export class ChangeDepthPage {
constructor(private page: Page) {}

public currentStats = new CurrentStatsComponent(this.page.locator('dive-current-stats'));
public currentStats = new CurrentStatsComponent(this.page.locator('.dive-current-stats'));

async setNewDepth(depth: number): Promise<ChangeDepthPage> {
await this.page.getByLabel('New Depth (m)').fill(depth.toString());
return this;
}

async getDescentTime(): Promise<string> {
let content = await this.page.locator('dive-new-depth-stats .new-depth-stats .dive-stat').getByText('Descent Time: ').textContent();
let content = await this.page.locator('.dive-new-depth-stats .new-depth-stats .dive-stat').getByText('Descent Time: ').textContent();
content = content ?? '';
return content.replace('Descent Time: ', '').trim();
}

async getAscentTime(): Promise<string> {
let content = await this.page.locator('dive-new-depth-stats .new-depth-stats .dive-stat').getByText('Ascent Time: ').textContent();
let content = await this.page.locator('.dive-new-depth-stats .new-depth-stats .dive-stat').getByText('Ascent Time: ').textContent();
content = content ?? '';
return content.replace('Ascent Time: ', '').trim();
}

async getNewDepthPO2(): Promise<string> {
let content = await this.page.locator('dive-new-depth-stats .new-depth-stats .dive-stat').getByText('PO2: ').textContent();
let content = await this.page.locator('.dive-new-depth-stats .new-depth-stats .dive-stat').getByText('PO2: ').textContent();
content = content ?? '';
return content.replace('PO2: ', '').trim();
}

async isNewDepthPO2Warning(): Promise<boolean> {
return this.page
.locator('dive-new-depth-stats .new-depth-stats div.dive-stat', { has: this.page.getByText(/\s*PO2:/) })
.locator('mat-icon')
.locator('.dive-new-depth-stats .new-depth-stats div.dive-stat', { has: this.page.getByText(/\s*PO2:/) })
.locator('.material-icons')
.getByText('warning')
.isVisible();
}

async getNewDepthEND(): Promise<string> {
let content = await this.page.locator('dive-new-depth-stats .new-depth-stats .dive-stat').getByText('END: ').textContent();
let content = await this.page.locator('.dive-new-depth-stats .new-depth-stats .dive-stat').getByText('END: ').textContent();
content = content ?? '';
return content.replace('END: ', '').trim();
}

async getNewDepthNDL(): Promise<string> {
let content = await this.page.locator('dive-new-depth-stats .new-depth-stats .dive-stat').getByText('No Deco Limit: ').textContent();
let content = await this.page.locator('.dive-new-depth-stats .new-depth-stats .dive-stat').getByText('No Deco Limit: ').textContent();
content = content ?? '';
return content.replace('No Deco Limit: ', '').trim();
}

async getNewDepthCeiling(): Promise<string> {
let content = await this.page.locator('dive-new-depth-stats .new-depth-stats .dive-stat').getByText('Ceiling: ').textContent();
let content = await this.page.locator('.dive-new-depth-stats .new-depth-stats .dive-stat').getByText('Ceiling: ').textContent();
content = content ?? '';
return content.replace('Ceiling: ', '').trim();
}
Expand Down
22 changes: 11 additions & 11 deletions src/e2e/pages/change-gas.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { CurrentStatsComponent } from 'e2e/components/current-stats.component';
export class ChangeGasPage {
constructor(private page: Page) {}

public currentStats = new CurrentStatsComponent(this.page.locator('dive-current-stats'));
public currentStats = new CurrentStatsComponent(this.page.locator('.dive-current-stats'));

async getOptimalDecoGas(): Promise<string> {
let content = await this.page.locator('dive-new-gas-input mat-radio-button[value="optimal"] .gas-description').textContent();
let content = await this.page.locator('.dive-new-gas-input .gas-option-optimal .gas-description').textContent();
content = content ?? '';
return content.trim();
}
Expand All @@ -20,7 +20,7 @@ export class ChangeGasPage {

async selectStandardGas(gas: string): Promise<ChangeGasPage> {
await this.page.getByLabel('Standard Gas').click();
await this.page.locator('div.new-gas-col .mat-mdc-form-field-type-mat-select .mat-mdc-text-field-wrapper').click();
await this.page.locator('div.new-gas-col .standard-gas-dropdown [role="combobox"]').click();
await this.page.getByText(gas).click();
return this;
}
Expand All @@ -33,46 +33,46 @@ export class ChangeGasPage {
}

async getNewGasPO2(): Promise<string> {
let content = await this.page.locator('dive-new-gas-stats .new-gas-stats .gas-calculation-chunk .dive-stat').getByText('PO2: ').textContent();
let content = await this.page.locator('.dive-new-gas-stats .new-gas-stats .gas-calculation-chunk .dive-stat').getByText('PO2: ').textContent();
content = content ?? '';
return content.replace('PO2: ', '').trim();
}

async isNewGasPO2Warning(): Promise<boolean> {
return this.page
.locator('dive-new-gas-stats .new-gas-stats div.dive-stat', { has: this.page.getByText(/\s*PO2:/) })
.locator('mat-icon')
.locator('.dive-new-gas-stats .new-gas-stats div.dive-stat', { has: this.page.getByText(/\s*PO2:/) })
.locator('.material-icons')
.getByText('warning')
.isVisible();
}

async getNewGasEND(): Promise<string> {
let content = await this.page.locator('dive-new-gas-stats .new-gas-stats .gas-calculation-chunk .dive-stat').getByText('END: ').textContent();
let content = await this.page.locator('.dive-new-gas-stats .new-gas-stats .gas-calculation-chunk .dive-stat').getByText('END: ').textContent();
content = content ?? '';
return content.replace('END: ', '').trim();
}

async getNewGasNoDecoLimit(): Promise<string> {
let content = await this.page.locator('dive-new-gas-stats .new-gas-stats .gas-calculation-chunk .dive-stat').getByText('No Deco Limit: ').textContent();
let content = await this.page.locator('.dive-new-gas-stats .new-gas-stats .gas-calculation-chunk .dive-stat').getByText('No Deco Limit: ').textContent();
content = content ?? '';
return content.replace('No Deco Limit: ', '').trim();
}

async getNewGasMaxDepthPO2(): Promise<string> {
let content = await this.page.locator('dive-new-gas-stats .new-gas-stats .gas-calculation-chunk .dive-stat').getByText('Max Depth (PO2): ').textContent();
let content = await this.page.locator('.dive-new-gas-stats .new-gas-stats .gas-calculation-chunk .dive-stat').getByText('Max Depth (PO2): ').textContent();
content = content ?? '';
return content.replace('Max Depth (PO2): ', '').trim();
}

async getNewGasMaxDepthEND(): Promise<string> {
let content = await this.page.locator('dive-new-gas-stats .new-gas-stats .gas-calculation-chunk .dive-stat').getByText('Max Depth (END): ').textContent();
let content = await this.page.locator('.dive-new-gas-stats .new-gas-stats .gas-calculation-chunk .dive-stat').getByText('Max Depth (END): ').textContent();
content = content ?? '';
return content.replace('Max Depth (END): ', '').trim();
}

async getNewGasMinDepthHypoxia(): Promise<string> {
let content = await this.page
.locator('dive-new-gas-stats .new-gas-stats .gas-calculation-chunk .dive-stat')
.locator('.dive-new-gas-stats .new-gas-stats .gas-calculation-chunk .dive-stat')
.getByText('Min Depth (Hypoxia): ')
.textContent();
content = content ?? '';
Expand Down
Loading
Loading