Skip to content

Commit

Permalink
build: upgrade deps to latest
Browse files Browse the repository at this point in the history
- Upgrade Svelte Kit to 1.0.0-next.431 and migrate to new API
  • Loading branch information
camargo committed Aug 23, 2022
1 parent 6dfad32 commit 69d4304
Show file tree
Hide file tree
Showing 70 changed files with 1,157 additions and 957 deletions.
3 changes: 2 additions & 1 deletion e2e-tests/fixtures/Constraints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ export class Constraints {
}

async goto() {
await this.page.goto('/plans');
await this.page.goto('/plans', { waitUntil: 'networkidle' });
await this.page.goto('/constraints', { waitUntil: 'networkidle' });
await this.page.waitForTimeout(1000);
}

async selectModel() {
Expand Down
3 changes: 2 additions & 1 deletion e2e-tests/fixtures/Dictionaries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ export class Dictionaries {
}

async goto() {
await this.page.goto('/plans');
await this.page.goto('/plans', { waitUntil: 'networkidle' });
await this.page.goto('/dictionaries', { waitUntil: 'networkidle' });
await this.page.waitForTimeout(1000);
}

updatePage(page: Page): void {
Expand Down
3 changes: 2 additions & 1 deletion e2e-tests/fixtures/ExpansionRules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ export class ExpansionRules {
}

async goto() {
await this.page.goto('/plans');
await this.page.goto('/plans', { waitUntil: 'networkidle' });
await this.page.goto('/expansion/rules', { waitUntil: 'networkidle' });
await this.page.waitForTimeout(1000);
await expect(this.rulesNavButton).toHaveClass(/selected/);
}

Expand Down
3 changes: 2 additions & 1 deletion e2e-tests/fixtures/ExpansionSets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ export class ExpansionSets {
}

async goto() {
await this.page.goto('/plans');
await this.page.goto('/plans', { waitUntil: 'networkidle' });
await this.page.goto('/expansion/sets', { waitUntil: 'networkidle' });
await this.page.waitForTimeout(1000);
await expect(this.setsNavButton).toHaveClass(/selected/);
}

Expand Down
15 changes: 8 additions & 7 deletions e2e-tests/fixtures/Models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,28 @@ export class Models {
await expect(this.tableRow).not.toBeVisible();
}

async fillInputFile() {
async fillInputFile(jarPath: string = this.jarPath) {
await this.inputFile.focus();
await this.inputFile.setInputFiles(this.jarPath);
await this.inputFile.setInputFiles(jarPath);
await this.inputFile.evaluate(e => e.blur());
}

async fillInputName() {
async fillInputName(modelName: string = this.modelName) {
await this.inputName.focus();
await this.inputName.fill(this.modelName);
await this.inputName.fill(modelName);
await this.inputName.evaluate(e => e.blur());
}

async fillInputVersion() {
async fillInputVersion(modelVersion: string = this.modelVersion) {
await this.inputVersion.focus();
await this.inputVersion.fill(this.modelVersion);
await this.inputVersion.fill(modelVersion);
await this.inputVersion.evaluate(e => e.blur());
}

async goto() {
await this.page.goto('/plans');
await this.page.goto('/plans', { waitUntil: 'networkidle' });
await this.page.goto('/models', { waitUntil: 'networkidle' });
await this.page.waitForTimeout(1000);
}

updatePage(page: Page): void {
Expand Down
3 changes: 2 additions & 1 deletion e2e-tests/fixtures/Plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ export class Plan {
* Re-run the tests and increase the timeout if you get consistent failures.
*/
async goto() {
await this.page.goto('/plans');
await this.page.goto('/plans', { waitUntil: 'networkidle' });
await this.page.waitForTimeout(1200);
await this.page.goto(`/plans/${this.plans.planId}`, { waitUntil: 'networkidle' });
await this.page.waitForTimeout(1000);
}

async runAnalysis() {
Expand Down
1 change: 1 addition & 0 deletions e2e-tests/fixtures/Plans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export class Plans {

async goto() {
await this.page.goto('/plans', { waitUntil: 'networkidle' });
await this.page.waitForTimeout(1000);
}

async selectInputModel() {
Expand Down
3 changes: 2 additions & 1 deletion e2e-tests/fixtures/SchedulingGoals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ export class SchedulingGoals {
}

async goto() {
await this.page.goto('/plans');
await this.page.goto('/plans', { waitUntil: 'networkidle' });
await this.page.goto('/scheduling/goals', { waitUntil: 'networkidle' });
await this.page.waitForTimeout(1000);
await expect(this.goalsNavButton).toHaveClass(/selected/);
}

Expand Down
7 changes: 2 additions & 5 deletions e2e-tests/tests/models.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ test.afterAll(async () => {
});

test.describe.serial('Models', () => {
test.beforeEach(async () => {
await page.reload();
});

test('Create model button should be disabled with no errors', async () => {
await expect(models.alertError).not.toBeVisible();
await expect(models.createButton).toBeDisabled();
Expand All @@ -27,11 +23,13 @@ test.describe.serial('Models', () => {
test('Create model button should be disabled after only entering a name', async () => {
await models.fillInputName();
await expect(models.createButton).toBeDisabled();
await models.fillInputName('');
});

test('Create model button should be disabled after only entering a version', async () => {
await models.fillInputVersion();
await expect(models.createButton).toBeDisabled();
await models.fillInputVersion('');
});

test('Create model button should be disabled after only adding a file', async () => {
Expand All @@ -42,7 +40,6 @@ test.describe.serial('Models', () => {
test('Create button should be enabled after entering a name, version, and file', async () => {
await models.fillInputName();
await models.fillInputVersion();
await models.fillInputFile();
await expect(models.createButton).not.toBeDisabled();
});

Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/tests/plans.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ test.afterAll(async () => {

test.describe.serial('Plans', () => {
test.beforeEach(async () => {
await page.reload();
await page.reload({ waitUntil: 'networkidle' });
});

test('Create plan button should be disabled with no errors', async () => {
Expand Down
Loading

0 comments on commit 69d4304

Please sign in to comment.