Skip to content

Commit

Permalink
Merge pull request #3 from patthiel/longview-fixes
Browse files Browse the repository at this point in the history
Longview test fixes
  • Loading branch information
jstamis-linode authored Dec 16, 2019
2 parents dcdf738 + 0c2c092 commit a540250
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions packages/manager/e2e/config/wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ exports.config = {
// debug: true,
// execArgv: ['--inspect=127.0.0.1:5859'],
// Selenium Host/Port
runner: 'local',
hostname: process.env.DOCKER ? 'selenium' : 'localhost',
port: 4444,
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { assertLog } = require('../../utils/assertionLog');
const { constants } = require('../../constants');
import Page from '../page';

class LongviewLanding extends Page {
Expand Down Expand Up @@ -116,7 +117,7 @@ class LongviewLanding extends Page {
this.deleteButton.click();
this.dialogAlert.waitForDisplayed();
this.lvDelete.click();
this.dialogAlert.waitForDisplayed(true);
this.dialogAlert.waitForExist(constants.wait.normal, true);
}

deleteLVClientsAPI(token, lvClients) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ class LongviewPlanDetails extends Page {

isCurrentPlan(clientCount) {
return $(
`[data-testid=lv-sub-table-row-longview-${clientCount}] [data-testid=current-plan]`
).isDisplayed();
`[data-testid="lv-sub-table-row-longview-${clientCount}"] [data-testid="current-plan"]`
).isExisting();
}

resetToFree() {
Expand Down Expand Up @@ -104,7 +104,7 @@ class LongviewPlanDetails extends Page {
expect(this.isCurrentPlan(clientCount))
.withContext(`should be current plan`)
.toBe(true);
expect(planRow.$('data-qa-radio=true]'))
expect(planRow.$('[data-qa-radio="true"]').isEnabled())
.withContext(`Plan radio button ${assertLog.enabled}`)
.toBe(true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,13 @@ describe('longview suite', () => {
LongviewPlan.planDetailsDisplay();
}
});

it('checks that longview plan can be changed', () => {
// checks for managed account
// // checks for managed account
expect(LongviewLanding.checkForManaged(token))
.withContext(`${managedAccount}`)
.toBe(false);
// Changes a plan
// // Changes a plan
expect(LongviewPlan.isCurrentPlan('free'))
.withContext(`free plan should be set`)
.toBe(true);
Expand All @@ -117,7 +118,7 @@ describe('longview suite', () => {
const lvError = `Too many active Longview clients (${clientCount.length}) for the subscription selected (3). Select a larger subscription or reduce the number of Longview clients.`;
LongviewPlan.lv3Plan.click();
LongviewPlan.changePlanButton.click();
$('[data-qa-notice').waitForDisplayed();
$('[data-qa-notice]').waitForDisplayed();
expect($('[data-qa-error="true"]').isDisplayed())
.withContext(`Client count error ${assertLog.displayed}`)
.toBe(true);
Expand Down

0 comments on commit a540250

Please sign in to comment.