Skip to content

Commit

Permalink
test: some small fixes to improve stability
Browse files Browse the repository at this point in the history
Closes #917
  • Loading branch information
henrywang authored Mar 27, 2020
1 parent 91c8dd9 commit 5acd0a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions test/end-to-end/specs/imageBuilding.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe("View Blueprint Page", function() {
viewBlueprintPage.imagesTab.click();

// show actions menu
viewBlueprintPage.imageMoreButton.click();
viewBlueprintPage.imageMoreButton.waitForExist(timeout);
});

after(function() {
Expand Down Expand Up @@ -102,8 +102,8 @@ describe("View Blueprint Page", function() {
});

it("should show correct download API in download link", function() {
viewBlueprintPage.imageMoreButton.click()
const link = viewBlueprintPage.imageDownloadButton.getAttribute("href");
console.log(link);
const jsonStr = link.split("?")[1];

// decode base64 to json
Expand Down
7 changes: 1 addition & 6 deletions test/end-to-end/wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ exports.config = {
* @param {Array.<String>} specs List of spec file paths that are to be run
*/
before: function(capabilities, specs) {
console.log(specs);
// Add commands to WebdriverIO
Object.keys(commands).forEach(key => {
if (key === "setInputValue" || key === "element" || key === "sendKey") {
Expand All @@ -237,7 +236,6 @@ exports.config = {
if (specs[0].indexOf("api.test") !== -1) {
browser.startLoraxIfItDoesNotStart();

// try {
const blankNewButton = $('.blank-slate-pf [id="cmpsr-btn-crt-blueprint"]');
blankNewButton.waitForDisplayed(timeout/2);
const name = faker.lorem.slug();
Expand All @@ -250,9 +248,6 @@ exports.config = {
const description = faker.lorem.sentence();
browser.newBlueprint(name, description);
})
// } catch (e) {
// console.error(e);
// }
}
},
/**
Expand All @@ -261,7 +256,7 @@ exports.config = {
* @param {Array} args arguments that command would receive
*/
beforeCommand: function() {
browser.pause(100);
browser.pause(200);
},
/**
* Hook that gets executed before the suite starts
Expand Down

0 comments on commit 5acd0a0

Please sign in to comment.