develop #5

Merged
RamonDiasFerreira merged 17 commits from develop into main 2022-12-19 00:11:34 +00:00
2 changed files with 127 additions and 10886 deletions
Showing only changes of commit 15ee33cce8 - Show all commits

10970
checkout/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -8,14 +8,53 @@ export default class Header {
async init() {
await this.selectors();
console.log(this.item);
console.log(this.progressBar);
this.progressBarHTML()
}
async selectors() {
this.item = await waitElement("#my-element", {
this.header = await waitElement(".headerCheckout__wrapper", {
//#my-element pode ser a class ou o id do elemento html qeu vocÊ quer pegar
timeout: 5000, // vai esperar 5 segundos antes de rejeitar a promise
interval: 1000, // vai verificar a cada 1 segundo se o elemento existe
});
this.progressBar = await waitElement("#progressBar", {
//#my-element pode ser a class ou o id do elemento html qeu vocÊ quer pegar
timeout: 5000, // vai esperar 5 segundos antes de rejeitar a promise
interval: 1000, // vai verificar a cada 1 segundo se o elemento existe
});
}
progressBarHTML() {
if (this.progressBar && window.innerWidth > 1024) {
this.progressBar.innerHTML = `
<ul>
<li>
<div class="containerLi">
<p class="progress-bar-text">Meu Carrinho</p>
<p id="progress-bar-circle-1" class="progress-bar-circle"> </p>
</div>
</li>
<li class="central">
<div class="containerLi">
<p class="progress-bar-text">Dados Pessoais</p>
<p id="progress-bar-circle-2" class="progress-bar-circle"> </p>
</div>
</li>
<li>
<div class="containerLi">
<p class="progress-bar-text">Pagamentos</p>
<p id="progress-bar-circle-3" class="progress-bar-circle"> </p>
</div>
</li>
</ul>
`;
}
if (this.progressBar && window.innerWidth <= 1024) {
this.progressBar.innerHTML = ``;
}
}
}