Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: upgrade deps to latest #104

Merged
merged 1 commit into from
Aug 24, 2022
Merged
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
5 changes: 4 additions & 1 deletion e2e-tests/fixtures/Constraints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ export class Constraints {
await expect(this.saveButton).not.toBeDisabled();
await this.saveButton.click();
await this.page.waitForURL(`${baseURL}/constraints/edit/*`);
await this.page.waitForTimeout(1000);
await expect(this.saveButton).not.toBeDisabled();
await expect(this.closeButton).not.toBeDisabled();
await this.closeButton.click();
await this.page.waitForURL(`${baseURL}/constraints`);
await this.page.waitForTimeout(1000);
}

async deleteConstraint() {
Expand Down Expand Up @@ -87,8 +89,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
6 changes: 5 additions & 1 deletion e2e-tests/fixtures/ExpansionRules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class ExpansionRules {
await expect(this.newButton).not.toBeDisabled();
await this.newButton.click();
await this.page.waitForURL(`${baseURL}/expansion/rules/new`);
await this.page.waitForTimeout(1000);
await expect(this.saveButton).toBeDisabled();
await this.selectCommandDictionary();
await this.selectModel();
Expand All @@ -40,10 +41,12 @@ export class ExpansionRules {
await expect(this.saveButton).not.toBeDisabled();
await this.saveButton.click();
await this.page.waitForURL(`${baseURL}/expansion/rules/edit/*`);
await this.page.waitForTimeout(1000);
await expect(this.saveButton).not.toBeDisabled();
await expect(this.closeButton).not.toBeDisabled();
await this.closeButton.click();
await this.page.waitForURL(`${baseURL}/expansion/rules`);
await this.page.waitForTimeout(1000);
}

async deleteExpansionRule() {
Expand Down Expand Up @@ -73,8 +76,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
5 changes: 4 additions & 1 deletion e2e-tests/fixtures/ExpansionSets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,21 @@ export class ExpansionSets {
await expect(this.newButton).not.toBeDisabled();
await this.newButton.click();
await this.page.waitForURL(`${baseURL}/expansion/sets/new`);
await this.page.waitForTimeout(1000);
await expect(this.saveButton).toBeDisabled();
await this.selectCommandDictionary();
await this.selectModel();
await this.selectRule();
await expect(this.saveButton).not.toBeDisabled();
await this.saveButton.click();
await this.page.waitForURL(`${baseURL}/expansion/sets`);
await this.page.waitForTimeout(1000);
}

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
5 changes: 4 additions & 1 deletion e2e-tests/fixtures/Plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export class Plan {
const [newConstraintPage] = await Promise.all([this.page.waitForEvent('popup'), this.constraintNewButton.click()]);
this.constraints.updatePage(newConstraintPage);
await newConstraintPage.waitForURL(`${baseURL}/constraints/new`);
await this.page.waitForTimeout(1000);
await this.constraints.createConstraint(baseURL);
await newConstraintPage.close();
this.constraints.updatePage(this.page);
Expand All @@ -66,6 +67,7 @@ export class Plan {
]);
this.schedulingGoals.updatePage(newSchedulingGoalPage);
await newSchedulingGoalPage.waitForURL(`${baseURL}/scheduling/goals/new?specId=*`);
await this.page.waitForTimeout(1000);
await this.schedulingGoals.createSchedulingGoal(baseURL);
await newSchedulingGoalPage.close();
this.schedulingGoals.updatePage(this.page);
Expand All @@ -79,9 +81,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
5 changes: 4 additions & 1 deletion e2e-tests/fixtures/SchedulingGoals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ export class SchedulingGoals {
await expect(this.saveButton).not.toBeDisabled();
await this.saveButton.click();
await this.page.waitForURL(`${baseURL}/scheduling/goals/edit/*`);
await this.page.waitForTimeout(1000);
await expect(this.saveButton).not.toBeDisabled();
await expect(this.closeButton).not.toBeDisabled();
await this.closeButton.click();
await this.page.waitForURL(`${baseURL}/scheduling/goals`);
await this.page.waitForTimeout(1000);
}

async deleteSchedulingGoal() {
Expand Down Expand Up @@ -80,8 +82,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