@featherds/dialog
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -6,31 +6,31 @@ const BUTTON = "#button"; | ||
class FeatherDialog { | ||
open() { | ||
browser.url("https://google.com"); | ||
$("body").waitForDisplayed({ timeout: 60000 }); | ||
browser.url(`${process.env.VUE_DEV_SERVER_URL}/Dialog-Demo`); | ||
$("body").waitForDisplayed({ timeout: 60000 }); | ||
this.waitForOpenButton(); | ||
async open() { | ||
await browser.url("https://google.com"); | ||
await (await $("body")).waitForDisplayed({ timeout: 60000 }); | ||
await browser.url(`${process.env.VUE_DEV_SERVER_URL}/Dialog-Demo`); | ||
await (await $("body")).waitForDisplayed({ timeout: 60000 }); | ||
await this.waitForOpenButton(); | ||
} | ||
waitForOpenButton() { | ||
if (!$(BUTTON).isDisplayed()) { | ||
$(BUTTON).waitForDisplayed({ timeout: 60000 }); | ||
async waitForOpenButton() { | ||
if (!(await (await $(BUTTON)).isDisplayed())) { | ||
await (await $(BUTTON)).waitForDisplayed({ timeout: 60000 }); | ||
} | ||
} | ||
waitForDialogToShow() { | ||
if (!$(DIALOG).isDisplayed()) { | ||
$(DIALOG).waitForDisplayed({ timeout: 60000 }); | ||
async waitForDialogToShow() { | ||
if (!(await (await $(DIALOG)).isDisplayed())) { | ||
await (await $(DIALOG)).waitForDisplayed({ timeout: 60000 }); | ||
} | ||
} | ||
dialogDisplayed() { | ||
return $(DIALOG).isDisplayed(); | ||
async dialogDisplayed() { | ||
return await (await $(DIALOG)).isDisplayed(); | ||
} | ||
openModal() { | ||
$(BUTTON).click(); | ||
this.waitForDialogToShow(); | ||
async openModal() { | ||
await (await $(BUTTON)).click(); | ||
await this.waitForDialogToShow(); | ||
} | ||
clickClose() { | ||
$(CLOSE).click(); | ||
async clickClose() { | ||
await (await $(CLOSE)).click(); | ||
} | ||
} | ||
module.exports = new FeatherDialog(); |
const page = require("../pages/featherDialog.page"); | ||
const expect = require("chai").expect; | ||
describe("feather-dialog", () => { | ||
it("should open", () => { | ||
page.open(); | ||
page.openModal(); | ||
expect(page.dialogDisplayed()).to.equal(true); | ||
it("should open", async () => { | ||
await page.open(); | ||
await page.openModal(); | ||
expect(await page.dialogDisplayed()).to.equal(true); | ||
}); | ||
it("should close when X is clicked", () => { | ||
page.open(); | ||
page.openModal(); | ||
page.clickClose(); | ||
expect(page.dialogDisplayed()).to.equal(false); | ||
it("should close when X is clicked", async () => { | ||
await page.open(); | ||
await page.openModal(); | ||
await page.clickClose(); | ||
expect(await page.dialogDisplayed()).to.equal(false); | ||
}); | ||
}); |
{ | ||
"name": "@featherds/dialog", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"publishConfig": { | ||
@@ -12,6 +12,6 @@ "access": "public" | ||
"dependencies": { | ||
"@featherds/composables": "^0.2.3", | ||
"@featherds/icon": "^0.2.3", | ||
"@featherds/styles": "^0.2.3", | ||
"@featherds/utils": "^0.2.3", | ||
"@featherds/composables": "^0.2.4", | ||
"@featherds/icon": "^0.2.4", | ||
"@featherds/styles": "^0.2.4", | ||
"@featherds/utils": "^0.2.4", | ||
"vue": "^3.1.0-0" | ||
@@ -24,3 +24,3 @@ }, | ||
"types": "./src/index.d.ts", | ||
"gitHead": "fad5ee7b18e9e7682050e129629a9da8276adff7" | ||
"gitHead": "14a6e4fa352587dafe9f5e533d289439b8c3ca74" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52658
Updated@featherds/icon@^0.2.4
Updated@featherds/styles@^0.2.4
Updated@featherds/utils@^0.2.4