Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,7 @@ export async function loadExample(exampleName: string, version: Version = Versio
fixture.detectChanges();

const examples = version === Version.V0_9 ? EXAMPLES_V09 : EXAMPLES_V08;
let example = examples.find(ex => ex.name === exampleName);

if (version === Version.V0_8 && !example) {
example =
examples.find(ex => ex.name === `${exampleName} (basic)`) ||
examples.find(ex => ex.name === `${exampleName} (minimal)`);
}
const example = examples.find(ex => ex.name === exampleName);

expect(example).withContext(`Example not found: ${exampleName}`).toBeTruthy();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import {Version, getCanvas, loadExample} from '../utils/test_utils';

describe('Example: Complex Layout (minimal) (v0.8)', () => {
describe('Example: Complex Layout (v0.8)', () => {
let textContent: string;

beforeEach(async () => {
await loadExample('Complex Layout (minimal)', Version.V0_8);
await loadExample('Complex Layout', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import {ComponentFixture} from '@angular/core/testing';
import {DemoComponent} from '../../demo.component';
import {Version, getCanvas, loadExample, wait} from '../utils/test_utils';

describe('Example: Interactive Button (minimal) (v0.8)', () => {
describe('Example: Interactive Button (v0.8)', () => {
let textContent: string;
let fixture: ComponentFixture<DemoComponent>;

beforeEach(async () => {
fixture = await loadExample('Interactive Button (minimal)', Version.V0_8);
fixture = await loadExample('Interactive Button', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import {Version, getCanvas, loadExample} from '../utils/test_utils';

describe('Example: Row Layout (minimal) (v0.8)', () => {
describe('Example: Row Layout (v0.8)', () => {
let textContent: string;

beforeEach(async () => {
await loadExample('Row Layout (minimal)', Version.V0_8);
await loadExample('Row Layout', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import {ComponentFixture} from '@angular/core/testing';
import {DemoComponent} from '../../demo.component';
import {Version, getCanvas, loadExample, wait} from '../utils/test_utils';

describe('Example: Login Form (minimal) (v0.8)', () => {
describe('Example: Simple Login Form (v0.8)', () => {
let textContent: string;
let fixture: ComponentFixture<DemoComponent>;

beforeEach(async () => {
fixture = await loadExample('Login Form (minimal)', Version.V0_8);
fixture = await loadExample('Simple Login Form', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import {Version, getCanvas, loadExample} from '../utils/test_utils';

describe('Example: Simple Text (minimal) (v0.8)', () => {
describe('Example: Simple Text (v0.8)', () => {
let textContent: string;

beforeEach(async () => {
await loadExample('Simple Text (minimal)', Version.V0_8);
await loadExample('Simple Text', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import {ComponentFixture} from '@angular/core/testing';
import {DemoComponent} from '../../demo.component';
import {Version, getCanvas, loadExample, wait} from '../utils/test_utils';

describe('Example: Calendar Day (basic) (v0.8)', () => {
describe('Example: Calendar Day (v0.8)', () => {
let textContent: string;
let fixture: ComponentFixture<DemoComponent>;

beforeEach(async () => {
fixture = await loadExample('Calendar Day (basic)', Version.V0_8);
fixture = await loadExample('Calendar Day', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import {Version, getCanvas, loadExample} from '../utils/test_utils';

describe('Example: Weather Current (basic) (v0.8)', () => {
describe('Example: Weather Current (v0.8)', () => {
let textContent: string;

beforeEach(async () => {
await loadExample('Weather Current (basic)', Version.V0_8);
await loadExample('Weather Current', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import {ComponentFixture} from '@angular/core/testing';
import {DemoComponent} from '../../demo.component';
import {Version, getCanvas, loadExample, wait} from '../utils/test_utils';

describe('Example: Product Card (basic) (v0.8)', () => {
describe('Example: Product Card (v0.8)', () => {
let textContent: string;
let fixture: ComponentFixture<DemoComponent>;

beforeEach(async () => {
fixture = await loadExample('Product Card (basic)', Version.V0_8);
fixture = await loadExample('Product Card', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import {ComponentFixture} from '@angular/core/testing';
import {DemoComponent} from '../../demo.component';
import {Version, getCanvas, loadExample, wait} from '../utils/test_utils';

describe('Example: Music Player (basic) (v0.8)', () => {
describe('Example: Music Player (v0.8)', () => {
let textContent: string;
let fixture: ComponentFixture<DemoComponent>;

beforeEach(async () => {
fixture = await loadExample('Music Player (basic)', Version.V0_8);
fixture = await loadExample('Music Player', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import {Version, getCanvas, loadExample} from '../utils/test_utils';

describe('Example: Task Card (basic) (v0.8)', () => {
describe('Example: Task Card (v0.8)', () => {
let textContent: string;

beforeEach(async () => {
await loadExample('Task Card (basic)', Version.V0_8);
await loadExample('Task Card', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import {ComponentFixture} from '@angular/core/testing';
import {DemoComponent} from '../../demo.component';
import {Version, getCanvas, loadExample, wait} from '../utils/test_utils';

describe('Example: User Profile (basic) (v0.8)', () => {
describe('Example: User Profile (v0.8)', () => {
let textContent: string;
let fixture: ComponentFixture<DemoComponent>;

beforeEach(async () => {
fixture = await loadExample('User Profile (basic)', Version.V0_8);
fixture = await loadExample('User Profile', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import {ComponentFixture} from '@angular/core/testing';
import {DemoComponent} from '../../demo.component';
import {Version, getCanvas, loadExample, wait} from '../utils/test_utils';

describe('Example: Login Form (basic) (v0.8)', () => {
describe('Example: Login Form (v0.8)', () => {
let textContent: string;
let fixture: ComponentFixture<DemoComponent>;

beforeEach(async () => {
fixture = await loadExample('Login Form (basic)', Version.V0_8);
fixture = await loadExample('Login Form', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import {ComponentFixture} from '@angular/core/testing';
import {DemoComponent} from '../../demo.component';
import {Version, getCanvas, loadExample, wait} from '../utils/test_utils';

describe('Example: Notification Permission (basic) (v0.8)', () => {
describe('Example: Notification Permission (v0.8)', () => {
let textContent: string;
let fixture: ComponentFixture<DemoComponent>;

beforeEach(async () => {
fixture = await loadExample('Notification Permission (basic)', Version.V0_8);
fixture = await loadExample('Notification Permission', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import {ComponentFixture} from '@angular/core/testing';
import {DemoComponent} from '../../demo.component';
import {Version, getCanvas, loadExample, wait} from '../utils/test_utils';

describe('Example: Purchase Complete (basic) (v0.8)', () => {
describe('Example: Purchase Complete (v0.8)', () => {
let textContent: string;
let fixture: ComponentFixture<DemoComponent>;

beforeEach(async () => {
fixture = await loadExample('Purchase Complete (basic)', Version.V0_8);
fixture = await loadExample('Purchase Complete', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import {Version, getCanvas, loadExample} from '../utils/test_utils';

describe('Example: Chat Message (basic) (v0.8)', () => {
describe('Example: Chat Message (v0.8)', () => {
let textContent: string;

beforeEach(async () => {
await loadExample('Chat Message (basic)', Version.V0_8);
await loadExample('Chat Message', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import {ComponentFixture} from '@angular/core/testing';
import {DemoComponent} from '../../demo.component';
import {Version, getCanvas, loadExample, wait} from '../utils/test_utils';

describe('Example: Coffee Order (basic) (v0.8)', () => {
describe('Example: Coffee Order (v0.8)', () => {
let textContent: string;
let fixture: ComponentFixture<DemoComponent>;

beforeEach(async () => {
fixture = await loadExample('Coffee Order (basic)', Version.V0_8);
fixture = await loadExample('Coffee Order', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import {Version, getCanvas, loadExample} from '../utils/test_utils';

describe('Example: Sports Player (basic) (v0.8)', () => {
describe('Example: Sports Player (v0.8)', () => {
let textContent: string;

beforeEach(async () => {
await loadExample('Sports Player (basic)', Version.V0_8);
await loadExample('Sports Player', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import {ComponentFixture} from '@angular/core/testing';
import {DemoComponent} from '../../demo.component';
import {Version, getCanvas, loadExample, wait} from '../utils/test_utils';

describe('Example: Account Balance (basic) (v0.8)', () => {
describe('Example: Account Balance (v0.8)', () => {
let textContent: string;
let fixture: ComponentFixture<DemoComponent>;

beforeEach(async () => {
fixture = await loadExample('Account Balance (basic)', Version.V0_8);
fixture = await loadExample('Account Balance', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import {Version, getCanvas, loadExample} from '../utils/test_utils';

describe('Example: Workout Summary (basic) (v0.8)', () => {
describe('Example: Workout Summary (v0.8)', () => {
let textContent: string;

beforeEach(async () => {
await loadExample('Workout Summary (basic)', Version.V0_8);
await loadExample('Workout Summary', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import {ComponentFixture} from '@angular/core/testing';
import {DemoComponent} from '../../demo.component';
import {Version, getCanvas, loadExample, wait} from '../utils/test_utils';

describe('Example: Event Detail (basic) (v0.8)', () => {
describe('Example: Event Detail (v0.8)', () => {
let textContent: string;
let fixture: ComponentFixture<DemoComponent>;

beforeEach(async () => {
fixture = await loadExample('Event Detail (basic)', Version.V0_8);
fixture = await loadExample('Event Detail', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import {Version, getCanvas, loadExample} from '../utils/test_utils';

describe('Example: Track List (basic) (v0.8)', () => {
describe('Example: Track List (v0.8)', () => {
let textContent: string;

beforeEach(async () => {
await loadExample('Track List (basic)', Version.V0_8);
await loadExample('Track List', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import {ComponentFixture} from '@angular/core/testing';
import {DemoComponent} from '../../demo.component';
import {Version, getCanvas, loadExample, wait} from '../utils/test_utils';

describe('Example: Software Purchase (basic) (v0.8)', () => {
describe('Example: Software Purchase (v0.8)', () => {
let textContent: string;
let fixture: ComponentFixture<DemoComponent>;

beforeEach(async () => {
fixture = await loadExample('Software Purchase (basic)', Version.V0_8);
fixture = await loadExample('Software Purchase', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import {ComponentFixture} from '@angular/core/testing';
import {DemoComponent} from '../../demo.component';
import {Version, getCanvas, loadExample} from '../utils/test_utils';

describe('Example: Restaurant Card (basic) (v0.8)', () => {
describe('Example: Restaurant Card (v0.8)', () => {
let fixture: ComponentFixture<DemoComponent>;
let textContent: string;

beforeEach(async () => {
fixture = await loadExample('Restaurant Card (basic)', Version.V0_8);
fixture = await loadExample('Restaurant Card', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import {Version, getCanvas, loadExample} from '../utils/test_utils';

describe('Example: Shipping Status (basic) (v0.8)', () => {
describe('Example: Shipping Status (v0.8)', () => {
let textContent: string;

beforeEach(async () => {
await loadExample('Shipping Status (basic)', Version.V0_8);
await loadExample('Shipping Status', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import {Version, getCanvas, loadExample} from '../utils/test_utils';

describe('Example: Credit Card (basic) (v0.8)', () => {
describe('Example: Credit Card (v0.8)', () => {
let textContent: string;

beforeEach(async () => {
await loadExample('Credit Card (basic)', Version.V0_8);
await loadExample('Credit Card', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import {Version, getCanvas, loadExample} from '../utils/test_utils';

describe('Example: Step Counter (basic) (v0.8)', () => {
describe('Example: Step Counter (v0.8)', () => {
let textContent: string;

beforeEach(async () => {
await loadExample('Step Counter (basic)', Version.V0_8);
await loadExample('Step Counter', Version.V0_8);
textContent = getCanvas().textContent;
});

Expand Down
Loading
Loading