From 10b086d2897e66e42cd38b80ebb203208f108d7c Mon Sep 17 00:00:00 2001 From: Christopher VanderKooi Date: Fri, 10 Sep 2021 14:48:00 -0600 Subject: [PATCH 1/2] Add support for xbox series x and series s on Microsoft CA --- src/store/model/index.ts | 2 ++ src/store/model/microsoft-ca.ts | 36 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 src/store/model/microsoft-ca.ts diff --git a/src/store/model/index.ts b/src/store/model/index.ts index 813d7d899f..bf3e0e7fa6 100644 --- a/src/store/model/index.ts +++ b/src/store/model/index.ts @@ -167,6 +167,7 @@ import {logger} from '../../logger'; import chalk from 'chalk'; import {UltimaInformatica} from './utlimainformatica'; import {XtremMedia} from './xtremmedia'; +import { MicrosoftCA } from './microsoft-ca'; export const storeList = new Map([ [AComPC.name, AComPC], @@ -269,6 +270,7 @@ export const storeList = new Map([ [Materiel.name, Materiel], [MemoryExpress.name, MemoryExpress], [MicroCenter.name, MicroCenter], + [MicrosoftCA.name, MicrosoftCA], [MightyApe.name, MightyApe], [Mindfactory.name, Mindfactory], [Msy.name, Msy], diff --git a/src/store/model/microsoft-ca.ts b/src/store/model/microsoft-ca.ts new file mode 100644 index 0000000000..5aad2f4d3e --- /dev/null +++ b/src/store/model/microsoft-ca.ts @@ -0,0 +1,36 @@ +import {Store} from './store'; + +export const MicrosoftCA: Store = { + currency: '$', + labels: { + inStock: { + container: 'button[aria-label="Checkout bundle"]', + text: ['Checkout'], + }, + outOfStock: { + container: 'button[aria-label="Checkout bundle"]', + text: ['Out of stock'], + }, + }, + links: [ + { + brand: 'test:brand', + model: 'test:model', + series: 'test:series', + url: 'https://www.xbox.com/en-ca/configure/8WJ714N3RBTL', + }, + { + brand: 'microsoft', + model: 'xbox series x', + series: 'xboxsx', + url: 'https://www.xbox.com/en-ca/configure/8WJ714N3RBTL', + }, + { + brand: 'microsoft', + model: 'xbox series s', + series: 'xboxss', + url: 'https://www.xbox.com/en-ca/configure/942J774TP9JN', + } + ], + name: 'microsoft-ca' +}; From a2a43640b2cec1ff3834b5b7149d1a69ab43052c Mon Sep 17 00:00:00 2001 From: Christopher VanderKooi Date: Fri, 10 Sep 2021 14:58:19 -0600 Subject: [PATCH 2/2] Linting fixes for microsoft-ca --- src/store/model/index.ts | 2 +- src/store/model/microsoft-ca.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/store/model/index.ts b/src/store/model/index.ts index bf3e0e7fa6..318872c77a 100644 --- a/src/store/model/index.ts +++ b/src/store/model/index.ts @@ -167,7 +167,7 @@ import {logger} from '../../logger'; import chalk from 'chalk'; import {UltimaInformatica} from './utlimainformatica'; import {XtremMedia} from './xtremmedia'; -import { MicrosoftCA } from './microsoft-ca'; +import {MicrosoftCA} from './microsoft-ca'; export const storeList = new Map([ [AComPC.name, AComPC], diff --git a/src/store/model/microsoft-ca.ts b/src/store/model/microsoft-ca.ts index 5aad2f4d3e..288e7acf14 100644 --- a/src/store/model/microsoft-ca.ts +++ b/src/store/model/microsoft-ca.ts @@ -30,7 +30,7 @@ export const MicrosoftCA: Store = { model: 'xbox series s', series: 'xboxss', url: 'https://www.xbox.com/en-ca/configure/942J774TP9JN', - } + }, ], - name: 'microsoft-ca' + name: 'microsoft-ca', };