diff --git a/UI/tests/specs/stores/business-types.spec.js b/UI/tests/specs/stores/business-types.spec.js index 4da4825181..2a2ac56b7e 100644 --- a/UI/tests/specs/stores/business-types.spec.js +++ b/UI/tests/specs/stores/business-types.spec.js @@ -15,26 +15,26 @@ beforeEach(() => { describe("Business Types Store", () => { it("initialize", async () => { await businessTypes.initialize(); - expect(businessTypes.fields).toStrictEqual([ + expect(businessTypes.fields).toMatchObject([ "id", "description", "discount" ]); - expect(businessTypes.items).toStrictEqual([ + expect(businessTypes.items).toMatchObject([ { id: "1", description: "Big customer", discount: 0.05, - _meta: { ETag: "1234567890" } + _meta: { "ETag": "1234567890" } }, { id: "2", description: "Bigger customer", discount: 0.15, - _meta: { ETag: "1234567890" } + _meta: { "ETag": "1234567890" } } ]); - expect(businessTypes._links).toStrictEqual([ + expect(businessTypes._links).toMatchObject([ { title: "HTML", rel: "download", @@ -46,7 +46,7 @@ describe("Business Types Store", () => { it("get Business Type #2", async () => { await businessTypes.initialize(); const businessType = await businessTypes.get("2"); - expect(businessType).toStrictEqual({ + expect(businessType).toMatchObject({ _meta: { ETag: "1234567890" }, id: "2", description: "Bigger customer", @@ -61,18 +61,18 @@ describe("Business Types Store", () => { description: "Bigger customer", discount: 0.25 }); - expect(businessTypes.items).toStrictEqual([ + expect(businessTypes.items).toMatchObject([ { id: "1", description: "Big customer", discount: 0.05, - _meta: { ETag: "1234567890" } + _meta: { "ETag": "1234567890" } }, { id: "2", description: "Bigger customer", discount: 0.25, - _meta: { ETag: "1234567891" } + _meta: { "ETag": "1234567891" } } ]); }); @@ -93,8 +93,8 @@ describe("Business Types Store", () => { }); expect( businessTypes.items[businessTypes.items.length - 1] - ).toStrictEqual({ - _meta: { ETag: "1234567891" }, + ).toMatchObject({ + _meta: { "ETag": "1234567891" }, id: "3", description: "Great customer", discount: 0.22 diff --git a/UI/tests/specs/stores/countries.spec.js b/UI/tests/specs/stores/countries.spec.js index cfd6a3fffd..42babe679c 100644 --- a/UI/tests/specs/stores/countries.spec.js +++ b/UI/tests/specs/stores/countries.spec.js @@ -15,13 +15,13 @@ beforeEach(() => { describe("Country Store", () => { it("initialize", async () => { await countries.initialize(); - expect(countries.fields).toStrictEqual([ + expect(countries.fields).toMatchObject([ "_meta", "code", "default", "name" ]); - expect(countries.items).toStrictEqual([ + expect(countries.items).toMatchObject([ { code: "ca", default: false, @@ -35,7 +35,7 @@ describe("Country Store", () => { _meta: { ETag: "1234567890" } } ]); - expect(countries._links).toStrictEqual([ + expect(countries._links).toMatchObject([ { title: "HTML", rel: "download", @@ -47,7 +47,7 @@ describe("Country Store", () => { it("get United States country us", async () => { await countries.initialize(); const country = await countries.get("us"); - expect(country).toStrictEqual({ + expect(country).toMatchObject({ _meta: { ETag: "1234567890" }, code: "us", default: false, @@ -59,7 +59,7 @@ describe("Country Store", () => { await countries.initialize(); await countries.get("us"); await countries.save("us", { code: "us", name: "America" }); - expect(countries.items).toStrictEqual([ + expect(countries.items).toMatchObject([ { code: "ca", default: false, @@ -85,7 +85,7 @@ describe("Country Store", () => { it("add Atlantida country zz", async () => { await countries.initialize(); await countries.add({ code: "zz", name: "Atlantida" }); - expect(countries.items[countries.items.length - 1]).toStrictEqual({ + expect(countries.items[countries.items.length - 1]).toMatchObject({ _meta: { ETag: "1234567891" }, code: "zz", name: "Atlantida" diff --git a/UI/tests/specs/stores/gifis.spec.js b/UI/tests/specs/stores/gifis.spec.js index 8bc1bc43bb..c000abbb40 100644 --- a/UI/tests/specs/stores/gifis.spec.js +++ b/UI/tests/specs/stores/gifis.spec.js @@ -15,8 +15,8 @@ beforeEach(() => { describe("GIFI Store", () => { it("initialize", async () => { await gifies.initialize(); - expect(gifies.fields).toStrictEqual(["accno", "description"]); - expect(await gifies.items).toStrictEqual([ + expect(gifies.fields).toMatchObject(["accno", "description"]); + expect(await gifies.items).toMatchObject([ { accno: "0000", description: "Dummy account", @@ -33,7 +33,7 @@ describe("GIFI Store", () => { it("get 0000", async () => { await gifies.initialize(); const gifi = await gifies.get("0000"); - expect(gifi).toStrictEqual({ + expect(gifi).toMatchObject({ _meta: { ETag: "1234567890" }, accno: "0000", description: "Dummy account" @@ -47,7 +47,7 @@ describe("GIFI Store", () => { accno: "0000", description: "Funny account" }); - expect(gifies.items).toStrictEqual([ + expect(gifies.items).toMatchObject([ { accno: "0000", description: "Funny account", @@ -71,7 +71,7 @@ describe("GIFI Store", () => { it("add Dummy account 0002", async () => { await gifies.initialize(); await gifies.add({ accno: "0002", description: "Dummy account 2" }); - expect(gifies.items[gifies.items.length - 1]).toStrictEqual({ + expect(gifies.items[gifies.items.length - 1]).toMatchObject({ _meta: { ETag: "1234567891" }, accno: "0002", description: "Dummy account 2" diff --git a/UI/tests/specs/stores/languages.spec.js b/UI/tests/specs/stores/languages.spec.js index 947d2001f5..3e98609c64 100644 --- a/UI/tests/specs/stores/languages.spec.js +++ b/UI/tests/specs/stores/languages.spec.js @@ -15,13 +15,13 @@ beforeEach(() => { describe("Language Store", () => { it("initialize", async () => { await languages.initialize(); - expect(languages.fields).toStrictEqual([ + expect(languages.fields).toMatchObject([ "_meta", "code", "default", "description" ]); - expect(languages.items).toStrictEqual([ + expect(languages.items).toMatchObject([ { code: "en", default: false, @@ -35,7 +35,7 @@ describe("Language Store", () => { _meta: { ETag: "2345678901" } } ]); - expect(languages._links).toStrictEqual([ + expect(languages._links).toMatchObject([ { title: "HTML", rel: "download", @@ -47,7 +47,7 @@ describe("Language Store", () => { it("get English languages en", async () => { await languages.initialize(); const language = await languages.get("en"); - expect(language).toStrictEqual({ + expect(language).toMatchObject({ _meta: { ETag: "1234567890" }, code: "en", default: false, @@ -62,7 +62,7 @@ describe("Language Store", () => { code: "en", description: "English (american)" }); - expect(languages.items).toStrictEqual([ + expect(languages.items).toMatchObject([ { code: "en", default: false, @@ -88,7 +88,7 @@ describe("Language Store", () => { it("add Mayan language my", async () => { await languages.initialize(); await languages.add({ code: "my", description: "Mayan" }); - expect(languages.items[languages.items.length - 1]).toStrictEqual({ + expect(languages.items[languages.items.length - 1]).toMatchObject({ _meta: { ETag: "1234567891" }, code: "my", description: "Mayan" diff --git a/UI/tests/specs/stores/pricegroups.spec.js b/UI/tests/specs/stores/pricegroups.spec.js index f7dbe6f71d..b8732acab1 100644 --- a/UI/tests/specs/stores/pricegroups.spec.js +++ b/UI/tests/specs/stores/pricegroups.spec.js @@ -15,8 +15,8 @@ beforeEach(() => { describe("Pricegroup Store", () => { it("initialize", async () => { await pricegroups.initialize(); - expect(pricegroups.fields).toStrictEqual(["id", "description"]); - expect(pricegroups.items).toStrictEqual([ + expect(pricegroups.fields).toMatchObject(["id", "description"]); + expect(pricegroups.items).toMatchObject([ { id: "1", description: "Price group 1", @@ -28,7 +28,7 @@ describe("Pricegroup Store", () => { _meta: { ETag: "1234567889" } } ]); - expect(pricegroups._links).toStrictEqual([ + expect(pricegroups._links).toMatchObject([ { title: "HTML", rel: "download", @@ -40,7 +40,7 @@ describe("Pricegroup Store", () => { it("get Price Group 1", async () => { await pricegroups.initialize(); const pricegroup = await pricegroups.get("1"); - expect(pricegroup).toStrictEqual({ + expect(pricegroup).toMatchObject({ _meta: { ETag: "1234567890" }, id: "1", description: "Price group 1" @@ -51,7 +51,7 @@ describe("Pricegroup Store", () => { await pricegroups.initialize(); await pricegroups.get("1"); await pricegroups.save("1", { id: "1", description: "Price Group #1" }); - expect(pricegroups.items).toStrictEqual([ + expect(pricegroups.items).toMatchObject([ { id: "1", description: "Price Group #1", @@ -75,7 +75,7 @@ describe("Pricegroup Store", () => { it("add Price Group 3", async () => { await pricegroups.initialize(); await pricegroups.add({ id: "3", description: "Price Group #3" }); - expect(pricegroups.items[pricegroups.items.length - 1]).toStrictEqual({ + expect(pricegroups.items[pricegroups.items.length - 1]).toMatchObject({ _meta: { ETag: "1234567891" }, id: "3", description: "Price Group #3" diff --git a/UI/tests/specs/stores/sessionUser.spec.js b/UI/tests/specs/stores/sessionUser.spec.js index 949b31e2fd..bca659a7cf 100644 --- a/UI/tests/specs/stores/sessionUser.spec.js +++ b/UI/tests/specs/stores/sessionUser.spec.js @@ -16,13 +16,13 @@ describe("Session Store", () => { it("initialize", async () => { await session.initialize(); // expect(session.password_expiration).toBe("P1Y"); - expect(session.roles).toStrictEqual([ + expect(session.roles).toMatchObject([ "account_all", "base_user", "cash_all", "gl_all" ]); - expect(session.preferences).toStrictEqual({ + expect(session.preferences).toMatchObject({ numberformat: "1000.00", printer: null, stylesheet: "ledgersmb.css", diff --git a/UI/tests/specs/stores/sics.spec.js b/UI/tests/specs/stores/sics.spec.js index 21cd033d93..e8dd70a9e3 100644 --- a/UI/tests/specs/stores/sics.spec.js +++ b/UI/tests/specs/stores/sics.spec.js @@ -15,8 +15,8 @@ beforeEach(() => { describe("Sic Store", () => { it("initialize", async () => { await sics.initialize(); - expect(sics.fields).toStrictEqual(["code", "sictype", "description"]); - expect(sics.items).toStrictEqual([ + expect(sics.fields).toMatchObject(["code", "sictype", "description"]); + expect(sics.items).toMatchObject([ { code: "541330", description: "Engineering service", @@ -28,7 +28,7 @@ describe("Sic Store", () => { _meta: { ETag: "1234567889" } } ]); - expect(sics._links).toStrictEqual([ + expect(sics._links).toMatchObject([ { title: "HTML", rel: "download", @@ -40,7 +40,7 @@ describe("Sic Store", () => { it("get Computer systems integrators sics 541330", async () => { await sics.initialize(); const sic = await sics.get("541330"); - expect(sic).toStrictEqual({ + expect(sic).toMatchObject({ _meta: { ETag: "1234567890" }, code: "541330", description: "Engineering service" @@ -54,7 +54,7 @@ describe("Sic Store", () => { code: "541330", description: "Engineering services" }); - expect(sics.items).toStrictEqual([ + expect(sics.items).toMatchObject([ { code: "541330", description: "Engineering services", @@ -81,7 +81,7 @@ describe("Sic Store", () => { code: "541510", description: "Design of computer systems" }); - expect(sics.items[sics.items.length - 1]).toStrictEqual({ + expect(sics.items[sics.items.length - 1]).toMatchObject({ _meta: { ETag: "1234567891" }, code: "541510", description: "Design of computer systems" diff --git a/UI/tests/specs/stores/warehouses.spec.js b/UI/tests/specs/stores/warehouses.spec.js index c0e9fef0bc..85be1af840 100644 --- a/UI/tests/specs/stores/warehouses.spec.js +++ b/UI/tests/specs/stores/warehouses.spec.js @@ -15,8 +15,8 @@ beforeEach(() => { describe("Warehouses Store", () => { it("initialize", async () => { await warehouses.initialize(); - expect(warehouses.fields).toStrictEqual(["id", "description"]); - expect(warehouses.items).toStrictEqual([ + expect(warehouses.fields).toMatchObject(["id", "description"]); + expect(warehouses.items).toMatchObject([ { id: "1", description: "Modern warehouse", @@ -33,7 +33,7 @@ describe("Warehouses Store", () => { _meta: { ETag: "1234567893" } } ]); - expect(warehouses._links).toStrictEqual([ + expect(warehouses._links).toMatchObject([ { title: "HTML", rel: "download", @@ -45,7 +45,7 @@ describe("Warehouses Store", () => { it("get warehouse #2", async () => { await warehouses.initialize(); const warehouse = await warehouses.get("2"); - expect(warehouse).toStrictEqual({ + expect(warehouse).toMatchObject({ _meta: { ETag: "1234567890" }, id: "2", description: "Huge warehouse" @@ -59,7 +59,7 @@ describe("Warehouses Store", () => { id: "2", description: "Biggest warehouse" }); - expect(warehouses.items).toStrictEqual([ + expect(warehouses.items).toMatchObject([ { id: "1", description: "Modern warehouse", @@ -88,7 +88,7 @@ describe("Warehouses Store", () => { it("add Mars warehouse", async () => { await warehouses.initialize(); await warehouses.add({ id: "4", description: "Mars warehouse" }); - expect(warehouses.items[warehouses.items.length - 1]).toStrictEqual({ + expect(warehouses.items[warehouses.items.length - 1]).toMatchObject({ _meta: { ETag: "1234567891" }, id: "4", description: "Mars warehouse"