Let say there are three array.
const initialArray = ['He', 'She', 'It']
const middleArray = ['is', 'was', 'were']
const lastArray = ['a dog', 'a cat', 'a wizard']
What I mean is if any of these 3 combinations comes the sentence is valid but the sentence need to be
'initialArray middleArray lastArray' only this sequence combination is correct others are false
I am trying to write something like this which is hardcoded but it won't work when the number of variables increase.
cy.get(`.${className} .legend_title`).should((key) => {
let mytext = key.text();
expect(mytext.trim()).to.be.oneOf([
'He is a dog',
"He is a cat",
'He is a wizard',
'She is a dog', .......
]);
});
