forked from raiffeisensoftware/build-your-own-radar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Saran] Introduce JavaScript Standard Style linter
- fix js style using standardjs - add linter command in npm package script - add lint check before run test
- Loading branch information
1 parent
6715447
commit 70be411
Showing
35 changed files
with
2,325 additions
and
1,430 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
class base_page{ | ||
/* eslint no-useless-constructor: "off" */ | ||
|
||
constructor(){ | ||
|
||
} | ||
class BasePage { | ||
constructor () { | ||
|
||
} | ||
} | ||
|
||
module.exports = new base_page(); | ||
module.exports = new BasePage() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
var config = require('../../../cypress.json'); | ||
var config = require('../../../cypress.json') | ||
|
||
class byor_page{ | ||
class ByorPage { | ||
constructor () { | ||
this.text_box = "[name='sheetId']" | ||
this.submit = '.button' | ||
} | ||
|
||
constructor(){ | ||
this.text_box="[name='sheetId']"; | ||
this.submit=".button"; | ||
} | ||
provide_excel_name = function() { | ||
cy.get(this.text_box).type(config.excel); | ||
} | ||
provideExcelName () { | ||
cy.get(this.text_box).type(config.excel) | ||
} | ||
|
||
click_submit_button = function() { | ||
cy.get(this.submit).click(); | ||
} | ||
clickSubmitButton () { | ||
cy.get(this.submit).click() | ||
} | ||
} | ||
|
||
module.exports = new byor_page(); | ||
module.exports = new ByorPage() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
class radar_page{ | ||
class RadarPage { | ||
constructor () { | ||
this.blip = '.quadrant-group-second .blip-link' | ||
this.blip_selected = '.quadrant-table.selected .blip-list-item' | ||
this.blip_description = '.blip-item-description.expanded p' | ||
this.sheet2 = '.alternative' | ||
} | ||
|
||
constructor(){ | ||
this.blip=".quadrant-group-second .blip-link"; | ||
this.blip_selected=".quadrant-table.selected .blip-list-item"; | ||
this.blip_description=".blip-item-description.expanded p"; | ||
this.sheet2=".alternative"; | ||
} | ||
clickTheBlipFromInteractiveSection () { | ||
cy.get(this.blip).click() | ||
} | ||
|
||
click_the_blip_from_interactive_section = function() { | ||
cy.get(this.blip).click(); | ||
} | ||
clickTheBlip () { | ||
cy.get(this.blip_selected).click() | ||
} | ||
|
||
click_the_blip = function() { | ||
cy.get(this.blip_selected).click(); | ||
} | ||
validateBlipDescription (text) { | ||
expect(cy.get(this.blip_description).contains(text)) | ||
} | ||
|
||
|
||
validate_blip_description = function(text) { | ||
expect(cy.get(this.blip_description).contains(text)); | ||
} | ||
|
||
click_sheet2 = function() { | ||
cy.get(this.sheet2).click(); | ||
} | ||
clickSheet2 () { | ||
cy.get(this.sheet2).click() | ||
} | ||
} | ||
|
||
module.exports = new radar_page(); | ||
module.exports = new RadarPage() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,34 @@ | ||
var byorPage = require("../pageObjects/byor_page"); | ||
var basePage = require("../pageObjects/base_page"); | ||
var radarPage = require("../pageObjects/radar_page"); | ||
var config = require('../../../cypress.json'); | ||
var byorPage = require('../pageObjects/byor_page') | ||
// var basePage = require('../pageObjects/base_page') | ||
var radarPage = require('../pageObjects/radar_page') | ||
// var config = require('../../../cypress.json') | ||
|
||
Cypress.on('uncaught:exception', (err, runnable) => { | ||
return false | ||
}); | ||
|
||
describe("Build your radar", function(){ | ||
it("validate 1st sheet", function(){ | ||
cy.visit(Cypress.env('host')); | ||
byorPage.provide_excel_name(); | ||
byorPage.click_submit_button(); | ||
radarPage.click_the_blip_from_interactive_section(); | ||
radarPage.click_the_blip(); | ||
radarPage.validate_blip_description("test"); | ||
}); | ||
}); | ||
|
||
describe("Validate multiple sheet", function() { | ||
it("validate 2nd sheet", function () { | ||
cy.visit(Cypress.env('host')); | ||
byorPage.provide_excel_name(); | ||
byorPage.click_submit_button(); | ||
radarPage.click_sheet2(); | ||
radarPage.click_the_blip_from_interactive_section(); | ||
radarPage.click_the_blip(); | ||
radarPage.validate_blip_description("testing"); | ||
}); | ||
}); | ||
if (err) { | ||
console.log(err.stack) | ||
} | ||
return false | ||
}) | ||
|
||
describe('Build your radar', function () { | ||
it('validate 1st sheet', function () { | ||
cy.visit(Cypress.env('host')) | ||
byorPage.provideExcelName() | ||
byorPage.clickSubmitButton() | ||
radarPage.clickTheBlipFromInteractiveSection() | ||
radarPage.clickTheBlip() | ||
radarPage.validateBlipDescription('test') | ||
}) | ||
}) | ||
|
||
describe('Validate multiple sheet', function () { | ||
it('validate 2nd sheet', function () { | ||
cy.visit(Cypress.env('host')) | ||
byorPage.provideExcelName() | ||
byorPage.clickSubmitButton() | ||
radarPage.clickSheet2() | ||
radarPage.clickTheBlipFromInteractiveSection() | ||
radarPage.clickTheBlip() | ||
radarPage.validateBlipDescription('testing') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
let basePage = require("../pageObjects/base_page"); | ||
// let basePage = require('../pageObjects/base_page') | ||
|
||
describe('Hooks', function() { | ||
before(function() { | ||
// basePage.login(); | ||
}) | ||
describe('Hooks', function () { | ||
before(function () { | ||
// basePage.login(); | ||
}) | ||
|
||
after(function() { | ||
// runs once after all tests in the block | ||
}) | ||
}) | ||
after(function () { | ||
// runs once after all tests in the block | ||
}) | ||
}) |
Oops, something went wrong.